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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 base::TimeDelta last_packet_timestamp_; | 120 base::TimeDelta last_packet_timestamp_; |
121 Ranges<base::TimeDelta> buffered_ranges_; | 121 Ranges<base::TimeDelta> buffered_ranges_; |
122 | 122 |
123 typedef std::deque<scoped_refptr<DecoderBuffer> > BufferQueue; | 123 typedef std::deque<scoped_refptr<DecoderBuffer> > BufferQueue; |
124 BufferQueue buffer_queue_; | 124 BufferQueue buffer_queue_; |
125 | 125 |
126 typedef std::deque<ReadCB> ReadQueue; | 126 typedef std::deque<ReadCB> ReadQueue; |
127 ReadQueue read_queue_; | 127 ReadQueue read_queue_; |
128 | 128 |
129 scoped_ptr<FFmpegH264ToAnnexBBitstreamConverter> bitstream_converter_; | 129 scoped_ptr<FFmpegH264ToAnnexBBitstreamConverter> bitstream_converter_; |
| 130 bool bitstream_converter_enabled_; |
130 | 131 |
131 // Used to synchronize access to |buffer_queue_|, |read_queue_|, and | 132 // Used to synchronize access to |buffer_queue_|, |read_queue_|, and |
132 // |stopped_|. This is so other threads can get access to buffers that have | 133 // |stopped_|. This is so other threads can get access to buffers that have |
133 // already been demuxed without having the demuxer thread sending the | 134 // already been demuxed without having the demuxer thread sending the |
134 // buffers. |lock_| must be acquired before any access to |buffer_queue_|, | 135 // buffers. |lock_| must be acquired before any access to |buffer_queue_|, |
135 // |read_queue_|, or |stopped_|. | 136 // |read_queue_|, or |stopped_|. |
136 mutable base::Lock lock_; | 137 mutable base::Lock lock_; |
137 | 138 |
138 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerStream); | 139 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerStream); |
139 }; | 140 }; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 // Set if we know duration of the audio stream. Used when processing end of | 267 // Set if we know duration of the audio stream. Used when processing end of |
267 // stream -- at this moment we definitely know duration. | 268 // stream -- at this moment we definitely know duration. |
268 bool duration_known_; | 269 bool duration_known_; |
269 | 270 |
270 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); | 271 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
271 }; | 272 }; |
272 | 273 |
273 } // namespace media | 274 } // namespace media |
274 | 275 |
275 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 276 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
OLD | NEW |