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

Unified Diff: media/filters/decrypting_demuxer_stream.h

Issue 165733002: Add DecryptingDemuxerStream::Stop(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/filters/decrypting_demuxer_stream.h
diff --git a/media/filters/decrypting_demuxer_stream.h b/media/filters/decrypting_demuxer_stream.h
index 4e4cca2237497dedcd737ad14fed7aaf6e3d800a..307bdcbd2bc2689f1cf4e916bbe89dcea0512b0e 100644
--- a/media/filters/decrypting_demuxer_stream.h
+++ b/media/filters/decrypting_demuxer_stream.h
@@ -36,11 +36,20 @@ class MEDIA_EXPORT DecryptingDemuxerStream : public DemuxerStream {
void Initialize(DemuxerStream* stream,
const PipelineStatusCB& status_cb);
- // Cancels all pending operations and fires all pending callbacks. Sets
- // |this| to kUninitialized state if |this| hasn't been initialized, or to
- // kIdle state otherwise.
+ // Cancels all pending operations and fires all pending callbacks. If in
+ // kPendingDemuxerRead or kPendingDecrypt state, waits for the pending
+ // operation to finish before satisfying |closure|. Sets |this| to
ddorwin 2014/02/14 01:55:13 nit: |this| can't be set to kUninitialized
xhwang 2014/02/14 03:00:53 Done.
+ // kUninitialized state if |this| hasn't been initialized, or to kIdle state
+ // otherwise.
void Reset(const base::Closure& closure);
+ // Cancels all pending operations immediately and fires all pending callbacks
+ // and sets |this| to kStopped state. Do NOT wait for any pending operations.
ddorwin 2014/02/14 01:55:13 ditto
ddorwin 2014/02/14 01:55:13 s/Do/Does/
xhwang 2014/02/14 03:00:53 Done.
xhwang 2014/02/14 03:00:53 Done.
+ // Note: During the teardown process, media pipeline will be waiting on the
+ // render main thread. If a Decryptor depends on the render main thread
+ // (e.g. PpapiDecryptor), the pending DecryptCB will not be satisfied.
ddorwin 2014/02/14 01:55:13 s/will/would/?
xhwang 2014/02/14 03:00:53 Done.
+ void Stop(const base::Closure& closure);
+
// DemuxerStream implementation.
virtual void Read(const ReadCB& read_cb) OVERRIDE;
virtual AudioDecoderConfig audio_decoder_config() OVERRIDE;
@@ -60,6 +69,7 @@ class MEDIA_EXPORT DecryptingDemuxerStream : public DemuxerStream {
kPendingDemuxerRead,
kPendingDecrypt,
kWaitingForKey,
+ kStopped
};
// Callback for DecryptorHost::RequestDecryptor().

Powered by Google App Engine
This is Rietveld 408576698