| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // Demuxer implementation. | 152 // Demuxer implementation. |
| 153 virtual void Initialize(DemuxerHost* host, | 153 virtual void Initialize(DemuxerHost* host, |
| 154 const PipelineStatusCB& cb, | 154 const PipelineStatusCB& cb, |
| 155 bool enable_text_tracks) OVERRIDE; | 155 bool enable_text_tracks) OVERRIDE; |
| 156 virtual void Stop(const base::Closure& callback) OVERRIDE; | 156 virtual void Stop(const base::Closure& callback) OVERRIDE; |
| 157 virtual void Seek(base::TimeDelta time, const PipelineStatusCB& cb) OVERRIDE; | 157 virtual void Seek(base::TimeDelta time, const PipelineStatusCB& cb) OVERRIDE; |
| 158 virtual void OnAudioRendererDisabled() OVERRIDE; | 158 virtual void OnAudioRendererDisabled() OVERRIDE; |
| 159 virtual DemuxerStream* GetStream(DemuxerStream::Type type) OVERRIDE; | 159 virtual DemuxerStream* GetStream(DemuxerStream::Type type) OVERRIDE; |
| 160 virtual base::TimeDelta GetStartTime() const OVERRIDE; | 160 virtual base::TimeDelta GetStartTime() const OVERRIDE; |
| 161 virtual base::Time GetTimelineOffset() const OVERRIDE; | 161 virtual base::Time GetTimelineOffset() const OVERRIDE; |
| 162 virtual Liveness GetLiveness() const OVERRIDE; |
| 162 | 163 |
| 163 // Methods used by an external object to control this demuxer. | 164 // Methods used by an external object to control this demuxer. |
| 164 // | 165 // |
| 165 // Indicates that a new Seek() call is on its way. Any pending Reads on the | 166 // Indicates that a new Seek() call is on its way. Any pending Reads on the |
| 166 // DemuxerStream objects should be aborted immediately inside this call and | 167 // DemuxerStream objects should be aborted immediately inside this call and |
| 167 // future Read calls should return kAborted until the Seek() call occurs. | 168 // future Read calls should return kAborted until the Seek() call occurs. |
| 168 // This method MUST ALWAYS be called before Seek() is called to signal that | 169 // This method MUST ALWAYS be called before Seek() is called to signal that |
| 169 // the next Seek() call represents the seek point we actually want to return | 170 // the next Seek() call represents the seek point we actually want to return |
| 170 // data for. | 171 // data for. |
| 171 // |seek_time| - The presentation timestamp for the seek that triggered this | 172 // |seek_time| - The presentation timestamp for the seek that triggered this |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 base::TimeDelta duration_; | 360 base::TimeDelta duration_; |
| 360 | 361 |
| 361 // The duration passed to the last SetDuration(). If | 362 // The duration passed to the last SetDuration(). If |
| 362 // SetDuration() is never called or an AppendData() call or | 363 // SetDuration() is never called or an AppendData() call or |
| 363 // a EndOfStream() call changes |duration_|, then this | 364 // a EndOfStream() call changes |duration_|, then this |
| 364 // variable is set to < 0 to indicate that the |duration_| represents | 365 // variable is set to < 0 to indicate that the |duration_| represents |
| 365 // the actual duration instead of a user specified value. | 366 // the actual duration instead of a user specified value. |
| 366 double user_specified_duration_; | 367 double user_specified_duration_; |
| 367 | 368 |
| 368 base::Time timeline_offset_; | 369 base::Time timeline_offset_; |
| 370 Liveness liveness_; |
| 369 | 371 |
| 370 typedef std::map<std::string, SourceState*> SourceStateMap; | 372 typedef std::map<std::string, SourceState*> SourceStateMap; |
| 371 SourceStateMap source_state_map_; | 373 SourceStateMap source_state_map_; |
| 372 | 374 |
| 373 // Used to ensure that (1) config data matches the type and codec provided in | 375 // Used to ensure that (1) config data matches the type and codec provided in |
| 374 // AddId(), (2) only 1 audio and 1 video sources are added, and (3) ids may be | 376 // AddId(), (2) only 1 audio and 1 video sources are added, and (3) ids may be |
| 375 // removed with RemoveID() but can not be re-added (yet). | 377 // removed with RemoveID() but can not be re-added (yet). |
| 376 std::string source_id_audio_; | 378 std::string source_id_audio_; |
| 377 std::string source_id_video_; | 379 std::string source_id_video_; |
| 378 | 380 |
| 379 // Indicates that splice frame generation is enabled. | 381 // Indicates that splice frame generation is enabled. |
| 380 const bool splice_frames_enabled_; | 382 const bool splice_frames_enabled_; |
| 381 | 383 |
| 382 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 384 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
| 383 }; | 385 }; |
| 384 | 386 |
| 385 } // namespace media | 387 } // namespace media |
| 386 | 388 |
| 387 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 389 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
| OLD | NEW |