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 // |
11 // FFmpegDemuxer sets the duration of pipeline during initialization by using | 11 // FFmpegDemuxer sets the duration of pipeline during initialization by using |
12 // the duration of the longest audio/video stream. | 12 // the duration of the longest audio/video stream. |
13 // | 13 // |
14 // NOTE: since FFmpegDemuxer reads packets sequentially without seeking, media | 14 // NOTE: since FFmpegDemuxer reads packets sequentially without seeking, media |
15 // files with very large drift between audio/video streams may result in | 15 // files with very large drift between audio/video streams may result in |
16 // excessive memory consumption. | 16 // excessive memory consumption. |
17 // | 17 // |
18 // When stopped, FFmpegDemuxer and FFmpegDemuxerStream release all callbacks | 18 // When stopped, FFmpegDemuxer and FFmpegDemuxerStream release all callbacks |
19 // and buffered packets. Reads from a stopped FFmpegDemuxerStream will not be | 19 // and buffered packets. Reads from a stopped FFmpegDemuxerStream will not be |
20 // replied to. | 20 // replied to. |
21 | 21 |
22 #ifndef MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 22 #ifndef MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
23 #define MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 23 #define MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
24 | 24 |
25 #include <string> | 25 #include <string> |
26 #include <utility> | 26 #include <utility> |
27 #include <vector> | 27 #include <vector> |
28 | 28 |
29 #include "base/callback.h" | 29 #include "base/callback.h" |
30 #include "base/gtest_prod_util.h" | |
31 #include "base/memory/scoped_vector.h" | 30 #include "base/memory/scoped_vector.h" |
32 #include "base/threading/thread.h" | 31 #include "base/threading/thread.h" |
33 #include "media/base/audio_decoder_config.h" | 32 #include "media/base/audio_decoder_config.h" |
34 #include "media/base/decoder_buffer.h" | 33 #include "media/base/decoder_buffer.h" |
35 #include "media/base/decoder_buffer_queue.h" | 34 #include "media/base/decoder_buffer_queue.h" |
36 #include "media/base/demuxer.h" | 35 #include "media/base/demuxer.h" |
37 #include "media/base/pipeline.h" | 36 #include "media/base/pipeline.h" |
38 #include "media/base/text_track_config.h" | 37 #include "media/base/text_track_config.h" |
39 #include "media/base/video_decoder_config.h" | 38 #include "media/base/video_decoder_config.h" |
40 #include "media/ffmpeg/ffmpeg_deleters.h" | 39 #include "media/ffmpeg/ffmpeg_deleters.h" |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 309 |
311 // NOTE: Weak pointers must be invalidated before all other member variables. | 310 // NOTE: Weak pointers must be invalidated before all other member variables. |
312 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; | 311 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; |
313 | 312 |
314 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); | 313 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
315 }; | 314 }; |
316 | 315 |
317 } // namespace media | 316 } // namespace media |
318 | 317 |
319 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 318 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
OLD | NEW |