Closed
Bug 1022434
Opened 11 years ago
Closed 11 years ago
[EME] Expose decryption data in MP4Samples
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: cpearce, Assigned: ajones)
References
()
Details
Attachments
(1 file, 3 obsolete files)
15.27 KB,
patch
|
cpearce
:
review+
|
Details | Diff | Splinter Review |
Our demuxer must expose the info we'll need to pass to the CDM in order to decrypt MP4 samples.
Reporter | ||
Comment 1•11 years ago
|
||
Specifics here: https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/cenc-format.html
Requirements:
* Each time one or more consecutive PSSH boxes are encountered, the demuxer should concatenate the PSSH boxes and signal the MP4Reader (via a callback say). The MP4Reader will then forward the PSSH boxes (the "initData") onto the EME/JS APIs. PSSH boxes that are not directly following each other should be sent in a separate callback.
* Each MP4Sample needs to either be flagged as non-encrypted, or if it is encrypted, it must have a 16 byte KeyId, and a list of SubsampleEntries. The SubsampleEntries are (roughly) a list of the form [($numClearBytes, $numEncryptedBytes), ...]. See the URL above for more details.
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → ajones
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8441107 -
Attachment is obsolete: true
Reporter | ||
Comment 4•11 years ago
|
||
Comment on attachment 8441827 [details] [diff] [review]
Extract crypto information from MP4 demuxer
Review of attachment 8441827 [details] [diff] [review]:
-----------------------------------------------------------------
::: media/libstagefright/binding/include/mp4_demuxer/DecoderData.h
@@ +25,5 @@
> +{
> + PsshInfo() {}
> + PsshInfo(PsshInfo&& aOther) : uuid(aOther.uuid), data(Move(aOther.data)) {}
> + mozilla::Array<uint8_t, 16> uuid;
> + mozilla::Vector<uint8_t> data;
It would good if you used nsTArray<uint8_t> consistently in the demuxer, it would make handling these easier.
@@ +61,5 @@
> +public:
> + void Update(stagefright::sp<stagefright::MetaData>& aMetaData);
> +
> + mozilla::Vector<size_t> plain_sizes;
> + mozilla::Vector<size_t> encrypted_sizes;
If these values can't be larger than uint32_t, then it would be good if you could use uint32_t instead of size_t here, so that we can copy these inter-process around without having to worry about the sizeof(size_t).
Reporter | ||
Comment 5•11 years ago
|
||
I had to add this stuff on top of ajone's patch to make decryption work.
1. I had to increment the first subsample clear byte offset by the size of the ADTS header added to AAC samples when the ESDS to ADTS conversion is done, otherwise the decryption starts 7 and finishes bytes too early, so the decryption output is garbage.
2. The MPEG4Extractor doesn't extract audio config data for encrypted audio streams, only non encrypted ones. We want it to.
Assignee | ||
Comment 6•11 years ago
|
||
* * *
Bug 1022434 - "[EME] Expose decryption data in MP4Samples" []
Attachment #8457748 -
Flags: review?(cpearce)
Assignee | ||
Updated•11 years ago
|
Attachment #8441827 -
Attachment is obsolete: true
Reporter | ||
Comment 7•11 years ago
|
||
Comment on attachment 8457748 [details] [diff] [review]
Extract crypto information from MP4 demuxer
Review of attachment 8457748 [details] [diff] [review]:
-----------------------------------------------------------------
::: media/libstagefright/binding/include/mp4_demuxer/DecoderData.h
@@ +38,5 @@
> + valid = DoUpdate(aMetaData);
> + }
> +
> + bool valid;
> + mozilla::Vector<PsshInfo> pssh;
nsTArray here too please. There's no need to have two different container types used here.
Attachment #8457748 -
Flags: review?(cpearce) → review+
Assignee | ||
Comment 8•11 years ago
|
||
Keywords: leave-open
Assignee | ||
Comment 9•11 years ago
|
||
Comment 10•11 years ago
|
||
bustage / reasion for the backout was https://tbpl.mozilla.org/php/getParsedLog.php?id=43992329&tree=Mozilla-Inbound
Assignee | ||
Comment 11•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8454261 -
Attachment is obsolete: true
Assignee | ||
Comment 12•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Keywords: leave-open
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/a9d2ca71f904 for build bustage: https://tbpl.mozilla.org/php/getParsedLog.php?id=44069480&tree=Mozilla-Inbound
Flags: needinfo?(ajones)
Assignee | ||
Comment 14•11 years ago
|
||
Here goes nothing....
https://hg.mozilla.org/integration/mozilla-inbound/rev/274a3f27b497
Flags: needinfo?(ajones)
Comment 15•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•