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 // Implements the Demuxer interface using FFmpeg's libavformat. At this time | 5 // Implements the Demuxer interface using FFmpeg's libavformat. At this time |
6 // will support demuxing any audio/video format thrown at it. The streams | 6 // will support demuxing any audio/video format thrown at it. The streams |
7 // output mime types audio/x-ffmpeg and video/x-ffmpeg and include an integer | 7 // output mime types audio/x-ffmpeg and video/x-ffmpeg and include an integer |
8 // key FFmpegCodecID which contains the CodecID enumeration value. The CodecIDs | 8 // key FFmpegCodecID which contains the CodecID enumeration value. The CodecIDs |
9 // can be used to create and initialize the corresponding FFmpeg decoder. | 9 // can be used to create and initialize the corresponding FFmpeg decoder. |
10 // | 10 // |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 232 |
233 // Allow FFmpegDemuxerStream to notify us when there is updated information | 233 // Allow FFmpegDemuxerStream to notify us when there is updated information |
234 // about capacity and what buffered data is available. | 234 // about capacity and what buffered data is available. |
235 void NotifyCapacityAvailable(); | 235 void NotifyCapacityAvailable(); |
236 void NotifyBufferingChanged(); | 236 void NotifyBufferingChanged(); |
237 | 237 |
238 // Allow FFmpegDemxuerStream to notify us about an error. | 238 // Allow FFmpegDemxuerStream to notify us about an error. |
239 void NotifyDemuxerError(PipelineStatus error); | 239 void NotifyDemuxerError(PipelineStatus error); |
240 | 240 |
241 void OnEnabledAudioTracksChanged(const std::vector<MediaTrack::Id>& track_ids, | 241 void OnEnabledAudioTracksChanged(const std::vector<MediaTrack::Id>& track_ids, |
242 base::TimeDelta currTime) override; | 242 base::TimeDelta curr_time) override; |
243 // |track_ids| is either empty or contains a single video track id. | 243 // |track_id| either contains the selected video track id or is null, |
244 void OnSelectedVideoTrackChanged(const std::vector<MediaTrack::Id>& track_ids, | 244 // indicating that all video tracks are deselected/disabled. |
245 base::TimeDelta currTime) override; | 245 void OnSelectedVideoTrackChanged(base::Optional<MediaTrack::Id> track_id, |
| 246 base::TimeDelta curr_time) override; |
246 | 247 |
247 // The lowest demuxed timestamp. If negative, DemuxerStreams must use this to | 248 // The lowest demuxed timestamp. If negative, DemuxerStreams must use this to |
248 // adjust packet timestamps such that external clients see a zero-based | 249 // adjust packet timestamps such that external clients see a zero-based |
249 // timeline. | 250 // timeline. |
250 base::TimeDelta start_time() const { return start_time_; } | 251 base::TimeDelta start_time() const { return start_time_; } |
251 | 252 |
252 private: | 253 private: |
253 // To allow tests access to privates. | 254 // To allow tests access to privates. |
254 friend class FFmpegDemuxerTest; | 255 friend class FFmpegDemuxerTest; |
255 | 256 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 base::WeakPtr<FFmpegDemuxer> weak_this_; | 371 base::WeakPtr<FFmpegDemuxer> weak_this_; |
371 base::WeakPtrFactory<FFmpegDemuxer> cancel_pending_seek_factory_; | 372 base::WeakPtrFactory<FFmpegDemuxer> cancel_pending_seek_factory_; |
372 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; | 373 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; |
373 | 374 |
374 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); | 375 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
375 }; | 376 }; |
376 | 377 |
377 } // namespace media | 378 } // namespace media |
378 | 379 |
379 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 380 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
OLD | NEW |