[go: nahoru, domu]

Add ClearKey support with MojoRenderer

ClearKey is software based and requires that the process it runs in
(browser) have access to the content that is being decrypted and
decoded. Since ClearKey communication is accomplished via JSON we would
need to use a JSON parser in an elevated browser process with direct
access to the hardware. This is not acceptable and has been addressed
in this change, which ensures that this decryption and decoding is
always handled in the render process. This change can be broken into two
primary pieces: the DecryptingRenderer and the DecryptingMediaResource.

The DecryptingMediaResource wraps an existing MediaResource and creates
DecryptingDemuxerStreams with any DemuxerStreams the MediaResource
implementation has. This DecryptingMediaResource is then given to the
renderer implementation as a MediaResource implementation which will
then only ever provide clear streams.

The DecryptingRenderer encapsulates a renderer implementation and a
DecryptingMediaResource. This DecryptingRenderer will ensure that the
DecryptingMediaResource is correctly initialized and will simply pass
through most function calls to the renderer implementation.

Bug: 913775
Change-Id: If348cd76328f2dd760751ceae087f0c89496e64b
Reviewed-on: https://chromium-review.googlesource.com/c/1387191
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Commit-Queue: Chad Duffin <chadduffin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620076}
21 files changed