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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // Converts an FFmpeg stream timestamp into a base::TimeDelta. | 107 // Converts an FFmpeg stream timestamp into a base::TimeDelta. |
108 static base::TimeDelta ConvertStreamTimestamp(const AVRational& time_base, | 108 static base::TimeDelta ConvertStreamTimestamp(const AVRational& time_base, |
109 int64 timestamp); | 109 int64 timestamp); |
110 | 110 |
111 FFmpegDemuxer* demuxer_; | 111 FFmpegDemuxer* demuxer_; |
112 AVStream* stream_; | 112 AVStream* stream_; |
113 AudioDecoderConfig audio_config_; | 113 AudioDecoderConfig audio_config_; |
114 VideoDecoderConfig video_config_; | 114 VideoDecoderConfig video_config_; |
115 Type type_; | 115 Type type_; |
116 base::TimeDelta duration_; | 116 base::TimeDelta duration_; |
117 bool discontinuous_; | |
118 bool stopped_; | 117 bool stopped_; |
119 base::TimeDelta last_packet_timestamp_; | 118 base::TimeDelta last_packet_timestamp_; |
120 Ranges<base::TimeDelta> buffered_ranges_; | 119 Ranges<base::TimeDelta> buffered_ranges_; |
121 | 120 |
122 typedef std::deque<scoped_refptr<DecoderBuffer> > BufferQueue; | 121 typedef std::deque<scoped_refptr<DecoderBuffer> > BufferQueue; |
123 BufferQueue buffer_queue_; | 122 BufferQueue buffer_queue_; |
124 | 123 |
125 typedef std::deque<ReadCB> ReadQueue; | 124 typedef std::deque<ReadCB> ReadQueue; |
126 ReadQueue read_queue_; | 125 ReadQueue read_queue_; |
127 | 126 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 // Set if we know duration of the audio stream. Used when processing end of | 260 // Set if we know duration of the audio stream. Used when processing end of |
262 // stream -- at this moment we definitely know duration. | 261 // stream -- at this moment we definitely know duration. |
263 bool duration_known_; | 262 bool duration_known_; |
264 | 263 |
265 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); | 264 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
266 }; | 265 }; |
267 | 266 |
268 } // namespace media | 267 } // namespace media |
269 | 268 |
270 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 269 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
OLD | NEW |