| 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 <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // is ready to receive media data via AppenData(). | 38 // is ready to receive media data via AppenData(). |
| 39 // |need_key_cb| Run when the demuxer determines that an encryption key is | 39 // |need_key_cb| Run when the demuxer determines that an encryption key is |
| 40 // needed to decrypt the content. | 40 // needed to decrypt the content. |
| 41 // |add_text_track_cb| Run when demuxer detects the presence of an inband | 41 // |add_text_track_cb| Run when demuxer detects the presence of an inband |
| 42 // text track. | 42 // text track. |
| 43 // |log_cb| Run when parsing error messages need to be logged to the error | 43 // |log_cb| Run when parsing error messages need to be logged to the error |
| 44 // console. | 44 // console. |
| 45 ChunkDemuxer(const base::Closure& open_cb, | 45 ChunkDemuxer(const base::Closure& open_cb, |
| 46 const NeedKeyCB& need_key_cb, | 46 const NeedKeyCB& need_key_cb, |
| 47 const AddTextTrackCB& add_text_track_cb, | 47 const AddTextTrackCB& add_text_track_cb, |
| 48 const scoped_refptr<MediaLog>& media_log, |
| 48 const LogCB& log_cb); | 49 const LogCB& log_cb); |
| 49 virtual ~ChunkDemuxer(); | 50 virtual ~ChunkDemuxer(); |
| 50 | 51 |
| 51 // Demuxer implementation. | 52 // Demuxer implementation. |
| 52 virtual void Initialize(DemuxerHost* host, | 53 virtual void Initialize(DemuxerHost* host, |
| 53 const PipelineStatusCB& cb) OVERRIDE; | 54 const PipelineStatusCB& cb) OVERRIDE; |
| 54 virtual void Stop(const base::Closure& callback) OVERRIDE; | 55 virtual void Stop(const base::Closure& callback) OVERRIDE; |
| 55 virtual void Seek(base::TimeDelta time, const PipelineStatusCB& cb) OVERRIDE; | 56 virtual void Seek(base::TimeDelta time, const PipelineStatusCB& cb) OVERRIDE; |
| 56 virtual void OnAudioRendererDisabled() OVERRIDE; | 57 virtual void OnAudioRendererDisabled() OVERRIDE; |
| 57 virtual DemuxerStream* GetStream(DemuxerStream::Type type) OVERRIDE; | 58 virtual DemuxerStream* GetStream(DemuxerStream::Type type) OVERRIDE; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 void SeekAllSources(base::TimeDelta seek_time); | 225 void SeekAllSources(base::TimeDelta seek_time); |
| 225 | 226 |
| 226 mutable base::Lock lock_; | 227 mutable base::Lock lock_; |
| 227 State state_; | 228 State state_; |
| 228 bool cancel_next_seek_; | 229 bool cancel_next_seek_; |
| 229 | 230 |
| 230 DemuxerHost* host_; | 231 DemuxerHost* host_; |
| 231 base::Closure open_cb_; | 232 base::Closure open_cb_; |
| 232 NeedKeyCB need_key_cb_; | 233 NeedKeyCB need_key_cb_; |
| 233 AddTextTrackCB add_text_track_cb_; | 234 AddTextTrackCB add_text_track_cb_; |
| 235 |
| 236 scoped_refptr<MediaLog> media_log_; |
| 237 |
| 234 // Callback used to report error strings that can help the web developer | 238 // Callback used to report error strings that can help the web developer |
| 235 // figure out what is wrong with the content. | 239 // figure out what is wrong with the content. |
| 236 LogCB log_cb_; | 240 LogCB log_cb_; |
| 237 | 241 |
| 238 PipelineStatusCB init_cb_; | 242 PipelineStatusCB init_cb_; |
| 239 // Callback to execute upon seek completion. | 243 // Callback to execute upon seek completion. |
| 240 // TODO(wolenetz/acolwell): Protect against possible double-locking by first | 244 // TODO(wolenetz/acolwell): Protect against possible double-locking by first |
| 241 // releasing |lock_| before executing this callback. See | 245 // releasing |lock_| before executing this callback. See |
| 242 // http://crbug.com/308226 | 246 // http://crbug.com/308226 |
| 243 PipelineStatusCB seek_cb_; | 247 PipelineStatusCB seek_cb_; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 265 // removed with RemoveID() but can not be re-added (yet). | 269 // removed with RemoveID() but can not be re-added (yet). |
| 266 std::string source_id_audio_; | 270 std::string source_id_audio_; |
| 267 std::string source_id_video_; | 271 std::string source_id_video_; |
| 268 | 272 |
| 269 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 273 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
| 270 }; | 274 }; |
| 271 | 275 |
| 272 } // namespace media | 276 } // namespace media |
| 273 | 277 |
| 274 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 278 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
| OLD | NEW |