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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 void OnOpenContextDone(const PipelineStatusCB& status_cb, bool result); | 190 void OnOpenContextDone(const PipelineStatusCB& status_cb, bool result); |
191 void OnFindStreamInfoDone(const PipelineStatusCB& status_cb, int result); | 191 void OnFindStreamInfoDone(const PipelineStatusCB& status_cb, int result); |
192 | 192 |
193 // FFmpeg callbacks during seeking. | 193 // FFmpeg callbacks during seeking. |
194 void OnSeekFrameDone(const PipelineStatusCB& cb, int result); | 194 void OnSeekFrameDone(const PipelineStatusCB& cb, int result); |
195 | 195 |
196 // FFmpeg callbacks during reading + helper method to initiate reads. | 196 // FFmpeg callbacks during reading + helper method to initiate reads. |
197 void ReadFrameIfNeeded(); | 197 void ReadFrameIfNeeded(); |
198 void OnReadFrameDone(ScopedAVPacket packet, int result); | 198 void OnReadFrameDone(ScopedAVPacket packet, int result); |
199 | 199 |
200 // DataSource callbacks during stopping. | |
201 void OnDataSourceStopped(const base::Closure& callback); | |
202 | |
203 // Returns true iff any stream has additional capacity. Note that streams can | 200 // Returns true iff any stream has additional capacity. Note that streams can |
204 // go over capacity depending on how the file is muxed. | 201 // go over capacity depending on how the file is muxed. |
205 bool StreamsHaveAvailableCapacity(); | 202 bool StreamsHaveAvailableCapacity(); |
206 | 203 |
207 // Returns true if the maximum allowed memory usage has been reached. | 204 // Returns true if the maximum allowed memory usage has been reached. |
208 bool IsMaxMemoryUsageReached() const; | 205 bool IsMaxMemoryUsageReached() const; |
209 | 206 |
210 // Signal all FFmpegDemuxerStreams that the stream has ended. | 207 // Signal all FFmpegDemuxerStreams that the stream has ended. |
211 void StreamHasEnded(); | 208 void StreamHasEnded(); |
212 | 209 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 | 294 |
298 // NOTE: Weak pointers must be invalidated before all other member variables. | 295 // NOTE: Weak pointers must be invalidated before all other member variables. |
299 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; | 296 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; |
300 | 297 |
301 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); | 298 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
302 }; | 299 }; |
303 | 300 |
304 } // namespace media | 301 } // namespace media |
305 | 302 |
306 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 303 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
OLD | NEW |