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

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: rebase 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 (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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 ASSERT_TRUE(video); 1121 ASSERT_TRUE(video);
1122 1122
1123 video->Read(NewReadCB(FROM_HERE, 3569, 66733, true)); 1123 video->Read(NewReadCB(FROM_HERE, 3569, 66733, true));
1124 message_loop_.Run(); 1124 message_loop_.Run();
1125 1125
1126 video->Read(NewReadCB(FROM_HERE, 1042, 200200, false)); 1126 video->Read(NewReadCB(FROM_HERE, 1042, 200200, false));
1127 message_loop_.Run(); 1127 message_loop_.Run();
1128 } 1128 }
1129 #endif 1129 #endif
1130 1130
1131 #if defined(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
ddorwin 2016/01/04 23:22:17 Instead, run the tests and ensure they fail gracef
1132 TEST_F(FFmpegDemuxerTest, Read_AC3_Audio) {
1133 CreateDemuxer("bear-ac3-frag.mp4");
1134 InitializeDemuxer();
1135
1136 // Attempt a read from the audio stream and run the message loop until done.
1137 DemuxerStream* audio = demuxer_->GetStream(DemuxerStream::AUDIO);
1138
1139 // Read the first two frames and check that we are getting expected data
1140 audio->Read(NewReadCB(FROM_HERE, 834, 0, true));
1141 message_loop_.Run();
1142
1143 audio->Read(NewReadCB(FROM_HERE, 836, 34830, true));
1144 message_loop_.Run();
1145 }
1146
1147 TEST_F(FFmpegDemuxerTest, Read_EAC3_Audio) {
1148 CreateDemuxer("bear-eac3-frag.mp4");
1149 InitializeDemuxer();
1150
1151 // Attempt a read from the audio stream and run the message loop until done.
1152 DemuxerStream* audio = demuxer_->GetStream(DemuxerStream::AUDIO);
1153
1154 // Read the first two frames and check that we are getting expected data
1155 audio->Read(NewReadCB(FROM_HERE, 870, 0, true));
1156 message_loop_.Run();
1157
1158 audio->Read(NewReadCB(FROM_HERE, 872, 34830, true));
1159 message_loop_.Run();
1160 }
1161 #endif // ENABLE_AC3_EAC3_AUDIO_DEMUXING
1162
1131 } // namespace media 1163 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698