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

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

Issue 1447533006: media: Pass SetCdmReadyCB in {Audio|Video}Decoder::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « media/filters/audio_decoder_selector_unittest.cc ('k') | media/filters/decoder_selector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <deque> 5 #include <deque>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/md5.h" 10 #include "base/md5.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 InitializeDecoder(config); 163 InitializeDecoder(config);
164 } 164 }
165 165
166 void InitializeDecoder(const AudioDecoderConfig& config) { 166 void InitializeDecoder(const AudioDecoderConfig& config) {
167 InitializeDecoderWithResult(config, true); 167 InitializeDecoderWithResult(config, true);
168 } 168 }
169 169
170 void InitializeDecoderWithResult(const AudioDecoderConfig& config, 170 void InitializeDecoderWithResult(const AudioDecoderConfig& config,
171 bool success) { 171 bool success) {
172 decoder_->Initialize( 172 decoder_->Initialize(
173 config, NewExpectedBoolCB(success), 173 config, SetCdmReadyCB(), NewExpectedBoolCB(success),
174 base::Bind(&AudioDecoderTest::OnDecoderOutput, base::Unretained(this))); 174 base::Bind(&AudioDecoderTest::OnDecoderOutput, base::Unretained(this)));
175 base::RunLoop().RunUntilIdle(); 175 base::RunLoop().RunUntilIdle();
176 } 176 }
177 177
178 void Decode() { 178 void Decode() {
179 AVPacket packet; 179 AVPacket packet;
180 ASSERT_TRUE(reader_->ReadPacketForTesting(&packet)); 180 ASSERT_TRUE(reader_->ReadPacketForTesting(&packet));
181 181
182 // Split out packet metadata before making a copy. 182 // Split out packet metadata before making a copy.
183 av_packet_split_side_data(&packet); 183 av_packet_split_side_data(&packet);
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 }; 524 };
525 525
526 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest, 526 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest,
527 AudioDecoderTest, 527 AudioDecoderTest,
528 testing::ValuesIn(kFFmpegTests)); 528 testing::ValuesIn(kFFmpegTests));
529 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest, 529 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest,
530 FFmpegAudioDecoderBehavioralTest, 530 FFmpegAudioDecoderBehavioralTest,
531 testing::ValuesIn(kFFmpegBehavioralTest)); 531 testing::ValuesIn(kFFmpegBehavioralTest));
532 532
533 } // namespace media 533 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/audio_decoder_selector_unittest.cc ('k') | media/filters/decoder_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698