| 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_MP2T_STREAM_PARSER_H_ | 5 #ifndef MEDIA_FORMATS_MP2T_MP2T_STREAM_PARSER_H_ |
| 6 #define MEDIA_FORMATS_MP2T_MP2T_STREAM_PARSER_H_ | 6 #define MEDIA_FORMATS_MP2T_MP2T_STREAM_PARSER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 explicit Mp2tStreamParser(bool sbr_in_mimetype); | 33 explicit Mp2tStreamParser(bool sbr_in_mimetype); |
| 34 ~Mp2tStreamParser() override; | 34 ~Mp2tStreamParser() override; |
| 35 | 35 |
| 36 // StreamParser implementation. | 36 // StreamParser implementation. |
| 37 void Init(const InitCB& init_cb, | 37 void Init(const InitCB& init_cb, |
| 38 const NewConfigCB& config_cb, | 38 const NewConfigCB& config_cb, |
| 39 const NewBuffersCB& new_buffers_cb, | 39 const NewBuffersCB& new_buffers_cb, |
| 40 bool ignore_text_tracks, | 40 bool ignore_text_tracks, |
| 41 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, | 41 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, |
| 42 const NewMediaSegmentCB& new_segment_cb, | 42 const NewMediaSegmentCB& new_segment_cb, |
| 43 const base::Closure& end_of_segment_cb, | 43 const EndMediaSegmentCB& end_of_segment_cb, |
| 44 const scoped_refptr<MediaLog>& media_log) override; | 44 const scoped_refptr<MediaLog>& media_log) override; |
| 45 void Flush() override; | 45 void Flush() override; |
| 46 bool Parse(const uint8_t* buf, int size) override; | 46 bool Parse(const uint8_t* buf, int size) override; |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 typedef std::map<int, PidState*> PidMap; | 49 typedef std::map<int, PidState*> PidMap; |
| 50 | 50 |
| 51 struct BufferQueueWithConfig { | 51 struct BufferQueueWithConfig { |
| 52 BufferQueueWithConfig(bool is_cfg_sent, | 52 BufferQueueWithConfig(bool is_cfg_sent, |
| 53 const AudioDecoderConfig& audio_cfg, | 53 const AudioDecoderConfig& audio_cfg, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 int pes_pid, | 95 int pes_pid, |
| 96 scoped_refptr<StreamParserBuffer> stream_parser_buffer); | 96 scoped_refptr<StreamParserBuffer> stream_parser_buffer); |
| 97 bool EmitRemainingBuffers(); | 97 bool EmitRemainingBuffers(); |
| 98 | 98 |
| 99 // List of callbacks. | 99 // List of callbacks. |
| 100 InitCB init_cb_; | 100 InitCB init_cb_; |
| 101 NewConfigCB config_cb_; | 101 NewConfigCB config_cb_; |
| 102 NewBuffersCB new_buffers_cb_; | 102 NewBuffersCB new_buffers_cb_; |
| 103 EncryptedMediaInitDataCB encrypted_media_init_data_cb_; | 103 EncryptedMediaInitDataCB encrypted_media_init_data_cb_; |
| 104 NewMediaSegmentCB new_segment_cb_; | 104 NewMediaSegmentCB new_segment_cb_; |
| 105 base::Closure end_of_segment_cb_; | 105 EndMediaSegmentCB end_of_segment_cb_; |
| 106 scoped_refptr<MediaLog> media_log_; | 106 scoped_refptr<MediaLog> media_log_; |
| 107 | 107 |
| 108 // True when AAC SBR extension is signalled in the mimetype | 108 // True when AAC SBR extension is signalled in the mimetype |
| 109 // (mp4a.40.5 in the codecs parameter). | 109 // (mp4a.40.5 in the codecs parameter). |
| 110 bool sbr_in_mimetype_; | 110 bool sbr_in_mimetype_; |
| 111 | 111 |
| 112 // Bytes of the TS stream. | 112 // Bytes of the TS stream. |
| 113 ByteQueue ts_byte_queue_; | 113 ByteQueue ts_byte_queue_; |
| 114 | 114 |
| 115 // List of PIDs and their state. | 115 // List of PIDs and their state. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 134 TimestampUnroller timestamp_unroller_; | 134 TimestampUnroller timestamp_unroller_; |
| 135 | 135 |
| 136 DISALLOW_COPY_AND_ASSIGN(Mp2tStreamParser); | 136 DISALLOW_COPY_AND_ASSIGN(Mp2tStreamParser); |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 } // namespace mp2t | 139 } // namespace mp2t |
| 140 } // namespace media | 140 } // namespace media |
| 141 | 141 |
| 142 #endif | 142 #endif |
| 143 | 143 |
| OLD | NEW |