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 "chromecast/media/audio/cast_audio_output_stream.h" | 5 #include "chromecast/media/audio/cast_audio_output_stream.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
378 format_ = format[i]; | 378 format_ = format[i]; |
379 ::media::AudioOutputStream* stream = CreateStream(); | 379 ::media::AudioOutputStream* stream = CreateStream(); |
380 ASSERT_TRUE(stream); | 380 ASSERT_TRUE(stream); |
381 EXPECT_TRUE(OpenStream(stream)); | 381 EXPECT_TRUE(OpenStream(stream)); |
382 | 382 |
383 FakeAudioDecoder* audio_decoder = GetAudio(); | 383 FakeAudioDecoder* audio_decoder = GetAudio(); |
384 ASSERT_TRUE(audio_decoder); | 384 ASSERT_TRUE(audio_decoder); |
385 const AudioConfig& audio_config = audio_decoder->config(); | 385 const AudioConfig& audio_config = audio_decoder->config(); |
386 EXPECT_EQ(kCodecPCM, audio_config.codec); | 386 EXPECT_EQ(kCodecPCM, audio_config.codec); |
387 EXPECT_EQ(kSampleFormatS16, audio_config.sample_format); | 387 EXPECT_EQ(kSampleFormatS16, audio_config.sample_format); |
388 EXPECT_FALSE(audio_config.is_encrypted); | 388 EXPECT_EQ(audio_config.encryption_scheme.mode, |
ddorwin
2016/03/01 02:17:41
Add checks for is_encrypted() and pattern().
dougsteed
2016/03/02 18:07:52
I added inline is_encrypted() check to the chromec
| |
389 EncryptionScheme::kCipherModeNone); | |
389 | 390 |
390 CloseStream(stream); | 391 CloseStream(stream); |
391 } | 392 } |
392 } | 393 } |
393 | 394 |
394 TEST_F(CastAudioOutputStreamTest, ChannelLayout) { | 395 TEST_F(CastAudioOutputStreamTest, ChannelLayout) { |
395 ::media::ChannelLayout layout[] = {::media::CHANNEL_LAYOUT_MONO, | 396 ::media::ChannelLayout layout[] = {::media::CHANNEL_LAYOUT_MONO, |
396 ::media::CHANNEL_LAYOUT_STEREO}; | 397 ::media::CHANNEL_LAYOUT_STEREO}; |
397 for (size_t i = 0; i < arraysize(layout); ++i) { | 398 for (size_t i = 0; i < arraysize(layout); ++i) { |
398 channel_layout_ = layout[i]; | 399 channel_layout_ = layout[i]; |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
647 TEST_F(CastAudioOutputStreamTest, CloseWithoutStart) { | 648 TEST_F(CastAudioOutputStreamTest, CloseWithoutStart) { |
648 ::media::AudioOutputStream* stream = CreateStream(); | 649 ::media::AudioOutputStream* stream = CreateStream(); |
649 ASSERT_TRUE(stream); | 650 ASSERT_TRUE(stream); |
650 ASSERT_TRUE(OpenStream(stream)); | 651 ASSERT_TRUE(OpenStream(stream)); |
651 CloseStream(stream); | 652 CloseStream(stream); |
652 } | 653 } |
653 | 654 |
654 } // namespace | 655 } // namespace |
655 } // namespace media | 656 } // namespace media |
656 } // namespace chromecast | 657 } // namespace chromecast |
OLD | NEW |