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

Unified Diff: media/filters/chunk_demuxer.h

Issue 16867010: Move pending seek cancellation logic from ChunkDemuxerStream to ChunkDemuxer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments Created 7 years, 6 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 | « no previous file | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.h
diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h
index e247715fbbb00e0c0f304c89c9231f494d3649ed..f59d6fb9ab944cb3f8ef3a28741bd81efdbec39b 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -62,7 +62,22 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
virtual base::TimeDelta GetStartTime() const OVERRIDE;
// Methods used by an external object to control this demuxer.
+ //
+ // Indicates that a new Seek() call is on its way. Any pending Reads on the
+ // DemuxerStream objects should be aborted immediately inside this call and
+ // future Read calls should return kAborted until the Seek() call occurs.
+ // This method MUST ALWAYS be called before Seek() is called to signal that
+ // the next Seek() call represents the seek point we actually want to return
+ // data for.
void StartWaitingForSeek();
+
+ // Indicates that a Seek() call is on its way, but another seek has been
+ // requested that will override the impending Seek() call. Any pending Reads
+ // on the DemuxerStream objects should be aborted immediately inside this call
+ // and future Read calls should return kAborted until the next
+ // StartWaitingForSeek() call. This method also arranges for the next Seek()
+ // call received before a StartWaitingForSeek() call to immediately call its
+ // callback without waiting for any data.
void CancelPendingSeek();
// Registers a new |id| to use for AppendData() calls. |type| indicates
@@ -176,6 +191,7 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
mutable base::Lock lock_;
State state_;
+ bool cancel_next_seek_;
DemuxerHost* host_;
base::Closure open_cb_;
« no previous file with comments | « no previous file | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698