1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_FORMATS_MP2T_ES_PARSER_H_
6 #define MEDIA_FORMATS_MP2T_ES_PARSER_H_
8 #include "base/basictypes.h"
9 #include "base/callback.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/time/time.h"
15 class StreamParserBuffer
;
21 typedef base::Callback
<void(scoped_refptr
<StreamParserBuffer
>)> EmitBufferCB
;
24 virtual ~EsParser() {}
27 // Should use kNoTimestamp when a timestamp is not valid.
28 virtual bool Parse(const uint8
* buf
, int size
,
30 base::TimeDelta dts
) = 0;
32 // Flush any pending buffer.
33 virtual void Flush() = 0;
35 // Reset the state of the ES parser.
36 virtual void Reset() = 0;