Closed Bug 1313556 Opened 8 years ago Closed 8 years ago

Implement Crypto() for mp4 rust parser

Categories

(Core :: Audio/Video: Playback, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: ayang, Assigned: ayang)

References

Details

Attachments

(2 files)

No description provided.
Assignee: nobody → ayang
Blocks: 1161350
Comment on attachment 8808546 [details] Bug 1313556 - Implement Crypto() for mp4 rust parser. https://reviewboard.mozilla.org/r/91362/#review91450 ::: media/libstagefright/binding/MP4Metadata.cpp:348 (Diff revision 1) > + if (mRustTestMode) { > + MOZ_DIAGNOSTIC_ASSERT(rustCrypto.pssh == crypto.pssh); > + } > +#endif > + > + if (mPreferRust && rustCrypto.pssh == crypto.pssh) { The Rust bits need to be protected by the MOZ_RUST_MP4PARSE define. I wonder if we should always use rustCrypto if mPreferRust; i.e. remove the equality test here? We'll catch mismatches via the assert above. ::: media/libstagefright/binding/MP4Metadata.cpp:679 (Diff revision 1) > + return; > + } > + > + nsTArray<uint8_t> pssh; > + pssh.AppendElements(info.data.data, info.data.length, fallible); > + mCrypto.Update(pssh.Elements(), pssh.Length()); Can't we pass info.data.data and info.data.length into mCrypto.Update directly, avoiding the copy into the local pssh array? ::: media/libstagefright/binding/include/mp4_demuxer/DecoderData.h:46 (Diff revision 1) > + > + bool operator==(const PsshInfo& aOther) const { > + if (uuid != aOther.uuid || data != aOther.data) { > + return false; > + } > + return true; This could just be return uuid == aOther.uuid && data == aOther.data;
Attachment #8808546 - Flags: review?(kinetik) → review+
Comment on attachment 8808546 [details] Bug 1313556 - Implement Crypto() for mp4 rust parser. https://reviewboard.mozilla.org/r/91362/#review91450 r+ with a few minor changes required
(In reply to Matthew Gregan [:kinetik] from comment #4) > Comment on attachment 8808546 [details] > Bug 1313556 - Implement Crypto() for mp4 rust parser. > > https://reviewboard.mozilla.org/r/91362/#review91450 > > r+ with a few minor changes required Thanks for review!
Attachment #8809286 - Flags: review?(giles) → review+
Pushed by ayang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3ee624382460 Implement Crypto() for mp4 rust parser. r=kinetik https://hg.mozilla.org/integration/autoland/rev/88e9a1a777f4 update rust parser for pssh parsing. r=rillian
We also need video extra_data and codec_specific_config to play video. I'll fix it in another bug.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Depends on: 1388618
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: