| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // Returns true is this stream has pending reads, false otherwise. | 50 // Returns true is this stream has pending reads, false otherwise. |
| 51 bool HasPendingReads(); | 51 bool HasPendingReads(); |
| 52 | 52 |
| 53 // Enqueues and takes ownership over the given AVPacket. | 53 // Enqueues and takes ownership over the given AVPacket. |
| 54 void EnqueuePacket(AVPacket* packet); | 54 void EnqueuePacket(AVPacket* packet); |
| 55 | 55 |
| 56 // Returns the duration of this stream. | 56 // Returns the duration of this stream. |
| 57 base::TimeDelta duration() { return duration_; } | 57 base::TimeDelta duration() { return duration_; } |
| 58 | 58 |
| 59 // DemuxerStream implementation. | 59 // DemuxerStream implementation. |
| 60 virtual const MediaFormat* GetMediaFormat(); | 60 virtual const MediaFormat& media_format(); |
| 61 virtual void Read(Assignable<Buffer>* buffer); | 61 virtual void Read(Assignable<Buffer>* buffer); |
| 62 | 62 |
| 63 AVStream* av_stream() { | 63 AVStream* av_stream() { |
| 64 return av_stream_; | 64 return av_stream_; |
| 65 } | 65 } |
| 66 | 66 |
| 67 static const char* interface_id(); | 67 static const char* interface_id(); |
| 68 | 68 |
| 69 protected: | 69 protected: |
| 70 virtual void* QueryInterface(const char* interface_id); | 70 virtual void* QueryInterface(const char* interface_id); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // Vector of streams. | 128 // Vector of streams. |
| 129 typedef std::vector< scoped_refptr<FFmpegDemuxerStream> > StreamVector; | 129 typedef std::vector< scoped_refptr<FFmpegDemuxerStream> > StreamVector; |
| 130 StreamVector streams_; | 130 StreamVector streams_; |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); | 132 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 } // namespace media | 135 } // namespace media |
| 136 | 136 |
| 137 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 137 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
| OLD | NEW |