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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // Demuxer implementation. | 190 // Demuxer implementation. |
191 std::string GetDisplayName() const override; | 191 std::string GetDisplayName() const override; |
192 void Initialize(DemuxerHost* host, | 192 void Initialize(DemuxerHost* host, |
193 const PipelineStatusCB& status_cb, | 193 const PipelineStatusCB& status_cb, |
194 bool enable_text_tracks) override; | 194 bool enable_text_tracks) override; |
195 void Stop() override; | 195 void Stop() override; |
196 void Seek(base::TimeDelta time, const PipelineStatusCB& cb) override; | 196 void Seek(base::TimeDelta time, const PipelineStatusCB& cb) override; |
197 base::Time GetTimelineOffset() const override; | 197 base::Time GetTimelineOffset() const override; |
198 DemuxerStream* GetStream(DemuxerStream::Type type) override; | 198 DemuxerStream* GetStream(DemuxerStream::Type type) override; |
199 base::TimeDelta GetStartTime() const override; | 199 base::TimeDelta GetStartTime() const override; |
| 200 int64_t GetMemoryUsage() const override; |
200 | 201 |
201 // Calls |encrypted_media_init_data_cb_| with the initialization data | 202 // Calls |encrypted_media_init_data_cb_| with the initialization data |
202 // encountered in the file. | 203 // encountered in the file. |
203 void OnEncryptedMediaInitData(EmeInitDataType init_data_type, | 204 void OnEncryptedMediaInitData(EmeInitDataType init_data_type, |
204 const std::string& encryption_key_id); | 205 const std::string& encryption_key_id); |
205 | 206 |
206 // Allow FFmpegDemuxerStream to notify us when there is updated information | 207 // Allow FFmpegDemuxerStream to notify us when there is updated information |
207 // about capacity and what buffered data is available. | 208 // about capacity and what buffered data is available. |
208 void NotifyCapacityAvailable(); | 209 void NotifyCapacityAvailable(); |
209 void NotifyBufferingChanged(); | 210 void NotifyBufferingChanged(); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 325 |
325 // NOTE: Weak pointers must be invalidated before all other member variables. | 326 // NOTE: Weak pointers must be invalidated before all other member variables. |
326 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; | 327 base::WeakPtrFactory<FFmpegDemuxer> weak_factory_; |
327 | 328 |
328 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); | 329 DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer); |
329 }; | 330 }; |
330 | 331 |
331 } // namespace media | 332 } // namespace media |
332 | 333 |
333 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ | 334 #endif // MEDIA_FILTERS_FFMPEG_DEMUXER_H_ |
OLD | NEW |