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

Side by Side Diff: chromecast/media/audio/cast_audio_output_stream_unittest.cc

Issue 1490613005: media config: expand is_encrypted to a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more ddorwin comments Created 4 years, 9 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 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
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_FALSE(audio_config.encryption_scheme.is_encrypted());
389 389
390 CloseStream(stream); 390 CloseStream(stream);
391 } 391 }
392 } 392 }
393 393
394 TEST_F(CastAudioOutputStreamTest, ChannelLayout) { 394 TEST_F(CastAudioOutputStreamTest, ChannelLayout) {
395 ::media::ChannelLayout layout[] = {::media::CHANNEL_LAYOUT_MONO, 395 ::media::ChannelLayout layout[] = {::media::CHANNEL_LAYOUT_MONO,
396 ::media::CHANNEL_LAYOUT_STEREO}; 396 ::media::CHANNEL_LAYOUT_STEREO};
397 for (size_t i = 0; i < arraysize(layout); ++i) { 397 for (size_t i = 0; i < arraysize(layout); ++i) {
398 channel_layout_ = layout[i]; 398 channel_layout_ = layout[i];
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 TEST_F(CastAudioOutputStreamTest, CloseWithoutStart) { 647 TEST_F(CastAudioOutputStreamTest, CloseWithoutStart) {
648 ::media::AudioOutputStream* stream = CreateStream(); 648 ::media::AudioOutputStream* stream = CreateStream();
649 ASSERT_TRUE(stream); 649 ASSERT_TRUE(stream);
650 ASSERT_TRUE(OpenStream(stream)); 650 ASSERT_TRUE(OpenStream(stream));
651 CloseStream(stream); 651 CloseStream(stream);
652 } 652 }
653 653
654 } // namespace 654 } // namespace
655 } // namespace media 655 } // namespace media
656 } // namespace chromecast 656 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698