Commit e30a8fab authored by jrummell's avatar jrummell Committed by Commit bot

media: Update logging to indicate that new key has been provided

When playing encrypted media and decrypting stalls due to missing key,
add a message to indicate when a key is added and decryption tries to
start again.

BUG=645304
TEST=checked chrome://media-internals

Review-Url: https://codereview.chromium.org/2334953002
Cr-Commit-Position: refs/heads/master@{#419365}
parent effe3e76
...@@ -278,6 +278,8 @@ void DecryptingAudioDecoder::DeliverFrame( ...@@ -278,6 +278,8 @@ void DecryptingAudioDecoder::DeliverFrame(
if (need_to_try_again_if_nokey_is_returned) { if (need_to_try_again_if_nokey_is_returned) {
// The |state_| is still kPendingDecode. // The |state_| is still kPendingDecode.
MEDIA_LOG(INFO, media_log_) << GetDisplayName()
<< ": key was added, resuming decode";
DecodePendingBuffer(); DecodePendingBuffer();
return; return;
} }
...@@ -320,6 +322,8 @@ void DecryptingAudioDecoder::OnKeyAdded() { ...@@ -320,6 +322,8 @@ void DecryptingAudioDecoder::OnKeyAdded() {
} }
if (state_ == kWaitingForKey) { if (state_ == kWaitingForKey) {
MEDIA_LOG(INFO, media_log_) << GetDisplayName()
<< ": key added, resuming decode";
state_ = kPendingDecode; state_ = kPendingDecode;
DecodePendingBuffer(); DecodePendingBuffer();
} }
......
...@@ -305,6 +305,8 @@ void DecryptingDemuxerStream::DeliverBuffer( ...@@ -305,6 +305,8 @@ void DecryptingDemuxerStream::DeliverBuffer(
if (need_to_try_again_if_nokey) { if (need_to_try_again_if_nokey) {
// The |state_| is still kPendingDecrypt. // The |state_| is still kPendingDecrypt.
MEDIA_LOG(INFO, media_log_) << GetDisplayName()
<< ": key was added, resuming decrypt";
DecryptPendingBuffer(); DecryptPendingBuffer();
return; return;
} }
...@@ -335,6 +337,8 @@ void DecryptingDemuxerStream::OnKeyAdded() { ...@@ -335,6 +337,8 @@ void DecryptingDemuxerStream::OnKeyAdded() {
} }
if (state_ == kWaitingForKey) { if (state_ == kWaitingForKey) {
MEDIA_LOG(INFO, media_log_) << GetDisplayName()
<< ": key added, resuming decrypt";
state_ = kPendingDecrypt; state_ = kPendingDecrypt;
DecryptPendingBuffer(); DecryptPendingBuffer();
} }
......
...@@ -255,6 +255,8 @@ void DecryptingVideoDecoder::DeliverFrame( ...@@ -255,6 +255,8 @@ void DecryptingVideoDecoder::DeliverFrame(
if (need_to_try_again_if_nokey_is_returned) { if (need_to_try_again_if_nokey_is_returned) {
// The |state_| is still kPendingDecode. // The |state_| is still kPendingDecode.
MEDIA_LOG(INFO, media_log_) << GetDisplayName()
<< ": key was added, resuming decode";
DecodePendingBuffer(); DecodePendingBuffer();
return; return;
} }
...@@ -299,6 +301,8 @@ void DecryptingVideoDecoder::OnKeyAdded() { ...@@ -299,6 +301,8 @@ void DecryptingVideoDecoder::OnKeyAdded() {
} }
if (state_ == kWaitingForKey) { if (state_ == kWaitingForKey) {
MEDIA_LOG(INFO, media_log_) << GetDisplayName()
<< ": key added, resuming decode";
state_ = kPendingDecode; state_ = kPendingDecode;
DecodePendingBuffer(); DecodePendingBuffer();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment