Closed Bug 1549406 Opened 5 years ago Closed 5 years ago

Refactor mp4 SampleIterator::GetNext and break out crypto scheme detection into its own function

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: bryce, Assigned: bryce)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Refactor out the crypto detection code for SampleIterator::GetNext. This will help reduce the amount of crypto code in GetNext. It also allows us to separate the the logic for scheme discovery from the logic of loading the crypto information for the current sample. These two steps are closely related, but separating them makes each step easier to understand and to modify.

This is a refactor of the encryption scheme detection used in Index.cpp aside
from one additional check: the new function verifies that if sample group
information is present that it is consistent with other encryption information.

Introduce a new function that contains all the logic to detect the encryption
scheme used for the current sample. This helps separate the logic of scheme
detection from setting scheme specific data on the current sample. This makes
the steps easier to understand and change in isolation.

This function returns a result, with failure cases containing a string
explaining the error. This is motivated by being able to log or surface the
error for failure cases. Logging is not yet implemented, but will be in bug
1547328.

Driveby add comment documenting GetSampleEncryptionEntry.

Driveby adjust include order to match Mozilla/Google style.

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:bryce, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(bvandyk)

Thanks bot. Am waiting to land some other patches in this area before this one in order to make rebasing and possible uplifts easier.

Flags: needinfo?(bvandyk)
Pushed by bvandyk@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/109bfe01148e
Break out logic to determine encryption scheme for mp4s. r=jya
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: