Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: media/formats/mp4/mp4_stream_parser_unittest.cc

Issue 2702803002: media-internals: Remove audio/video codec reporting from mp4 parser (Closed)
Patch Set: comments addressed Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/formats/mp4/hevc.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp4/mp4_stream_parser_unittest.cc
diff --git a/media/formats/mp4/mp4_stream_parser_unittest.cc b/media/formats/mp4/mp4_stream_parser_unittest.cc
index c2168a69b58f01d204db1adea4b910a654905418..ba323793e4f65a549ee39691eec718385ff5a325 100644
--- a/media/formats/mp4/mp4_stream_parser_unittest.cc
+++ b/media/formats/mp4/mp4_stream_parser_unittest.cc
@@ -40,14 +40,6 @@ namespace media {
namespace mp4 {
// Matchers for verifying common media log entry strings.
-MATCHER_P(VideoCodecLog, codec_string, "") {
- return CONTAINS_STRING(arg, "Video codec: " + std::string(codec_string));
-}
-
-MATCHER_P(AudioCodecLog, codec_string, "") {
- return CONTAINS_STRING(arg, "Audio codec: " + std::string(codec_string));
-}
-
MATCHER(SampleEncryptionInfoUnavailableLog, "") {
return CONTAINS_STRING(arg, "Sample encryption info is not available.");
}
@@ -237,16 +229,12 @@ class MP4StreamParserTest : public testing::Test {
TEST_F(MP4StreamParserTest, UnalignedAppend) {
// Test small, non-segment-aligned appends (small enough to exercise
// incremental append system)
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64001F"));
- EXPECT_MEDIA_LOG(AudioCodecLog("mp4a.40.2"));
InitializeParser();
ParseMP4File("bear-1280x720-av_frag.mp4", 512);
}
TEST_F(MP4StreamParserTest, BytewiseAppend) {
// Ensure no incremental errors occur when parsing
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64001F"));
- EXPECT_MEDIA_LOG(AudioCodecLog("mp4a.40.2"));
InitializeParser();
ParseMP4File("bear-1280x720-av_frag.mp4", 1);
}
@@ -254,16 +242,12 @@ TEST_F(MP4StreamParserTest, BytewiseAppend) {
TEST_F(MP4StreamParserTest, MultiFragmentAppend) {
// Large size ensures multiple fragments are appended in one call (size is
// larger than this particular test file)
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64001F"));
- EXPECT_MEDIA_LOG(AudioCodecLog("mp4a.40.2"));
InitializeParser();
ParseMP4File("bear-1280x720-av_frag.mp4", 768432);
}
TEST_F(MP4StreamParserTest, Flush) {
// Flush while reading sample data, then start a new stream.
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64001F")).Times(2);
- EXPECT_MEDIA_LOG(AudioCodecLog("mp4a.40.2")).Times(2);
InitializeParser();
scoped_refptr<DecoderBuffer> buffer =
@@ -276,8 +260,6 @@ TEST_F(MP4StreamParserTest, Flush) {
}
TEST_F(MP4StreamParserTest, Reinitialization) {
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64001F")).Times(2);
- EXPECT_MEDIA_LOG(AudioCodecLog("mp4a.40.2")).Times(2);
InitializeParser();
scoped_refptr<DecoderBuffer> buffer =
@@ -291,8 +273,6 @@ TEST_F(MP4StreamParserTest, Reinitialization) {
}
TEST_F(MP4StreamParserTest, UnknownDuration_V0_AllBitsSet) {
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64001F"));
- EXPECT_MEDIA_LOG(AudioCodecLog("mp4a.40.2"));
InitializeParser();
// 32 bit duration field in mvhd box, all bits set.
ParseMP4File(
@@ -306,8 +286,6 @@ TEST_F(MP4StreamParserTest, MPEG2_AAC_LC) {
std::set<int> audio_object_types;
audio_object_types.insert(kISO_13818_7_AAC_LC);
parser_.reset(new MP4StreamParser(audio_object_types, false));
- EXPECT_MEDIA_LOG(AudioCodecLog("mp4a.67"));
- EXPECT_MEDIA_LOG(AudioCodecLog("mp4a.40.2"));
auto params = GetDefaultInitParametersExpectations();
params.detected_video_track_count = 0;
InitializeParserWithInitParametersExpectations(params);
@@ -316,8 +294,6 @@ TEST_F(MP4StreamParserTest, MPEG2_AAC_LC) {
// Test that a moov box is not always required after Flush() is called.
TEST_F(MP4StreamParserTest, NoMoovAfterFlush) {
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64001F"));
- EXPECT_MEDIA_LOG(AudioCodecLog("mp4a.40.2"));
InitializeParser();
scoped_refptr<DecoderBuffer> buffer =
@@ -350,7 +326,6 @@ TEST_F(MP4StreamParserTest, MissingSampleEncryptionInfo) {
scoped_refptr<DecoderBuffer> buffer =
ReadTestDataFile("bear-1280x720-a_frag-cenc_missing-saiz-saio.mp4");
- EXPECT_MEDIA_LOG(AudioCodecLog("mp4a.40.2")).Times(2);
EXPECT_MEDIA_LOG(SampleEncryptionInfoUnavailableLog());
EXPECT_FALSE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
}
@@ -358,7 +333,6 @@ TEST_F(MP4StreamParserTest, MissingSampleEncryptionInfo) {
// Test a file where all video samples start with an Access Unit
// Delimiter (AUD) NALU.
TEST_F(MP4StreamParserTest, VideoSamplesStartWithAUDs) {
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.4D4028"));
auto params = GetDefaultInitParametersExpectations();
params.detected_audio_track_count = 0;
InitializeParserWithInitParametersExpectations(params);
@@ -368,7 +342,6 @@ TEST_F(MP4StreamParserTest, VideoSamplesStartWithAUDs) {
TEST_F(MP4StreamParserTest, HEVC_in_MP4_container) {
#if BUILDFLAG(ENABLE_HEVC_DEMUXING)
bool expect_success = true;
- EXPECT_MEDIA_LOG(VideoCodecLog("hevc"));
#else
bool expect_success = false;
EXPECT_MEDIA_LOG(ErrorLog("Parse unsupported video format hev1"));
@@ -401,7 +374,6 @@ TEST_F(MP4StreamParserTest, CencWithEncryptionInfoStoredAsAuxDataInMdat) {
scoped_refptr<DecoderBuffer> buffer =
ReadTestDataFile("bear-1280x720-v_frag-cenc.mp4");
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64001F"));
EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
}
@@ -416,7 +388,6 @@ TEST_F(MP4StreamParserTest, CencWithSampleEncryptionBox) {
scoped_refptr<DecoderBuffer> buffer =
ReadTestDataFile("bear-640x360-v_frag-cenc-senc.mp4");
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64001E"));
EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
}
@@ -430,7 +401,6 @@ TEST_F(MP4StreamParserTest, NaturalSizeWithoutPASP) {
scoped_refptr<DecoderBuffer> buffer =
ReadTestDataFile("bear-640x360-non_square_pixel-without_pasp.mp4");
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64001E"));
EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
EXPECT_EQ(gfx::Size(639, 360), video_decoder_config_.natural_size());
}
@@ -445,7 +415,6 @@ TEST_F(MP4StreamParserTest, NaturalSizeWithPASP) {
scoped_refptr<DecoderBuffer> buffer =
ReadTestDataFile("bear-640x360-non_square_pixel-with_pasp.mp4");
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64001E"));
EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
EXPECT_EQ(gfx::Size(639, 360), video_decoder_config_.natural_size());
}
@@ -510,8 +479,6 @@ TEST_F(MP4StreamParserTest, FourCCToString) {
}
TEST_F(MP4StreamParserTest, MediaTrackInfoSourcing) {
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64001F"));
- EXPECT_MEDIA_LOG(AudioCodecLog("mp4a.40.2"));
InitializeParser();
ParseMP4File("bear-1280x720-av_frag.mp4", 4096);
@@ -539,8 +506,6 @@ TEST_F(MP4StreamParserTest, TextTrackDetection) {
scoped_refptr<DecoderBuffer> buffer =
ReadTestDataFile("bear-1280x720-avt_subt_frag.mp4");
- EXPECT_MEDIA_LOG(AudioCodecLog("mp4a.40.2"));
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64001F"));
EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
}
@@ -551,8 +516,6 @@ TEST_F(MP4StreamParserTest, MultiTrackFile) {
params.detected_audio_track_count = 2;
params.detected_video_track_count = 2;
InitializeParserWithInitParametersExpectations(params);
- EXPECT_MEDIA_LOG(VideoCodecLog("avc1.64000D")).Times(2);
- EXPECT_MEDIA_LOG(AudioCodecLog("mp4a.40.2")).Times(2);
ParseMP4File("bbb-320x240-2video-2audio.mp4", 4096);
EXPECT_EQ(media_tracks_->tracks().size(), 4u);
« no previous file with comments | « media/formats/mp4/hevc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698