Currently we use KeySystemSupport [1] on desktop platforms which will return supported (hardware secure) video codecs, supported (hardware secure) encryption schemes, and supported session types.
On Clank we have a similar method QueryKeySystemSupport [2] which also sends and IPC to get supported (secure) codecs (including audio codecs), and supported session types.
We should merge these two paths to avoid code duplication. Here're the list of items to take care of:
- Support audio codecs in KeySystemSupport.
- Currently cdm::AddAndroidWidevine() and QueryKeySystemSupport() lives in components so that it can be used by webview and chromecast. cdm::AddAndroidWidevine() is Widevine specific and should still live in components. But QueryKeySystemSupport() should be replaced by KeySystemSupport, which lives in content/.
- cdm_message_filter_android.cc also lives in components/. But it looks like we can move all the code to content/browser/.
[1] https://cs.chromium.org/chromium/src/content/public/renderer/key_system_support.h
[2] https://cs.chromium.org/search/?q=SupportedKeySystemResponse&sq=package:chromium&type=cs
Comment 1 by xhw...@chromium.org
, Jun 15 2018