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