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_video_decoder.cc

Issue 11091005: Update PluginInstance for decrypt-and-decode video. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix a bug in ppp_content_decryptor_private_proxy.cc Created 8 years, 2 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_video_decoder.cc
diff --git a/media/filters/decrypting_video_decoder.cc b/media/filters/decrypting_video_decoder.cc
index 98367b5e17fe16c9ed3c40f453c67e6ac5e88cc8..ad66930745cc6f64687b047c7a1e6e297488dacf 100644
--- a/media/filters/decrypting_video_decoder.cc
+++ b/media/filters/decrypting_video_decoder.cc
@@ -56,6 +56,7 @@ void DecryptingVideoDecoder::Reset(const base::Closure& closure) {
return;
}
+ DVLOG(2) << "Reset() - state: " << state_;
DCHECK(state_ == kIdle ||
state_ == kPendingDemuxerRead ||
state_ == kPendingDecode ||
@@ -95,6 +96,7 @@ void DecryptingVideoDecoder::Stop(const base::Closure& closure) {
return;
}
+ DVLOG(2) << "Stop() - state: " << state_;
DCHECK(stop_cb_.is_null());
stop_cb_ = closure;
@@ -154,6 +156,7 @@ void DecryptingVideoDecoder::DoInitialize(
const scoped_refptr<DemuxerStream>& stream,
const PipelineStatusCB& status_cb,
const StatisticsCB& statistics_cb) {
+ DVLOG(2) << "DoInitialize()";
DCHECK(message_loop_->BelongsToCurrentThread());
DCHECK_EQ(state_, kUninitialized) << state_;
DCHECK(stream);
@@ -184,6 +187,7 @@ void DecryptingVideoDecoder::DoInitialize(
}
void DecryptingVideoDecoder::SetDecryptor(Decryptor* decryptor) {
+ DVLOG(2) << "SetDecryptor()";
DCHECK(message_loop_->BelongsToCurrentThread());
DCHECK_EQ(state_, kDecryptorRequested) << state_;
DCHECK(!init_cb_.is_null());
@@ -207,6 +211,7 @@ void DecryptingVideoDecoder::SetDecryptor(Decryptor* decryptor) {
}
void DecryptingVideoDecoder::FinishInitialization(bool success) {
+ DVLOG(2) << "FinishInitialization()";
DCHECK(message_loop_->BelongsToCurrentThread());
DCHECK_EQ(state_, kPendingDecoderInit) << state_;
DCHECK(!init_cb_.is_null());
@@ -231,6 +236,7 @@ void DecryptingVideoDecoder::FinishInitialization(bool success) {
}
void DecryptingVideoDecoder::DoRead(const ReadCB& read_cb) {
+ DVLOG(3) << "DoRead()";
DCHECK(message_loop_->BelongsToCurrentThread());
DCHECK(state_ == kIdle || state_ == kDecodeFinished) << state_;
DCHECK(!read_cb.is_null());
@@ -271,6 +277,7 @@ void DecryptingVideoDecoder::DecryptAndDecodeBuffer(
void DecryptingVideoDecoder::DoDecryptAndDecodeBuffer(
DemuxerStream::Status status,
const scoped_refptr<DecoderBuffer>& buffer) {
+ DVLOG(3) << "DoDecryptAndDecodeBuffer()";
DCHECK(message_loop_->BelongsToCurrentThread());
DCHECK_EQ(state_, kPendingDemuxerRead) << state_;
DCHECK(!read_cb_.is_null());
@@ -286,8 +293,9 @@ void DecryptingVideoDecoder::DoDecryptAndDecodeBuffer(
}
if (status == DemuxerStream::kAborted) {
- base::ResetAndReturn(&read_cb_).Run(kOk, NULL);
+ DVLOG(2) << "DoDecryptAndDecodeBuffer() - kAborted";
state_ = kIdle;
+ base::ResetAndReturn(&read_cb_).Run(kOk, NULL);
return;
}
@@ -295,6 +303,7 @@ void DecryptingVideoDecoder::DoDecryptAndDecodeBuffer(
// TODO(xhwang): Add config change support.
// The |state_| is chosen to be kDecodeFinished here to be consistent with
// the implementation of FFmpegVideoDecoder.
+ DVLOG(2) << "DoDecryptAndDecodeBuffer() - kConfigChanged";
state_ = kDecodeFinished;
base::ResetAndReturn(&read_cb_).Run(kDecodeError, NULL);
return;
@@ -332,6 +341,7 @@ void DecryptingVideoDecoder::DoDeliverFrame(
int buffer_size,
Decryptor::Status status,
const scoped_refptr<VideoFrame>& frame) {
+ DVLOG(3) << "DoDeliverFrame()";
DCHECK(message_loop_->BelongsToCurrentThread());
DCHECK_EQ(state_, kPendingDecode) << state_;
DCHECK(!read_cb_.is_null());
@@ -389,6 +399,7 @@ void DecryptingVideoDecoder::DoDeliverFrame(
}
void DecryptingVideoDecoder::OnKeyAdded() {
+ DVLOG(2) << "OnKeyAdded()";
DCHECK(message_loop_->BelongsToCurrentThread());
if (state_ == kPendingDecode) {
« no previous file with comments | « no previous file | ppapi/cpp/private/content_decryptor_private.h » ('j') | ppapi/proxy/ppp_content_decryptor_private_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698