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 <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "media/base/media_export.h" | 17 #include "media/base/media_export.h" |
18 #include "media/base/stream_parser_buffer.h" | 18 #include "media/base/stream_parser_buffer.h" |
19 | 19 |
20 namespace media { | 20 namespace media { |
21 | 21 |
| 22 class DecryptConfig; |
22 class OffsetByteQueue; | 23 class OffsetByteQueue; |
23 class StreamParserBuffer; | 24 class StreamParserBuffer; |
24 | 25 |
25 namespace mp2t { | 26 namespace mp2t { |
26 | 27 |
27 class MEDIA_EXPORT EsParser { | 28 class MEDIA_EXPORT EsParser { |
28 public: | 29 public: |
29 typedef base::Callback<void(scoped_refptr<StreamParserBuffer>)> EmitBufferCB; | 30 using EmitBufferCB = base::Callback<void(scoped_refptr<StreamParserBuffer>)>; |
| 31 using GetDecryptConfigCB = base::Callback<const DecryptConfig*()>; |
30 | 32 |
31 EsParser(); | 33 EsParser(); |
32 virtual ~EsParser(); | 34 virtual ~EsParser(); |
33 | 35 |
34 // ES parsing. | 36 // ES parsing. |
35 // Should use kNoTimestamp when a timestamp is not valid. | 37 // Should use kNoTimestamp when a timestamp is not valid. |
36 bool Parse(const uint8_t* buf, | 38 bool Parse(const uint8_t* buf, |
37 int size, | 39 int size, |
38 base::TimeDelta pts, | 40 base::TimeDelta pts, |
39 DecodeTimestamp dts); | 41 DecodeTimestamp dts); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // unit that commences in this PES packet. | 86 // unit that commences in this PES packet. |
85 std::list<std::pair<int64_t, TimingDesc>> timing_desc_list_; | 87 std::list<std::pair<int64_t, TimingDesc>> timing_desc_list_; |
86 | 88 |
87 DISALLOW_COPY_AND_ASSIGN(EsParser); | 89 DISALLOW_COPY_AND_ASSIGN(EsParser); |
88 }; | 90 }; |
89 | 91 |
90 } // namespace mp2t | 92 } // namespace mp2t |
91 } // namespace media | 93 } // namespace media |
92 | 94 |
93 #endif | 95 #endif |
OLD | NEW |