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_TS_SECTION_PES_H_ | 5 #ifndef MEDIA_FORMATS_MP2T_TS_SECTION_PES_H_ |
6 #define MEDIA_FORMATS_MP2T_TS_SECTION_PES_H_ | 6 #define MEDIA_FORMATS_MP2T_TS_SECTION_PES_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "media/base/byte_queue.h" | 11 #include "media/base/byte_queue.h" |
12 #include "media/formats/mp2t/ts_section.h" | 12 #include "media/formats/mp2t/ts_section.h" |
13 | 13 |
14 namespace media { | 14 namespace media { |
15 namespace mp2t { | 15 namespace mp2t { |
16 | 16 |
17 class EsParser; | 17 class EsParser; |
18 class TimestampUnroller; | |
18 | 19 |
19 class TsSectionPes : public TsSection { | 20 class TsSectionPes : public TsSection { |
20 public: | 21 public: |
21 explicit TsSectionPes(scoped_ptr<EsParser> es_parser); | 22 explicit TsSectionPes(scoped_ptr<EsParser> es_parser, |
damienv1
2014/09/15 22:27:36
Remove explicit.
| |
23 TimestampUnroller* timestamp_unroller); | |
22 virtual ~TsSectionPes(); | 24 virtual ~TsSectionPes(); |
23 | 25 |
24 // TsSection implementation. | 26 // TsSection implementation. |
25 virtual bool Parse(bool payload_unit_start_indicator, | 27 virtual bool Parse(bool payload_unit_start_indicator, |
26 const uint8* buf, int size) OVERRIDE; | 28 const uint8* buf, int size) OVERRIDE; |
27 virtual void Flush() OVERRIDE; | 29 virtual void Flush() OVERRIDE; |
28 virtual void Reset() OVERRIDE; | 30 virtual void Reset() OVERRIDE; |
29 | 31 |
30 private: | 32 private: |
31 // Emit a reassembled PES packet. | 33 // Emit a reassembled PES packet. |
(...skipping 10 matching lines...) Expand all Loading... | |
42 // Bytes of the current PES. | 44 // Bytes of the current PES. |
43 ByteQueue pes_byte_queue_; | 45 ByteQueue pes_byte_queue_; |
44 | 46 |
45 // ES parser. | 47 // ES parser. |
46 scoped_ptr<EsParser> es_parser_; | 48 scoped_ptr<EsParser> es_parser_; |
47 | 49 |
48 // Do not start parsing before getting a unit start indicator. | 50 // Do not start parsing before getting a unit start indicator. |
49 bool wait_for_pusi_; | 51 bool wait_for_pusi_; |
50 | 52 |
51 // Used to unroll PTS and DTS. | 53 // Used to unroll PTS and DTS. |
52 bool previous_pts_valid_; | 54 TimestampUnroller* const timestamp_unroller_; |
53 int64 previous_pts_; | |
54 bool previous_dts_valid_; | |
55 int64 previous_dts_; | |
56 | 55 |
57 DISALLOW_COPY_AND_ASSIGN(TsSectionPes); | 56 DISALLOW_COPY_AND_ASSIGN(TsSectionPes); |
58 }; | 57 }; |
59 | 58 |
60 } // namespace mp2t | 59 } // namespace mp2t |
61 } // namespace media | 60 } // namespace media |
62 | 61 |
63 #endif | 62 #endif |
64 | 63 |
OLD | NEW |