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

Side by Side Diff: media/cast/receiver/audio_decoder_unittest.cc

Issue 901833004: [Cast] Repurpose CastInitializationStatus for variable frame size support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fixes. Created 5 years, 10 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 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/synchronization/condition_variable.h" 7 #include "base/synchronization/condition_variable.h"
8 #include "base/synchronization/lock.h" 8 #include "base/synchronization/lock.h"
9 #include "base/sys_byteorder.h" 9 #include "base/sys_byteorder.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 28 matching lines...) Expand all
39 // Make sure all threads have stopped before the environment goes away. 39 // Make sure all threads have stopped before the environment goes away.
40 cast_environment_->Shutdown(); 40 cast_environment_->Shutdown();
41 } 41 }
42 42
43 protected: 43 protected:
44 void SetUp() override { 44 void SetUp() override {
45 audio_decoder_.reset(new AudioDecoder(cast_environment_, 45 audio_decoder_.reset(new AudioDecoder(cast_environment_,
46 GetParam().num_channels, 46 GetParam().num_channels,
47 GetParam().sampling_rate, 47 GetParam().sampling_rate,
48 GetParam().codec)); 48 GetParam().codec));
49 CHECK_EQ(STATUS_AUDIO_INITIALIZED, audio_decoder_->InitializationResult()); 49 CHECK_EQ(STATUS_INITIALIZED, audio_decoder_->InitializationResult());
50 50
51 audio_bus_factory_.reset( 51 audio_bus_factory_.reset(
52 new TestAudioBusFactory(GetParam().num_channels, 52 new TestAudioBusFactory(GetParam().num_channels,
53 GetParam().sampling_rate, 53 GetParam().sampling_rate,
54 TestAudioBusFactory::kMiddleANoteFreq, 54 TestAudioBusFactory::kMiddleANoteFreq,
55 0.5f)); 55 0.5f));
56 last_frame_id_ = 0; 56 last_frame_id_ = 0;
57 seen_a_decoded_frame_ = false; 57 seen_a_decoded_frame_ = false;
58 58
59 if (GetParam().codec == CODEC_AUDIO_OPUS) { 59 if (GetParam().codec == CODEC_AUDIO_OPUS) {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 AudioDecoderTestScenarios, 238 AudioDecoderTestScenarios,
239 AudioDecoderTest, 239 AudioDecoderTest,
240 ::testing::Values( 240 ::testing::Values(
241 TestScenario(CODEC_AUDIO_PCM16, 1, 8000), 241 TestScenario(CODEC_AUDIO_PCM16, 1, 8000),
242 TestScenario(CODEC_AUDIO_PCM16, 2, 48000), 242 TestScenario(CODEC_AUDIO_PCM16, 2, 48000),
243 TestScenario(CODEC_AUDIO_OPUS, 1, 8000), 243 TestScenario(CODEC_AUDIO_OPUS, 1, 8000),
244 TestScenario(CODEC_AUDIO_OPUS, 2, 48000))); 244 TestScenario(CODEC_AUDIO_OPUS, 2, 48000)));
245 245
246 } // namespace cast 246 } // namespace cast
247 } // namespace media 247 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698