Commit 7047d54c authored by xhwang's avatar xhwang Committed by Commit bot

MediaDrmBridge: Update ConvertInitDataType().

- Update comment about "cenc" and "webm" support.
- Support keyids.

BUG=488759

Review URL: https://codereview.chromium.org/1128143005

Cr-Commit-Position: refs/heads/master@{#330646}
parent 10bd376f
...@@ -56,16 +56,19 @@ const uint8 kWidevineUuid[16] = { ...@@ -56,16 +56,19 @@ const uint8 kWidevineUuid[16] = {
// Convert |init_data_type| to a string supported by MediaDRM. // Convert |init_data_type| to a string supported by MediaDRM.
// "audio"/"video" does not matter, so use "video". // "audio"/"video" does not matter, so use "video".
std::string ConvertInitDataType(media::EmeInitDataType init_data_type) { std::string ConvertInitDataType(media::EmeInitDataType init_data_type) {
// TODO(jrummell): API level >=20 supports "webm" and "cenc", so switch // TODO(jrummell/xhwang): EME init data types like "webm" and "cenc" are
// to those strings. // supported in API level >=21 for Widevine key system. Switch to use those
// strings when they are officially supported in Android for all key systems.
switch (init_data_type) { switch (init_data_type) {
case media::EmeInitDataType::WEBM: case media::EmeInitDataType::WEBM:
return "video/webm"; return "video/webm";
case media::EmeInitDataType::CENC: case media::EmeInitDataType::CENC:
return "video/mp4"; return "video/mp4";
case media::EmeInitDataType::KEYIDS:
return "keyids";
default: default:
NOTREACHED(); NOTREACHED();
return "video/unknown"; return "unknown";
} }
} }
......
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