Index: media/filters/ffmpeg_demuxer.h |
=================================================================== |
--- media/filters/ffmpeg_demuxer.h (revision 145962) |
+++ media/filters/ffmpeg_demuxer.h (working copy) |
@@ -84,6 +84,7 @@ |
virtual void EnableBitstreamConverter() OVERRIDE; |
virtual const AudioDecoderConfig& audio_decoder_config() OVERRIDE; |
virtual const VideoDecoderConfig& video_decoder_config() OVERRIDE; |
+ virtual Ranges<base::TimeDelta> GetBufferedRanges() OVERRIDE; |
// Returns elapsed time based on the already queued packets. |
// Used to determine stream duration when it's not known ahead of time. |
@@ -115,6 +116,8 @@ |
base::TimeDelta duration_; |
bool discontinuous_; |
bool stopped_; |
+ base::TimeDelta last_packet_timestamp_; |
+ Ranges<base::TimeDelta> buffered_ranges_; |
typedef std::deque<scoped_refptr<DecoderBuffer> > BufferQueue; |
BufferQueue buffer_queue_; |
@@ -130,7 +133,7 @@ |
// already been demuxed without having the demuxer thread sending the |
// buffers. |lock_| must be acquired before any access to |buffer_queue_|, |
// |read_queue_|, or |stopped_|. |
- base::Lock lock_; |
+ mutable base::Lock lock_; |
DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxerStream); |
}; |
@@ -165,6 +168,10 @@ |
// Provide access to FFmpegDemuxerStream. |
MessageLoop* message_loop(); |
+ // Allow FFmpegDemuxerStream to notify us when there is updated information |
+ // about what buffered data is available. |
+ void NotifyBufferingChanged(); |
+ |
private: |
// To allow tests access to privates. |
friend class FFmpegDemuxerTest; |