Commit 79de8dd7 authored by Matt Wolenetz's avatar Matt Wolenetz Committed by Commit Bot

MSE: Remux noise-xhe-aac.mp4 to correctly mark nonkeyframes

Previous fragmented mux of this test file marked nonkeyframes in input
as keyframes in output. Remux fixes that, though the MOOV's duration and
creation date are cleared, so test is updated to expect the stream to
appear to be "live".

The test is also updated to expect the correct sequence of emitted key
and nonkeyframes.

TEST=MP4StreamParserTest.MPEG_XHE_AAC
BUG=1079034

Change-Id: I9c7fd981fe4cea92e1ff0a90058ea1f10905d996
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2225244
Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org>
Auto-Submit: Matthew Wolenetz <wolenetz@chromium.org>
Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774769}
parent ce1cfd00
...@@ -410,11 +410,16 @@ TEST_F(MP4StreamParserTest, MPEG4_XHE_AAC) { ...@@ -410,11 +410,16 @@ TEST_F(MP4StreamParserTest, MPEG4_XHE_AAC) {
audio_object_types.insert(kISO_14496_3); audio_object_types.insert(kISO_14496_3);
parser_.reset(new MP4StreamParser(audio_object_types, false, false)); parser_.reset(new MP4StreamParser(audio_object_types, false, false));
auto params = GetDefaultInitParametersExpectations(); auto params = GetDefaultInitParametersExpectations();
params.duration = base::TimeDelta::FromMicroseconds(1024000);
params.liveness = DemuxerStream::LIVENESS_RECORDED;
params.detected_video_track_count = 0; params.detected_video_track_count = 0;
InitializeParserWithInitParametersExpectations(params); InitializeParserWithInitParametersExpectations(params);
// This test file contains a single audio keyframe followed by 23
// non-keyframes.
verifying_keyframeness_sequence_ = true;
EXPECT_CALL(*this, ParsedKeyframe());
EXPECT_CALL(*this, ParsedNonKeyframe()).Times(23);
ParseMP4File("noise-xhe-aac.mp4", 512); ParseMP4File("noise-xhe-aac.mp4", 512);
EXPECT_EQ(audio_decoder_config_.profile(), AudioCodecProfile::kXHE_AAC); EXPECT_EQ(audio_decoder_config_.profile(), AudioCodecProfile::kXHE_AAC);
} }
......
...@@ -51,9 +51,13 @@ A truncated audio/video file with audio packet timestamps of -1. We need to ensu ...@@ -51,9 +51,13 @@ A truncated audio/video file with audio packet timestamps of -1. We need to ensu
#### noise-xhe-aac.mp4 #### noise-xhe-aac.mp4
Fragmented mp4 of noise encoded with xHE-AAC, from xHE-AAC samples in [Android Fragmented mp4 of noise encoded with xHE-AAC, from xHE-AAC samples in [Android
CTS](https://android.googlesource.com/platform/cts/+/master/tests/tests/media/res/raw) CTS](https://android.googlesource.com/platform/cts/+/master/tests/tests/media/res/raw),
using ffmpeg version 4.2.2 (where nofillin lets audio nonkeyframes in input be
indicated the same in output, unlike more recent tip-of-tree ffmpeg's operation
with this option) to remux, unfortunately with empty MOOV not giving real
duration:
``` ```
ffmpeg -i noise_2ch_48khz_aot42_19_lufs_mp4.m4a -acodec copy -t 1 noise-xhe-aac.mp4 ffmpeg -fflags nofillin -i noise_2ch_48khz_aot42_19_lufs_mp4.m4a -acodec copy -t 1 -movflags frag_keyframe+empty_moov+default_base_moof noise-xhe-aac.mp4
``` ```
### FLAC ### FLAC
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment