Closed
Bug 1044738
Opened 10 years ago
Closed 10 years ago
[EME] Hook up CDMProxy to a PlatformDecoderModule/MP4Reader
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: cpearce, Assigned: cpearce)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
eflores
:
review+
|
Details | Diff | Splinter Review |
We need a PDM which uses the CDMProxy to decrypt EME content. We can wrap the platforms PDM and use that for decoding the samples decrypted by the CDMProxy.
In future we'll use the CDMProxy for decoding as well.
Based on patch from CDMProxy from bug 1043147, and on Bug 1042373 which landed on m-i today.
Assignee | ||
Comment 1•10 years ago
|
||
* Create a PDM which decorates an existing PDM, and uses the CDMProxy to decrypt the input MP4Samples before sending them to the decorated PDM for decoding.
* Add the various machinery in the rest of the media stack to make it work.
Attachment #8463215 -
Flags: review?(edwin)
Assignee | ||
Comment 2•10 years ago
|
||
Once we have this bug and bug 1043147 and Bug 1042373 landed, we can write a EME GMP for clearkey, and get mochitests going.
Assignee | ||
Updated•10 years ago
|
Summary: Hook up CDMProxy to a PlatformDecoderModule/MP4Reader → [EME] Hook up CDMProxy to a PlatformDecoderModule/MP4Reader
Comment on attachment 8463215 [details] [diff] [review]
Patch v1
Review of attachment 8463215 [details] [diff] [review]:
-----------------------------------------------------------------
Annoyingly spotless. Just a few tiny things.
::: content/media/fmp4/MP4Decoder.cpp
@@ +22,5 @@
> +extern PRLogModuleInfo* GetDemuxerLog();
> +#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
> +#else
> +#define LOG(...)
> +#endif
This isn't used in this file.
@@ +37,5 @@
> +{
> + nsresult rv = MediaDecoder::SetCDMProxy(aProxy);
> + NS_ENSURE_SUCCESS(rv, rv);
> + {
> + // The MP4Reader can't decrypting EME content until it has a CDMProxy,
nit: "can't decrypting"
::: content/media/fmp4/MP4Reader.cpp
@@ +169,5 @@
>
> mLayersBackendType = layerManager->GetCompositorBackendType();
> }
>
> +static bool sSetupPrefCache = false;
Best have this next to its (only) use so it's clear it's only used in the one place.
::: content/media/fmp4/MP4Reader.h
@@ +150,3 @@
> // decoder.
> nsAutoPtr<mp4_demuxer::MP4Sample> mQueuedVideoSample;
> + nsAutoPtr<mp4_demuxer::MP4Sample> mQueuedAudioSample;
mQueuedAudioSample is never assigned.
::: content/media/fmp4/PlatformDecoderModule.h
@@ +66,5 @@
> // This is called on the decode thread.
> static PlatformDecoderModule* Create();
>
> + // Creates a PlatformDecoderModule that uses a CDMProxy to decrypt or
> + // decrypt-and-decode EME encrypted content. If the CDM only decryptr and
nit: "decryptr"
::: content/media/fmp4/eme/EMEDecoderModule.cpp
@@ +184,5 @@
> +}
> +
> +nsresult
> +EMEDecoderModule::Shutdown()
> +{
Assert that we're on main thread.
Attachment #8463215 -
Flags: review?(edwin) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Assignee | ||
Comment 5•10 years ago
|
||
Comment on attachment 8463215 [details] [diff] [review]
Patch v1
Review of attachment 8463215 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/media/fmp4/eme/EMEDecoderModule.cpp
@@ +141,5 @@
> + mTaskQueue->SyncDispatch(
> + NS_NewRunnableMethod(
> + mDecoder,
> + &MediaDataDecoder::Drain));
> + mCallback->DrainComplete();
We should not call DrainComplete() here, we should let the wrapped MediaDataDecoder do that. We can then make the dispatch to MediaDataDecoder::Drain async too then.
Assignee | ||
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•