| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // Used to synchronize access to |buffer_queue_|, |read_queue_|, and | 118 // Used to synchronize access to |buffer_queue_|, |read_queue_|, and |
| 119 // |stopped_|. This is so other threads can get access to buffers that have | 119 // |stopped_|. This is so other threads can get access to buffers that have |
| 120 // already been demuxed without having the demuxer thread sending the | 120 // already been demuxed without having the demuxer thread sending the |
| 121 // buffers. |lock_| must be acquired before any access to |buffer_queue_|, | 121 // buffers. |lock_| must be acquired before any access to |buffer_queue_|, |
| 122 // |read_queue_|, or |stopped_|. | 122 // |read_queue_|, or |stopped_|. |
| 123 base::Lock lock_; | 123 base::Lock lock_; |
| 124 | 124 |
| 125 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerStream); | 125 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerStream); |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 class MEDIA_EXPORT FFmpegDemuxer : public Demuxer, public FFmpegURLProtocol { | 128 class FFmpegDemuxer : public Demuxer, public FFmpegURLProtocol { |
| 129 public: | 129 public: |
| 130 explicit FFmpegDemuxer(MessageLoop* message_loop); | 130 explicit FFmpegDemuxer(MessageLoop* message_loop); |
| 131 virtual ~FFmpegDemuxer(); | 131 virtual ~FFmpegDemuxer(); |
| 132 | 132 |
| 133 // Posts a task to perform additional demuxing. | 133 // Posts a task to perform additional demuxing. |
| 134 virtual void PostDemuxTask(); | 134 virtual void PostDemuxTask(); |
| 135 | 135 |
| 136 void Initialize( | 136 void Initialize( |
| 137 DataSource* data_source, PipelineStatusCallback* callback); | 137 DataSource* data_source, PipelineStatusCallback* callback); |
| 138 | 138 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // starting clock value to match the timestamps in the media file. Default | 254 // starting clock value to match the timestamps in the media file. Default |
| 255 // is 0. | 255 // is 0. |
| 256 base::TimeDelta start_time_; | 256 base::TimeDelta start_time_; |
| 257 | 257 |
| 258 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); | 258 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
| 259 }; | 259 }; |
| 260 | 260 |
| 261 } // namespace media | 261 } // namespace media |
| 262 | 262 |
| 263 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 263 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
| OLD | NEW |