OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 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. | |
4 | |
5 #ifndef MEDIA_MP2T_ES_PARSER_H_ | |
6 #define MEDIA_MP2T_ES_PARSER_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/callback.h" | |
damienv1
2013/09/12 20:43:02
#include "base/memory/ref_counted.h"
damienv1
2013/09/12 20:53:51
Done.
| |
10 #include "base/time/time.h" | |
11 | |
12 namespace media { | |
13 | |
14 class StreamParserBuffer; | |
15 | |
16 namespace mp2t { | |
17 | |
18 class EsParser { | |
19 public: | |
20 typedef base::Callback<void(scoped_refptr<StreamParserBuffer>)> EmitBufferCB; | |
21 | |
22 EsParser() {} | |
23 virtual ~EsParser() {} | |
24 | |
25 // ES parsing. | |
26 // Should use kNoTimestamp when a timestamp is not valid. | |
27 virtual bool Parse(const uint8* buf, int size, | |
28 base::TimeDelta pts, | |
29 base::TimeDelta dts) = 0; | |
30 | |
31 // Flush any pending buffer. | |
32 virtual void Flush() = 0; | |
33 | |
34 // Reset the state of the ES parser. | |
35 virtual void Reset() = 0; | |
36 }; | |
37 | |
38 } // namespace mp2t | |
39 } // namespace media | |
40 | |
41 #endif | |
OLD | NEW |