Commit 1da3173d authored by Rintaro Kuroiwa's avatar Rintaro Kuroiwa Committed by Commit Bot

Remove KeyInfo from CdmProxy interface

- Instead set and remove keys one by one.

Bug: 785563
Change-Id: Ib67694a5e38f927a9bb10477b359101c72b799e0
Reviewed-on: https://chromium-review.googlesource.com/804642
Commit-Queue: Rintaro Kuroiwa <rkuroiwa@chromium.org>
Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarJohn Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521581}
parent b550fcc1
...@@ -76,7 +76,6 @@ source_set("cdm") { ...@@ -76,7 +76,6 @@ source_set("cdm") {
"cdm_helpers.h", "cdm_helpers.h",
"cdm_module.cc", "cdm_module.cc",
"cdm_module.h", "cdm_module.h",
"cdm_proxy.cc",
"cdm_proxy.h", "cdm_proxy.h",
"cdm_wrapper.h", "cdm_wrapper.h",
"output_protection.h", "output_protection.h",
......
...@@ -15,21 +15,6 @@ ...@@ -15,21 +15,6 @@
namespace media { namespace media {
// Key information structure containing data necessary to decrypt/decode media.
struct MEDIA_EXPORT CdmProxyKeyInfo {
CdmProxyKeyInfo();
~CdmProxyKeyInfo();
// Crypto session for decryption.
uint32_t crypto_session_id = 0;
// ID of the key.
std::vector<uint8_t> key_id;
// Opaque key blob for decrypting or decoding.
std::vector<uint8_t> key_blob;
// Indicates whether this key/key_id is usable. The caller sets this to false
// to invalidate a key.
bool is_usable_key = true;
};
// A proxy for the CDM. // A proxy for the CDM.
// In general, the interpretation of the method and callback parameters are // In general, the interpretation of the method and callback parameters are
// protocol dependent. For enum parameters, values outside the enum range may // protocol dependent. For enum parameters, values outside the enum range may
...@@ -111,8 +96,19 @@ class MEDIA_EXPORT CdmProxy { ...@@ -111,8 +96,19 @@ class MEDIA_EXPORT CdmProxy {
const std::vector<uint8_t>& input_data, const std::vector<uint8_t>& input_data,
CreateMediaCryptoSessionCB create_media_crypto_session_cb) = 0; CreateMediaCryptoSessionCB create_media_crypto_session_cb) = 0;
// Send multiple key information to the proxy. // Sets a key in the proxy.
virtual void SetKeyInfo(const std::vector<CdmProxyKeyInfo>& key_infos) = 0; // |crypto_session_id| is the crypto session for decryption.
// |key_id| is the ID of the key.
// |key_blob| is the opaque key blob for decrypting or decoding.
virtual void SetKey(uint32_t crypto_session_id,
const std::vector<uint8_t>& key_id,
const std::vector<uint8_t>& key_blob) = 0;
// Removes a key from the proxy.
// |crypto_session_id| is the crypto session for decryption.
// |key_id| is the ID of the key.
virtual void RemoveKey(uint32_t crypto_session_id,
const std::vector<uint8_t>& key_id) = 0;
private: private:
DISALLOW_COPY_AND_ASSIGN(CdmProxy); DISALLOW_COPY_AND_ASSIGN(CdmProxy);
......
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