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

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 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 (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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <deque> 9 #include <deque>
10 #include <string> 10 #include <string>
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 ASSERT_TRUE(video); 1125 ASSERT_TRUE(video);
1126 1126
1127 video->Read(NewReadCB(FROM_HERE, 3569, 66733, true)); 1127 video->Read(NewReadCB(FROM_HERE, 3569, 66733, true));
1128 message_loop_.Run(); 1128 message_loop_.Run();
1129 1129
1130 video->Read(NewReadCB(FROM_HERE, 1042, 200200, false)); 1130 video->Read(NewReadCB(FROM_HERE, 1042, 200200, false));
1131 message_loop_.Run(); 1131 message_loop_.Run();
1132 } 1132 }
1133 #endif 1133 #endif
1134 1134
1135 #if defined(ENABLE_AC3_EAC3_AUDIO_DEMUXING)
1136 TEST_F(FFmpegDemuxerTest, Read_AC3_Audio) {
1137 CreateDemuxer("bear-ac3-only-frag.mp4");
1138 InitializeDemuxer();
1139
1140 // Attempt a read from the audio stream and run the message loop until done.
1141 DemuxerStream* audio = demuxer_->GetStream(DemuxerStream::AUDIO);
1142
1143 // Read the first two frames and check that we are getting expected data
1144 audio->Read(NewReadCB(FROM_HERE, 834, 0, true));
1145 message_loop_.Run();
1146
1147 audio->Read(NewReadCB(FROM_HERE, 836, 34830, true));
1148 message_loop_.Run();
1149 }
1150
1151 TEST_F(FFmpegDemuxerTest, Read_EAC3_Audio) {
1152 CreateDemuxer("bear-eac3-only-frag.mp4");
1153 InitializeDemuxer();
1154
1155 // Attempt a read from the audio stream and run the message loop until done.
1156 DemuxerStream* audio = demuxer_->GetStream(DemuxerStream::AUDIO);
1157
1158 // Read the first two frames and check that we are getting expected data
1159 audio->Read(NewReadCB(FROM_HERE, 870, 0, true));
1160 message_loop_.Run();
1161
1162 audio->Read(NewReadCB(FROM_HERE, 872, 34830, true));
1163 message_loop_.Run();
1164 }
1165 #endif // ENABLE_AC3_EAC3_AUDIO_DEMUXING
1166
1135 } // namespace media 1167 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698