X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fmedia%2Ffilters%2Fdecrypting_demuxer_stream.h;h=aa9e897f226b0194492b3583cee03a5b333a1a21;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=4e4cca2237497dedcd737ad14fed7aaf6e3d800a;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/media/filters/decrypting_demuxer_stream.h b/src/media/filters/decrypting_demuxer_stream.h index 4e4cca2..aa9e897 100644 --- a/src/media/filters/decrypting_demuxer_stream.h +++ b/src/media/filters/decrypting_demuxer_stream.h @@ -36,11 +36,19 @@ 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 the state to + // kUninitialized if |this| hasn't been initialized, or to kIdle otherwise. void Reset(const base::Closure& closure); + // Cancels all pending operations immediately and fires all pending callbacks + // and sets the state to kStopped. Does NOT wait for any pending operations. + // 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 would not be satisfied. + void Stop(const base::Closure& closure); + // DemuxerStream implementation. virtual void Read(const ReadCB& read_cb) OVERRIDE; virtual AudioDecoderConfig audio_decoder_config() OVERRIDE; @@ -60,6 +68,7 @@ class MEDIA_EXPORT DecryptingDemuxerStream : public DemuxerStream { kPendingDemuxerRead, kPendingDecrypt, kWaitingForKey, + kStopped }; // Callback for DecryptorHost::RequestDecryptor().