| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_FORMATS_MP2T_ES_PARSER_H_ | 5 #ifndef MEDIA_FORMATS_MP2T_ES_PARSER_H_ |
| 6 #define MEDIA_FORMATS_MP2T_ES_PARSER_H_ | 6 #define MEDIA_FORMATS_MP2T_ES_PARSER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <utility> | 12 #include <utility> |
| 13 | 13 |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "media/base/media_export.h" | 18 #include "media/base/media_export.h" |
| 19 #include "media/base/stream_parser_buffer.h" | 19 #include "media/base/stream_parser_buffer.h" |
| 20 | 20 |
| 21 namespace media { | 21 namespace media { |
| 22 | 22 |
| 23 class DecryptConfig; |
| 23 class OffsetByteQueue; | 24 class OffsetByteQueue; |
| 24 class StreamParserBuffer; | 25 class StreamParserBuffer; |
| 25 | 26 |
| 26 namespace mp2t { | 27 namespace mp2t { |
| 27 | 28 |
| 28 class MEDIA_EXPORT EsParser { | 29 class MEDIA_EXPORT EsParser { |
| 29 public: | 30 public: |
| 30 typedef base::Callback<void(scoped_refptr<StreamParserBuffer>)> EmitBufferCB; | 31 using EmitBufferCB = base::Callback<void(scoped_refptr<StreamParserBuffer>)>; |
| 32 using GetDecryptConfigCB = base::Callback<const DecryptConfig*()>; |
| 31 | 33 |
| 32 EsParser(); | 34 EsParser(); |
| 33 virtual ~EsParser(); | 35 virtual ~EsParser(); |
| 34 | 36 |
| 35 // ES parsing. | 37 // ES parsing. |
| 36 // Should use kNoTimestamp when a timestamp is not valid. | 38 // Should use kNoTimestamp when a timestamp is not valid. |
| 37 bool Parse(const uint8_t* buf, | 39 bool Parse(const uint8_t* buf, |
| 38 int size, | 40 int size, |
| 39 base::TimeDelta pts, | 41 base::TimeDelta pts, |
| 40 DecodeTimestamp dts); | 42 DecodeTimestamp dts); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // unit that commences in this PES packet. | 87 // unit that commences in this PES packet. |
| 86 std::list<std::pair<int64_t, TimingDesc>> timing_desc_list_; | 88 std::list<std::pair<int64_t, TimingDesc>> timing_desc_list_; |
| 87 | 89 |
| 88 DISALLOW_COPY_AND_ASSIGN(EsParser); | 90 DISALLOW_COPY_AND_ASSIGN(EsParser); |
| 89 }; | 91 }; |
| 90 | 92 |
| 91 } // namespace mp2t | 93 } // namespace mp2t |
| 92 } // namespace media | 94 } // namespace media |
| 93 | 95 |
| 94 #endif | 96 #endif |
| OLD | NEW |