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

Side by Side Diff: media/filters/ffmpeg_demuxer_unittest.cc

Issue 812643005: Re-add AC3/EAC3 audio demuxing support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code cleanup Created 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <deque> 6 #include <deque>
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 966
967 TEST_F(FFmpegDemuxerTest, Rotate_Metadata_270) { 967 TEST_F(FFmpegDemuxerTest, Rotate_Metadata_270) {
968 CreateDemuxer("bear_rotate_270.mp4"); 968 CreateDemuxer("bear_rotate_270.mp4");
969 InitializeDemuxer(); 969 InitializeDemuxer();
970 970
971 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::VIDEO); 971 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::VIDEO);
972 ASSERT_TRUE(stream); 972 ASSERT_TRUE(stream);
973 ASSERT_EQ(VIDEO_ROTATION_270, stream->video_rotation()); 973 ASSERT_EQ(VIDEO_ROTATION_270, stream->video_rotation());
974 } 974 }
975 975
976 #if defined(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
977 TEST_F(FFmpegDemuxerTest, Read_AC3_Audio) {
978 CreateDemuxer("bear-ac3.mp4");
979 InitializeDemuxer();
980
981 // Attempt a read from the audio stream and run the message loop until done.
982 DemuxerStream* audio = demuxer_->GetStream(DemuxerStream::AUDIO);
983
984 // Read the first two frames and check that we are getting expected data
985 audio->Read(NewReadCB(FROM_HERE, 834, 0, true));
986 message_loop_.Run();
987
988 audio->Read(NewReadCB(FROM_HERE, 836, 34830, true));
989 message_loop_.Run();
990 }
991
992 TEST_F(FFmpegDemuxerTest, Read_EAC3_Audio) {
993 CreateDemuxer("bear-eac3.mp4");
994 InitializeDemuxer();
995
996 // Attempt a read from the audio stream and run the message loop until done.
997 DemuxerStream* audio = demuxer_->GetStream(DemuxerStream::AUDIO);
998
999 // Read the first two frames and check that we are getting expected data
1000 audio->Read(NewReadCB(FROM_HERE, 870, 0, true));
1001 message_loop_.Run();
1002
1003 audio->Read(NewReadCB(FROM_HERE, 872, 34830, true));
1004 message_loop_.Run();
1005 }
1006 #endif
1007
976 #endif 1008 #endif
977 1009
978 } // namespace media 1010 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698