OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_FILTERS_CHUNK_DEMUXER_H_ | 5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 }; | 144 }; |
145 | 145 |
146 typedef base::Closure InitSegmentReceivedCB; | 146 typedef base::Closure InitSegmentReceivedCB; |
147 | 147 |
148 // |open_cb| Run when Initialize() is called to signal that the demuxer | 148 // |open_cb| Run when Initialize() is called to signal that the demuxer |
149 // is ready to receive media data via AppenData(). | 149 // is ready to receive media data via AppenData(). |
150 // |encrypted_media_init_data_cb| Run when the demuxer determines that an | 150 // |encrypted_media_init_data_cb| Run when the demuxer determines that an |
151 // encryption key is needed to decrypt the content. | 151 // encryption key is needed to decrypt the content. |
152 // |enable_text| Process inband text tracks in the normal way when true, | 152 // |enable_text| Process inband text tracks in the normal way when true, |
153 // otherwise ignore them. | 153 // otherwise ignore them. |
154 // |log_cb| Run when parsing error messages need to be logged to the error | 154 // |log_cb| Run when the demuxer needs to emit MediaLog messages. |
155 // console. | |
156 // |splice_frames_enabled| Indicates that it's okay to generate splice frames | 155 // |splice_frames_enabled| Indicates that it's okay to generate splice frames |
157 // per the MSE specification. Renderers must understand DecoderBuffer's | 156 // per the MSE specification. Renderers must understand DecoderBuffer's |
158 // splice_timestamp() field. | 157 // splice_timestamp() field. |
159 ChunkDemuxer(const base::Closure& open_cb, | 158 ChunkDemuxer(const base::Closure& open_cb, |
160 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, | 159 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, |
161 const LogCB& log_cb, | 160 const LogCB& log_cb, |
162 const scoped_refptr<MediaLog>& media_log, | 161 const scoped_refptr<MediaLog>& media_log, |
163 bool splice_frames_enabled); | 162 bool splice_frames_enabled); |
164 ~ChunkDemuxer() override; | 163 ~ChunkDemuxer() override; |
165 | 164 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 void ShutdownAllStreams(); | 352 void ShutdownAllStreams(); |
354 | 353 |
355 mutable base::Lock lock_; | 354 mutable base::Lock lock_; |
356 State state_; | 355 State state_; |
357 bool cancel_next_seek_; | 356 bool cancel_next_seek_; |
358 | 357 |
359 DemuxerHost* host_; | 358 DemuxerHost* host_; |
360 base::Closure open_cb_; | 359 base::Closure open_cb_; |
361 EncryptedMediaInitDataCB encrypted_media_init_data_cb_; | 360 EncryptedMediaInitDataCB encrypted_media_init_data_cb_; |
362 bool enable_text_; | 361 bool enable_text_; |
363 // Callback used to report error strings that can help the web developer | 362 // Callback used to report log messages that can help the web developer |
364 // figure out what is wrong with the content. | 363 // figure out what is wrong with the content. |
365 LogCB log_cb_; | 364 LogCB log_cb_; |
366 scoped_refptr<MediaLog> media_log_; | 365 scoped_refptr<MediaLog> media_log_; |
367 | 366 |
368 PipelineStatusCB init_cb_; | 367 PipelineStatusCB init_cb_; |
369 // Callback to execute upon seek completion. | 368 // Callback to execute upon seek completion. |
370 // TODO(wolenetz/acolwell): Protect against possible double-locking by first | 369 // TODO(wolenetz/acolwell): Protect against possible double-locking by first |
371 // releasing |lock_| before executing this callback. See | 370 // releasing |lock_| before executing this callback. See |
372 // http://crbug.com/308226 | 371 // http://crbug.com/308226 |
373 PipelineStatusCB seek_cb_; | 372 PipelineStatusCB seek_cb_; |
(...skipping 24 matching lines...) Expand all Loading... |
398 | 397 |
399 // Indicates that splice frame generation is enabled. | 398 // Indicates that splice frame generation is enabled. |
400 const bool splice_frames_enabled_; | 399 const bool splice_frames_enabled_; |
401 | 400 |
402 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 401 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
403 }; | 402 }; |
404 | 403 |
405 } // namespace media | 404 } // namespace media |
406 | 405 |
407 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 406 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
OLD | NEW |