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

Side by Side Diff: media/formats/mp4/mp4_stream_parser_unittest.cc

Issue 812643005: Re-add AC3/EAC3 audio demuxing support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 10
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_RECORDED); 334 InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_RECORDED);
335 335
336 scoped_refptr<DecoderBuffer> buffer = 336 scoped_refptr<DecoderBuffer> buffer =
337 ReadTestDataFile("bear-640x360-non_square_pixel-with_pasp.mp4"); 337 ReadTestDataFile("bear-640x360-non_square_pixel-with_pasp.mp4");
338 338
339 EXPECT_MEDIA_LOG(VideoCodecLog("avc1.6401e")); 339 EXPECT_MEDIA_LOG(VideoCodecLog("avc1.6401e"));
340 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512)); 340 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
341 EXPECT_EQ(gfx::Size(639, 360), video_decoder_config_.natural_size()); 341 EXPECT_EQ(gfx::Size(639, 360), video_decoder_config_.natural_size());
342 } 342 }
343 343
344 #if defined(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
345 TEST_F(MP4StreamParserTest, DemuxingAC3) {
346 std::set<int> audio_object_types;
347 audio_object_types.insert(kAC3);
348 parser_.reset(new MP4StreamParser(audio_object_types, false));
349 InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_RECORDED);
350 scoped_refptr<DecoderBuffer> buffer =
351 ReadTestDataFile("bear-ac3-only-frag.mp4");
352 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
353 }
354
355 TEST_F(MP4StreamParserTest, DemuxingEAC3) {
356 std::set<int> audio_object_types;
357 audio_object_types.insert(kEAC3);
358 parser_.reset(new MP4StreamParser(audio_object_types, false));
359 InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_RECORDED);
360 scoped_refptr<DecoderBuffer> buffer =
361 ReadTestDataFile("bear-eac3-only-frag.mp4");
362 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
363 }
364 #endif
365
344 } // namespace mp4 366 } // namespace mp4
345 } // namespace media 367 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698