feat: add Dolby TrueHD SampleEntry and ConfigurationBox - #568
Open
jamrial wants to merge 1 commit into
Open
Conversation
|
Signed-off-by: James Almer <jamrial@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As the PR subject says, this add supports for Dolby TrueHD specific sample entry and configuration box.
The only issue is that samplerate in MLPSampleEntry, despite being an extension of AudioSampleEntry, is defined as a 32bit unsigned value instead of a 16.16 fixed point value as in the main spec. The idea was to support sample rates higher than 48Khz, but clearly people at Dolby did not realize that the srat box exists for this same purpose, and came up with this hack.
I don't know how to make the aforementioned change.
mp4box.js/src/boxes/sampleentries/base.ts
Line 257 in 9925057
This should somehow check that the class extending AudioSampleEntry is MLPSampleEntry and then parse samplerate in a different way, probably in a similar fashion to the existing isQT check. Do you know how this could be done?
And then
mp4box.js/src/boxes/sampleentries/base.ts
Line 301 in 9925057
Should do the same for writing.