Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(857)

Unified Diff: media/filters/ffmpeg_demuxer.h

Issue 10704142: Merge 143765 - Ensure media's buffered ranges always have a range that includes currentTime. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/dummy_demuxer.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « media/filters/dummy_demuxer.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698