Skip to content

Dev v2 truehd#9415

Closed
g-lass wants to merge 2 commits intogoogle:dev-v2from
DolbyLaboratories:dev-v2-truehd
Closed

Dev v2 truehd#9415
g-lass wants to merge 2 commits intogoogle:dev-v2from
DolbyLaboratories:dev-v2-truehd

Conversation

@g-lass
Copy link
Contributor

@g-lass g-lass commented Sep 9, 2021

Hi

I would like to enable the extraction of Dolby TrueHD streams from ISOBMF files.
For this extraction, I have reused the bundling of 16 access units (referred as samples in MP4 files) introduced with the extraction of Dolby TrueHD from MKV files.

The second commit provides a corresponding MP4 test vector and extraction dumps.

Fragmented MP4 has not been addressed in these commits.

Regards
gael

public final class MlpUtil {

/** The channel count of MLP stream. */
// TODO: Parse MLP stream channel count.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended that this TODO has not been implemented?

Mp4Extractor::new, "media/mp4/sample_with_color_info.mp4", simulationConfig);

@Test
public void mp4SampleWithDolbyTrueHDTrack() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't pass. The changes also seem to have broken test mp4SampleWithAc4Track.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've messed up while rebasing. First a closing bracket } is missing on line 104.

As of the regression on AC4, I have indeed broken it while moving most of the readSample method code into a readSample1 method.
I have now fixed both issues in an updated set of commits.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mp4SampleWithDolbyTrueHDTrack() test still fails when simulating i/o errors but I am not quite sure how to debug this because don't quite understand how i/o errors get injected.

* @return One of the {@code RESULT_*} flags in {@link Extractor}.
* @throws IOException If an error occurs reading from the input.
*/
private int readSample(ExtractorInput input, PositionHolder positionHolder) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method readSample should return as often as possible so it should ideally read only one sample before returning. To avoid that, you can use a rechunker as in the MatroskaExtractor that would check whether sampleMetadata should be called or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that I get it... you mean "don't change the readSample to read 16 samples a time but to issue the metadata only once every 16 samples for TrueHD" ...

I'll try to implement this.

g-lass and others added 2 commits September 20, 2021 16:20
Extract 16 access units per readSample call to align
with what's done in MKV extraction.

Signed-off-by: glass <glass@dolby.com>
Signed-off-by: glass <glass@dolby.com>
@g-lass g-lass closed this Sep 27, 2021
@g-lass g-lass deleted the dev-v2-truehd branch September 27, 2021 13:20
@g-lass
Copy link
Contributor Author

g-lass commented Sep 27, 2021

I have inadvertently deleted the branch while pushing my latest changes upstream....
I have in between "pushed" the branch up again.... but I apparently can't reopen the pull request , can I ?

@g-lass g-lass mentioned this pull request Sep 27, 2021
@google google locked and limited conversation to collaborators Nov 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants