Store SupportedCodecs in KeySystemInfo and KeySystems.
commite4b866463f37f328af7957473007615a0da9e8cb
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 25 Apr 2014 07:34:44 +0000 (25 07:34 +0000)
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 25 Apr 2014 07:34:44 +0000 (25 07:34 +0000)
tree3a12eb1624f742c67b94ffbd8d55c7761e4f7b47
parentdb6659bb3dba39a89560717b5000ad43e64f5944
Store SupportedCodecs in KeySystemInfo and KeySystems.

Previously we convert SupportedCodecs (a uint32 bit mask indicating which
codec is supported) to ContainerCodecMap (a map from a container type to a set
of supported codecs in that container). Then we pass ContainerCodecMap to
KeySystems and store it there for easy look up.

This results in a lot of duplicate converting code. This CL stores
SupportedCodecs in KeySystmeInfo and KeySystems so that we don't need to convert
anything. Then when IsTypeSupported() is called, we find the bit masks for
queried container and codec types and compare it with the SupportedCodecs stored
in KeySystems.

BUG=362769
TEST=All existing tests pass.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266148 0039d316-1c4b-4281-b951-d872f2087c98
android_webview/renderer/aw_key_systems.cc
chrome/browser/media/encrypted_media_message_filter_android.cc
chrome/common/encrypted_media_messages_android.h
chrome/renderer/media/chrome_key_systems.cc
content/content_common.gypi
content/public/common/eme_codec.h [new file with mode: 0644]
content/public/renderer/key_system_info.h
content/renderer/media/crypto/key_systems.cc
content/renderer/media/crypto/key_systems.h
content/renderer/media/crypto/key_systems_unittest.cc