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

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: Move CanPlay tests into _mp4 test case Created 5 years 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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_RECORDED); 329 InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_RECORDED);
330 330
331 scoped_refptr<DecoderBuffer> buffer = 331 scoped_refptr<DecoderBuffer> buffer =
332 ReadTestDataFile("bear-640x360-non_square_pixel-with_pasp.mp4"); 332 ReadTestDataFile("bear-640x360-non_square_pixel-with_pasp.mp4");
333 333
334 EXPECT_MEDIA_LOG(VideoCodecLog("avc1.6401e")); 334 EXPECT_MEDIA_LOG(VideoCodecLog("avc1.6401e"));
335 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512)); 335 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
336 EXPECT_EQ(gfx::Size(639, 360), video_decoder_config_.natural_size()); 336 EXPECT_EQ(gfx::Size(639, 360), video_decoder_config_.natural_size());
337 } 337 }
338 338
339 #if defined(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
340 TEST_F(MP4StreamParserTest, DemuxingAC3) {
341 std::set<int> audio_object_types;
342 audio_object_types.insert(kAC3);
343 parser_.reset(new MP4StreamParser(audio_object_types, false));
344 ParseMP4File("bear-ac3-frag.mp4", 512);
345 }
346
347 TEST_F(MP4StreamParserTest, DemuxingEAC3) {
348 std::set<int> audio_object_types;
349 audio_object_types.insert(kEAC3);
350 parser_.reset(new MP4StreamParser(audio_object_types, false));
351 ParseMP4File("bear-eac3-frag.mp4", 512);
352 }
353 #endif
354
339 } // namespace mp4 355 } // namespace mp4
340 } // namespace media 356 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698