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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 // point occurs after its associated start time. Otherwise it will use | 272 // point occurs after its associated start time. Otherwise it will use |
273 // |fallback_stream_for_seeking_|. | 273 // |fallback_stream_for_seeking_|. |
274 typedef std::pair<int, base::TimeDelta> StreamSeekInfo; | 274 typedef std::pair<int, base::TimeDelta> StreamSeekInfo; |
275 StreamSeekInfo preferred_stream_for_seeking_; | 275 StreamSeekInfo preferred_stream_for_seeking_; |
276 StreamSeekInfo fallback_stream_for_seeking_; | 276 StreamSeekInfo fallback_stream_for_seeking_; |
277 | 277 |
278 // The Time associated with timestamp 0. Set to a null | 278 // The Time associated with timestamp 0. Set to a null |
279 // time if the file doesn't have an association to Time. | 279 // time if the file doesn't have an association to Time. |
280 base::Time timeline_offset_; | 280 base::Time timeline_offset_; |
281 | 281 |
282 VideoRotation video_rotation_; | |
283 | |
284 // Liveness of the stream. | 282 // Liveness of the stream. |
285 Liveness liveness_; | 283 Liveness liveness_; |
286 | 284 |
287 // Whether text streams have been enabled for this demuxer. | 285 // Whether text streams have been enabled for this demuxer. |
288 bool text_enabled_; | 286 bool text_enabled_; |
289 | 287 |
290 // Set if we know duration of the audio stream. Used when processing end of | 288 // Set if we know duration of the audio stream. Used when processing end of |
291 // stream -- at this moment we definitely know duration. | 289 // stream -- at this moment we definitely know duration. |
292 bool duration_known_; | 290 bool duration_known_; |
293 | 291 |
294 // FFmpegURLProtocol implementation and corresponding glue bits. | 292 // FFmpegURLProtocol implementation and corresponding glue bits. |
295 scoped_ptr<BlockingUrlProtocol> url_protocol_; | 293 scoped_ptr<BlockingUrlProtocol> url_protocol_; |
296 scoped_ptr<FFmpegGlue> glue_; | 294 scoped_ptr<FFmpegGlue> glue_; |
297 | 295 |
298 const NeedKeyCB need_key_cb_; | 296 const NeedKeyCB need_key_cb_; |
299 | 297 |
300 // NOTE: Weak pointers must be invalidated before all other member variables. | 298 // NOTE: Weak pointers must be invalidated before all other member variables. |
301 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; | 299 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; |
302 | 300 |
303 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); | 301 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
304 }; | 302 }; |
305 | 303 |
306 } // namespace media | 304 } // namespace media |
307 | 305 |
308 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 306 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
OLD | NEW |