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

Unified Diff: chromecast/media/cdm/browser_cdm_cast.h

Issue 1407253007: [Chromecast] Allow CMA backend to notify of key expiry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month 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: chromecast/media/cdm/browser_cdm_cast.h
diff --git a/chromecast/media/cdm/browser_cdm_cast.h b/chromecast/media/cdm/browser_cdm_cast.h
index 72fbce2dcd8b03687b8fabeeb1c029cc7abdd5f3..836b4017b5c54068ce3f9c9620af56067d3501d6 100644
--- a/chromecast/media/cdm/browser_cdm_cast.h
+++ b/chromecast/media/cdm/browser_cdm_cast.h
@@ -16,6 +16,7 @@
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner_helpers.h"
#include "base/threading/thread_checker.h"
+#include "chromecast/public/media/cast_key_status.h"
#include "media/base/media_keys.h"
#include "media/base/player_tracker.h"
#include "media/cdm/json_web_key.h"
@@ -62,6 +63,12 @@ class BrowserCdmCast : public ::media::MediaKeys,
virtual scoped_ptr<DecryptContextImpl> GetDecryptContext(
const std::string& key_id) const = 0;
+ // Notifies that key status has changed (e.g. if expiry is detected by
+ // hardware decoder).
+ virtual void SetKeyStatus(const std::string& key_id,
+ CastKeyStatus key_status,
+ uint32_t system_code) = 0;
+
protected:
~BrowserCdmCast() override;
@@ -71,7 +78,11 @@ class BrowserCdmCast : public ::media::MediaKeys,
::media::MediaKeys::MessageType message_type);
void OnSessionClosed(const std::string& session_id);
void OnSessionKeysChange(const std::string& session_id,
- const ::media::KeyIdAndKeyPairs& keys);
+ bool newly_usable_keys,
+ ::media::CdmKeysInfo keys_info);
+
+ void KeyIdAndKeyPairsToInfo(const ::media::KeyIdAndKeyPairs& keys,
+ ::media::CdmKeysInfo* key_info);
private:
friend class BrowserCdmCastUi;

Powered by Google App Engine
This is Rietveld 408576698