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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 VideoDecoderConfig video_config_; | 122 VideoDecoderConfig video_config_; |
123 Type type_; | 123 Type type_; |
124 base::TimeDelta duration_; | 124 base::TimeDelta duration_; |
125 bool end_of_stream_; | 125 bool end_of_stream_; |
126 base::TimeDelta last_packet_timestamp_; | 126 base::TimeDelta last_packet_timestamp_; |
127 Ranges<base::TimeDelta> buffered_ranges_; | 127 Ranges<base::TimeDelta> buffered_ranges_; |
128 | 128 |
129 DecoderBufferQueue buffer_queue_; | 129 DecoderBufferQueue buffer_queue_; |
130 ReadCB read_cb_; | 130 ReadCB read_cb_; |
131 | 131 |
| 132 #if defined(USE_PROPRIETARY_CODECS) |
132 scoped_ptr<FFmpegH264ToAnnexBBitstreamConverter> bitstream_converter_; | 133 scoped_ptr<FFmpegH264ToAnnexBBitstreamConverter> bitstream_converter_; |
| 134 #endif |
| 135 |
133 bool bitstream_converter_enabled_; | 136 bool bitstream_converter_enabled_; |
134 | 137 |
135 std::string encryption_key_id_; | 138 std::string encryption_key_id_; |
136 | 139 |
137 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerStream); | 140 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerStream); |
138 }; | 141 }; |
139 | 142 |
140 class MEDIA_EXPORT FFmpegDemuxer : public Demuxer { | 143 class MEDIA_EXPORT FFmpegDemuxer : public Demuxer { |
141 public: | 144 public: |
142 FFmpegDemuxer(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 145 FFmpegDemuxer(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 277 |
275 // NOTE: Weak pointers must be invalidated before all other member variables. | 278 // NOTE: Weak pointers must be invalidated before all other member variables. |
276 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; | 279 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; |
277 | 280 |
278 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); | 281 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
279 }; | 282 }; |
280 | 283 |
281 } // namespace media | 284 } // namespace media |
282 | 285 |
283 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 286 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
OLD | NEW |