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 21 matching lines...) Expand all Loading... |
32 #include "media/base/buffers.h" | 32 #include "media/base/buffers.h" |
33 #include "media/base/demuxer.h" | 33 #include "media/base/demuxer.h" |
34 #include "media/base/pipeline.h" | 34 #include "media/base/pipeline.h" |
35 #include "media/base/video_decoder_config.h" | 35 #include "media/base/video_decoder_config.h" |
36 #include "media/filters/ffmpeg_glue.h" | 36 #include "media/filters/ffmpeg_glue.h" |
37 | 37 |
38 // FFmpeg forward declarations. | 38 // FFmpeg forward declarations. |
39 struct AVFormatContext; | 39 struct AVFormatContext; |
40 struct AVPacket; | 40 struct AVPacket; |
41 struct AVRational; | 41 struct AVRational; |
| 42 struct AVStream; |
42 | 43 |
43 namespace media { | 44 namespace media { |
44 | 45 |
45 class BitstreamConverter; | 46 class BitstreamConverter; |
46 class FFmpegDemuxer; | 47 class FFmpegDemuxer; |
47 | 48 |
48 // Forward declaration for scoped_ptr_malloc. | |
49 class ScopedPtrAVFree; | |
50 | |
51 class FFmpegDemuxerStream : public DemuxerStream { | 49 class FFmpegDemuxerStream : public DemuxerStream { |
52 public: | 50 public: |
53 // Keeps a copy of |demuxer| and initializes itself using information | 51 // Keeps a copy of |demuxer| and initializes itself using information |
54 // inside |stream|. Both parameters must outlive |this|. | 52 // inside |stream|. Both parameters must outlive |this|. |
55 FFmpegDemuxerStream(FFmpegDemuxer* demuxer, AVStream* stream); | 53 FFmpegDemuxerStream(FFmpegDemuxer* demuxer, AVStream* stream); |
56 | 54 |
57 // Returns true is this stream has pending reads, false otherwise. | 55 // Returns true is this stream has pending reads, false otherwise. |
58 // | 56 // |
59 // Safe to call on any thread. | 57 // Safe to call on any thread. |
60 bool HasPendingReads(); | 58 bool HasPendingReads(); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // starting clock value to match the timestamps in the media file. Default | 258 // starting clock value to match the timestamps in the media file. Default |
261 // is 0. | 259 // is 0. |
262 base::TimeDelta start_time_; | 260 base::TimeDelta start_time_; |
263 | 261 |
264 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); | 262 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
265 }; | 263 }; |
266 | 264 |
267 } // namespace media | 265 } // namespace media |
268 | 266 |
269 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 267 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
OLD | NEW |