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

Unified Diff: media/base/demuxer.h

Issue 2267963002: Add support for cancellation of demuxer reads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually abort the data. Created 4 years, 4 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
Index: media/base/demuxer.h
diff --git a/media/base/demuxer.h b/media/base/demuxer.h
index 0d2219853240e3e07f1d0c0d3089e84bead79624..3cd5c524f8733f4060e32513da98c00aa706d0f8 100644
--- a/media/base/demuxer.h
+++ b/media/base/demuxer.h
@@ -88,6 +88,11 @@ class MEDIA_EXPORT Demuxer : public DemuxerStreamProvider {
const PipelineStatusCB& status_cb,
bool enable_text_tracks) = 0;
+ // Aborts any pending read operations that the demuxer is involved with; any
+ // read aborted will be aborted with a status of kOk and an EOS buffer to
wolenetz 2016/08/24 23:46:55 Why not re-use kAborted? ISTM even with this patch
DaleCurtis 2016/08/24 23:49:41 Good point, I think this can just be kAborted with
wolenetz 2016/08/24 23:54:18 SGTM. I'll look again at this in the morning. So f
+ // ensure that the process is non fatal to receiving clients.
+ virtual void AbortPendingReads() = 0;
+
// Indicates that a new Seek() call is on its way. Implementations may abort
// pending reads and future Read() calls may return kAborted until Seek() is
// executed. |seek_time| is the presentation timestamp of the new Seek() call.

Powered by Google App Engine
This is Rietveld 408576698