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