Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Side by Side Diff: media/formats/mp2t/mp2t_stream_parser.h

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 27 matching lines...) Expand all
38 ~Mp2tStreamParser() override; 38 ~Mp2tStreamParser() override;
39 39
40 // StreamParser implementation. 40 // StreamParser implementation.
41 void Init(const InitCB& init_cb, 41 void Init(const InitCB& init_cb,
42 const NewConfigCB& config_cb, 42 const NewConfigCB& config_cb,
43 const NewBuffersCB& new_buffers_cb, 43 const NewBuffersCB& new_buffers_cb,
44 bool ignore_text_tracks, 44 bool ignore_text_tracks,
45 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, 45 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb,
46 const NewMediaSegmentCB& new_segment_cb, 46 const NewMediaSegmentCB& new_segment_cb,
47 const EndMediaSegmentCB& end_of_segment_cb, 47 const EndMediaSegmentCB& end_of_segment_cb,
48 const scoped_refptr<MediaLog>& media_log) override; 48 MediaLog* media_log) override;
49 void Flush() override; 49 void Flush() override;
50 bool Parse(const uint8_t* buf, int size) override; 50 bool Parse(const uint8_t* buf, int size) override;
51 51
52 private: 52 private:
53 struct BufferQueueWithConfig { 53 struct BufferQueueWithConfig {
54 BufferQueueWithConfig(bool is_cfg_sent, 54 BufferQueueWithConfig(bool is_cfg_sent,
55 const AudioDecoderConfig& audio_cfg, 55 const AudioDecoderConfig& audio_cfg,
56 const VideoDecoderConfig& video_cfg); 56 const VideoDecoderConfig& video_cfg);
57 BufferQueueWithConfig(const BufferQueueWithConfig& other); 57 BufferQueueWithConfig(const BufferQueueWithConfig& other);
58 ~BufferQueueWithConfig(); 58 ~BufferQueueWithConfig();
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 const DecryptConfig* GetDecryptConfig() { return decrypt_config_.get(); } 120 const DecryptConfig* GetDecryptConfig() { return decrypt_config_.get(); }
121 #endif 121 #endif
122 122
123 // List of callbacks. 123 // List of callbacks.
124 InitCB init_cb_; 124 InitCB init_cb_;
125 NewConfigCB config_cb_; 125 NewConfigCB config_cb_;
126 NewBuffersCB new_buffers_cb_; 126 NewBuffersCB new_buffers_cb_;
127 EncryptedMediaInitDataCB encrypted_media_init_data_cb_; 127 EncryptedMediaInitDataCB encrypted_media_init_data_cb_;
128 NewMediaSegmentCB new_segment_cb_; 128 NewMediaSegmentCB new_segment_cb_;
129 EndMediaSegmentCB end_of_segment_cb_; 129 EndMediaSegmentCB end_of_segment_cb_;
130 scoped_refptr<MediaLog> media_log_; 130 MediaLog* media_log_;
131 131
132 // True when AAC SBR extension is signalled in the mimetype 132 // True when AAC SBR extension is signalled in the mimetype
133 // (mp4a.40.5 in the codecs parameter). 133 // (mp4a.40.5 in the codecs parameter).
134 bool sbr_in_mimetype_; 134 bool sbr_in_mimetype_;
135 135
136 // Bytes of the TS stream. 136 // Bytes of the TS stream.
137 ByteQueue ts_byte_queue_; 137 ByteQueue ts_byte_queue_;
138 138
139 // List of PIDs and their state. 139 // List of PIDs and their state.
140 std::map<int, std::unique_ptr<PidState>> pids_; 140 std::map<int, std::unique_ptr<PidState>> pids_;
(...skipping 20 matching lines...) Expand all
161 std::unique_ptr<DecryptConfig> decrypt_config_; 161 std::unique_ptr<DecryptConfig> decrypt_config_;
162 #endif 162 #endif
163 163
164 DISALLOW_COPY_AND_ASSIGN(Mp2tStreamParser); 164 DISALLOW_COPY_AND_ASSIGN(Mp2tStreamParser);
165 }; 165 };
166 166
167 } // namespace mp2t 167 } // namespace mp2t
168 } // namespace media 168 } // namespace media
169 169
170 #endif // MEDIA_FORMATS_MP2T_MP2T_STREAM_PARSER_H_ 170 #endif // MEDIA_FORMATS_MP2T_MP2T_STREAM_PARSER_H_
OLDNEW
« no previous file with comments | « media/formats/mp2t/es_parser_mpeg1audio_unittest.cc ('k') | media/formats/mp2t/mp2t_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698