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

Unified Diff: media/base/android/media_source_player.h

Issue 643703009: MediaSourcePlayer: Handle the case where key is added during decoding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | media/base/android/media_source_player.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_source_player.h
diff --git a/media/base/android/media_source_player.h b/media/base/android/media_source_player.h
index 66552667302da76e5b8178d50958150bff11f945..e0922b6aed5a7085ea51c66d3a989dd469ee3778 100644
--- a/media/base/android/media_source_player.h
+++ b/media/base/android/media_source_player.h
@@ -162,6 +162,10 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid,
// Called when new decryption key becomes available.
void OnKeyAdded();
+ // Called to resume playback after NO_KEY is received, but a new key is
+ // available.
+ void ResumePlaybackAfterKeyAdded();
+
// Called when the CDM is detached.
void OnCdmUnset();
@@ -250,6 +254,12 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid,
// try to start playback again.
bool is_waiting_for_key_;
+ // Indicates the situation where new key is added during pending decode
+ // (this variable can only be set when *_decoder_job_->is_decoding()). If this
+ // variable is true and MEDIA_CODEC_NO_KEY is returned then we need to try
+ // decoding again in case the newly added key is the correct decryption key.
+ bool key_added_while_decode_pending_;
+
// Indicates whether the player is waiting for audio or video decoder to be
// created. This could happen if video surface is not available or key is
// not added.
« no previous file with comments | « no previous file | media/base/android/media_source_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698