OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/synchronization/waitable_event.h" | 6 #include "base/synchronization/waitable_event.h" |
7 #include "chromecast/base/metrics/cast_metrics_test_helper.h" | 7 #include "chromecast/base/metrics/cast_metrics_test_helper.h" |
8 #include "chromecast/media/audio/cast_audio_manager.h" | 8 #include "chromecast/media/audio/cast_audio_manager.h" |
9 #include "chromecast/media/audio/cast_audio_output_stream.h" | 9 #include "chromecast/media/audio/cast_audio_output_stream.h" |
10 #include "chromecast/media/base/media_message_loop.h" | 10 #include "chromecast/media/base/media_message_loop.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 format_ = format[i]; | 372 format_ = format[i]; |
373 ::media::AudioOutputStream* stream = CreateStream(); | 373 ::media::AudioOutputStream* stream = CreateStream(); |
374 ASSERT_TRUE(stream); | 374 ASSERT_TRUE(stream); |
375 EXPECT_TRUE(OpenStream(stream)); | 375 EXPECT_TRUE(OpenStream(stream)); |
376 | 376 |
377 FakeAudioDecoder* audio_decoder = GetAudio(); | 377 FakeAudioDecoder* audio_decoder = GetAudio(); |
378 ASSERT_TRUE(audio_decoder); | 378 ASSERT_TRUE(audio_decoder); |
379 const AudioConfig& audio_config = audio_decoder->config(); | 379 const AudioConfig& audio_config = audio_decoder->config(); |
380 EXPECT_EQ(kCodecPCM, audio_config.codec); | 380 EXPECT_EQ(kCodecPCM, audio_config.codec); |
381 EXPECT_EQ(kSampleFormatS16, audio_config.sample_format); | 381 EXPECT_EQ(kSampleFormatS16, audio_config.sample_format); |
382 EXPECT_FALSE(audio_config.is_encrypted); | 382 EXPECT_EQ(audio_config.encryption_scheme.mode, |
| 383 EncryptionScheme::kCipherModeNone); |
383 | 384 |
384 CloseStream(stream); | 385 CloseStream(stream); |
385 } | 386 } |
386 } | 387 } |
387 | 388 |
388 TEST_F(CastAudioOutputStreamTest, ChannelLayout) { | 389 TEST_F(CastAudioOutputStreamTest, ChannelLayout) { |
389 ::media::ChannelLayout layout[] = {::media::CHANNEL_LAYOUT_MONO, | 390 ::media::ChannelLayout layout[] = {::media::CHANNEL_LAYOUT_MONO, |
390 ::media::CHANNEL_LAYOUT_STEREO}; | 391 ::media::CHANNEL_LAYOUT_STEREO}; |
391 for (size_t i = 0; i < arraysize(layout); ++i) { | 392 for (size_t i = 0; i < arraysize(layout); ++i) { |
392 channel_layout_ = layout[i]; | 393 channel_layout_ = layout[i]; |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 TEST_F(CastAudioOutputStreamTest, CloseWithoutStart) { | 642 TEST_F(CastAudioOutputStreamTest, CloseWithoutStart) { |
642 ::media::AudioOutputStream* stream = CreateStream(); | 643 ::media::AudioOutputStream* stream = CreateStream(); |
643 ASSERT_TRUE(stream); | 644 ASSERT_TRUE(stream); |
644 ASSERT_TRUE(OpenStream(stream)); | 645 ASSERT_TRUE(OpenStream(stream)); |
645 CloseStream(stream); | 646 CloseStream(stream); |
646 } | 647 } |
647 | 648 |
648 } // namespace | 649 } // namespace |
649 } // namespace media | 650 } // namespace media |
650 } // namespace chromecast | 651 } // namespace chromecast |
OLD | NEW |