Previously we only have one type of CdmContext on each platform, e.g. MediaDrmBridgeCdmContext on Android, and CastCdmContext on Cast. This is still mostly true, but there starts to emerge exceptions. For example, we could use AesDecrytpor in the remote process for testing (e.g. External Clear Key). For another example, we could have adapters/wrappers that wraps the current CdmContext to perform additional tasks. Currently we do have GetClassIdentifier() to prevent casting the wrong type, but this is essentially doing RTTI which is not recommended.
One solution is to change CdmContext to a mega container that can return different types of contexts for different platforms. Current it's already returning Decryptor and CdmProxyContext which is are good examples.
Comment 1 by bugdroid1@chromium.org
, Mar 13 2018