| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // If |buffer_queue_| is not empty will execute on caller's thread, otherwise | 77 // If |buffer_queue_| is not empty will execute on caller's thread, otherwise |
| 78 // will post ReadTask to execute on demuxer's thread. Read will acquire | 78 // will post ReadTask to execute on demuxer's thread. Read will acquire |
| 79 // |lock_| for the life of the function so that means |read_cb| must | 79 // |lock_| for the life of the function so that means |read_cb| must |
| 80 // not make calls into FFmpegDemuxerStream directly or that may cause a | 80 // not make calls into FFmpegDemuxerStream directly or that may cause a |
| 81 // deadlock. |read_cb| should execute as quickly as possible because | 81 // deadlock. |read_cb| should execute as quickly as possible because |
| 82 // |lock_| is held throughout the life of the callback. | 82 // |lock_| is held throughout the life of the callback. |
| 83 virtual void Read(const ReadCB& read_cb) OVERRIDE; | 83 virtual void Read(const ReadCB& read_cb) OVERRIDE; |
| 84 virtual void EnableBitstreamConverter() OVERRIDE; | 84 virtual void EnableBitstreamConverter() OVERRIDE; |
| 85 virtual const AudioDecoderConfig& audio_decoder_config() OVERRIDE; | 85 virtual const AudioDecoderConfig& audio_decoder_config() OVERRIDE; |
| 86 virtual const VideoDecoderConfig& video_decoder_config() OVERRIDE; | 86 virtual const VideoDecoderConfig& video_decoder_config() OVERRIDE; |
| 87 virtual bool is_encrypted() OVERRIDE; |
| 87 | 88 |
| 88 // Returns the range of buffered data in this stream. | 89 // Returns the range of buffered data in this stream. |
| 89 Ranges<base::TimeDelta> GetBufferedRanges() const; | 90 Ranges<base::TimeDelta> GetBufferedRanges() const; |
| 90 | 91 |
| 91 // Returns elapsed time based on the already queued packets. | 92 // Returns elapsed time based on the already queued packets. |
| 92 // Used to determine stream duration when it's not known ahead of time. | 93 // Used to determine stream duration when it's not known ahead of time. |
| 93 base::TimeDelta GetElapsedTime() const; | 94 base::TimeDelta GetElapsedTime() const; |
| 94 | 95 |
| 95 protected: | 96 protected: |
| 96 virtual ~FFmpegDemuxerStream(); | 97 virtual ~FFmpegDemuxerStream(); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 // Set if we know duration of the audio stream. Used when processing end of | 268 // Set if we know duration of the audio stream. Used when processing end of |
| 268 // stream -- at this moment we definitely know duration. | 269 // stream -- at this moment we definitely know duration. |
| 269 bool duration_known_; | 270 bool duration_known_; |
| 270 | 271 |
| 271 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); | 272 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
| 272 }; | 273 }; |
| 273 | 274 |
| 274 } // namespace media | 275 } // namespace media |
| 275 | 276 |
| 276 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 277 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
| OLD | NEW |