Closed Bug 1047214 Opened 10 years ago Closed 10 years ago

[EME] Use GMP for decoding EME encrypted streams in <video>

Categories

(Core :: Audio/Video, defect)

29 Branch
x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The EME PDM needs MediaDataDecoders that use the GMP to decrypt and decode.
Attached patch Patch v1Splinter Review
Add MediaDataDecoders that use the GMP for decrypting. This patch is based on top of the patches in dependent bugs.
Attachment #8465962 - Flags: review?(edwin)
Comment on attachment 8465962 [details] [diff] [review] Patch v1 Review of attachment 8465962 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/media/fmp4/eme/EMEAACDecoder.cpp @@ +41,5 @@ > +} > + > +nsresult > +EMEAACDecoder::Init() > +{ That's needs to be: MOZ_ASSERT((mConfig.bits_per_sample / 8) == 2); And yes, trailing whitespace. :P
Comment on attachment 8465962 [details] [diff] [review] Patch v1 Review of attachment 8465962 [details] [diff] [review]: ----------------------------------------------------------------- Just nits. Also trailing whitespace pretty much everywhere. ::: content/media/fmp4/eme/EMEAACDecoder.cpp @@ +41,5 @@ > +} > + > +nsresult > +EMEAACDecoder::Init() > +{ Sync call to GMP thread. Assert IsMainThread(), or at least !IsOnGMPThread(). @@ +103,5 @@ > +} > + > +nsresult > +EMEAACDecoder::Shutdown() > +{ Sync call to GMP thread. Assert IsMainThread(), or at least !IsOnGMPThread(). @@ +218,5 @@ > + tags.AppendElement(NS_LITERAL_CSTRING("aac")); > + tags.AppendElement(NS_ConvertUTF16toUTF8(mProxy->KeySystem())); > + nsresult rv = mMPS->GetGMPAudioDecoder(&tags, > + mProxy->GetOrigin(), > + &mGMP); nit: alignment, here and below. @@ +258,5 @@ > + caps.CallWhenKeyUsable(aSample->crypto.key, task, mGMPThread); > + return NS_OK; > + } > + } > + nsAutoPtr<MP4Sample> autoDelete(aSample); This should be at the top, and forget() called in the !IsKeyUsable case. ::: content/media/fmp4/eme/EMEAACDecoder.h @@ +6,5 @@ > + > +#ifndef EMEAACDecoder_h_ > +#define EMEAACDecoder_h_ > + > + // people.mozilla.org/~cpearce/video/h264_baseline_lvl3.mp4 This can be removed. @@ +39,5 @@ > + virtual nsresult Shutdown() MOZ_OVERRIDE; > + > + // GMPAudioDecoderProxyCallback implementation. > + virtual void Decoded(const nsTArray<int16_t>& aPCM, > + uint64_t aTimeStamp); MOZ_OVERRIDE ::: content/media/fmp4/eme/EMEH264Decoder.cpp @@ +37,5 @@ > +} > + > +nsresult > +EMEH264Decoder::Init() > +{ Assert IsMainThread(), or at least !IsOnGMPThread(). @@ +97,5 @@ > +} > + > +nsresult > +EMEH264Decoder::Shutdown() > +{ Assert IsMainThread(), or at least !IsOnGMPThread(). @@ +268,5 @@ > + } > + } > + > + nsAutoPtr<MP4Sample> autoDelete(aSample); > + This should be at the top, and forget() called in the !IsKeyUsable() case. And whitespace below it. ::: content/media/fmp4/eme/EMEH264Decoder.h @@ +38,5 @@ > + virtual nsresult Drain() MOZ_OVERRIDE; > + virtual nsresult Shutdown() MOZ_OVERRIDE; > + > + // GMPVideoDecoderProxyCallback > + virtual void Decoded(GMPVideoi420Frame* aDecodedFrame); MOZ_OVERRIDE
Attachment #8465962 - Flags: review?(edwin) → review+
(In reply to Edwin Flores [:eflores] [:edwin] from comment #3) > ::: content/media/fmp4/eme/EMEAACDecoder.cpp > @@ +41,5 @@ > > +} > > + > > +nsresult > > +EMEAACDecoder::Init() > > +{ > > Sync call to GMP thread. Assert IsMainThread(), or at least !IsOnGMPThread(). All the MediaDataDecoder overrides run on the decode task queue, so there's no risk to doing sync dispatch to the GMP thread. I will add !IsOnGMPThread() assertions.
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.

Attachment

General

Created:
Updated:
Size: