| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 Type type() const override; | 105 Type type() const override; |
| 106 Liveness liveness() const override; | 106 Liveness liveness() const override; |
| 107 void Read(const ReadCB& read_cb) override; | 107 void Read(const ReadCB& read_cb) override; |
| 108 void EnableBitstreamConverter() override; | 108 void EnableBitstreamConverter() override; |
| 109 bool SupportsConfigChanges() override; | 109 bool SupportsConfigChanges() override; |
| 110 AudioDecoderConfig audio_decoder_config() override; | 110 AudioDecoderConfig audio_decoder_config() override; |
| 111 VideoDecoderConfig video_decoder_config() override; | 111 VideoDecoderConfig video_decoder_config() override; |
| 112 VideoRotation video_rotation() override; | 112 VideoRotation video_rotation() override; |
| 113 bool enabled() const override; | 113 bool enabled() const override; |
| 114 void set_enabled(bool enabled, base::TimeDelta timestamp) override; | 114 void set_enabled(bool enabled, base::TimeDelta timestamp) override; |
| 115 void SetStreamRestartedCB(const StreamRestartedCB& cb) override; | 115 void SetStreamStatusChangeCB(const StreamStatusChangeCB& cb) override; |
| 116 | 116 |
| 117 void SetLiveness(Liveness liveness); | 117 void SetLiveness(Liveness liveness); |
| 118 | 118 |
| 119 // Returns the range of buffered data in this stream. | 119 // Returns the range of buffered data in this stream. |
| 120 Ranges<base::TimeDelta> GetBufferedRanges() const; | 120 Ranges<base::TimeDelta> GetBufferedRanges() const; |
| 121 | 121 |
| 122 // Returns elapsed time based on the already queued packets. | 122 // Returns elapsed time based on the already queued packets. |
| 123 // Used to determine stream duration when it's not known ahead of time. | 123 // Used to determine stream duration when it's not known ahead of time. |
| 124 base::TimeDelta GetElapsedTime() const; | 124 base::TimeDelta GetElapsedTime() const; |
| 125 | 125 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 bool end_of_stream_; | 172 bool end_of_stream_; |
| 173 base::TimeDelta last_packet_timestamp_; | 173 base::TimeDelta last_packet_timestamp_; |
| 174 base::TimeDelta last_packet_duration_; | 174 base::TimeDelta last_packet_duration_; |
| 175 Ranges<base::TimeDelta> buffered_ranges_; | 175 Ranges<base::TimeDelta> buffered_ranges_; |
| 176 VideoRotation video_rotation_; | 176 VideoRotation video_rotation_; |
| 177 bool is_enabled_; | 177 bool is_enabled_; |
| 178 bool waiting_for_keyframe_; | 178 bool waiting_for_keyframe_; |
| 179 | 179 |
| 180 DecoderBufferQueue buffer_queue_; | 180 DecoderBufferQueue buffer_queue_; |
| 181 ReadCB read_cb_; | 181 ReadCB read_cb_; |
| 182 StreamRestartedCB stream_restarted_cb_; | 182 StreamStatusChangeCB stream_status_change_cb_; |
| 183 | 183 |
| 184 #if defined(USE_PROPRIETARY_CODECS) | 184 #if defined(USE_PROPRIETARY_CODECS) |
| 185 std::unique_ptr<FFmpegBitstreamConverter> bitstream_converter_; | 185 std::unique_ptr<FFmpegBitstreamConverter> bitstream_converter_; |
| 186 #endif | 186 #endif |
| 187 | 187 |
| 188 std::string encryption_key_id_; | 188 std::string encryption_key_id_; |
| 189 bool fixup_negative_timestamps_; | 189 bool fixup_negative_timestamps_; |
| 190 | 190 |
| 191 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerStream); | 191 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerStream); |
| 192 }; | 192 }; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 350 |
| 351 // NOTE: Weak pointers must be invalidated before all other member variables. | 351 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 352 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; | 352 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; |
| 353 | 353 |
| 354 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); | 354 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
| 355 }; | 355 }; |
| 356 | 356 |
| 357 } // namespace media | 357 } // namespace media |
| 358 | 358 |
| 359 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 359 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
| OLD | NEW |