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

Side by Side Diff: chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc

Issue 1786733004: Revert of media config: expand is_encrypted to a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chromecast/media/cma/backend/audio_decoder_default.h" 10 #include "chromecast/media/cma/backend/audio_decoder_default.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void SetUp() override { 59 void SetUp() override {
60 scoped_ptr<MediaPipelineBackendDefault> backend = 60 scoped_ptr<MediaPipelineBackendDefault> backend =
61 make_scoped_ptr(new MediaPipelineBackendDefault()); 61 make_scoped_ptr(new MediaPipelineBackendDefault());
62 pipeline_backend_ = backend.get(); 62 pipeline_backend_ = backend.get();
63 media_pipeline_.Initialize(kLoadTypeURL, std::move(backend)); 63 media_pipeline_.Initialize(kLoadTypeURL, std::move(backend));
64 64
65 if (::testing::get<0>(GetParam())) { 65 if (::testing::get<0>(GetParam())) {
66 ::media::AudioDecoderConfig audio_config( 66 ::media::AudioDecoderConfig audio_config(
67 ::media::kCodecMP3, ::media::kSampleFormatS16, 67 ::media::kCodecMP3, ::media::kSampleFormatS16,
68 ::media::CHANNEL_LAYOUT_STEREO, 44100, ::media::EmptyExtraData(), 68 ::media::CHANNEL_LAYOUT_STEREO, 44100, ::media::EmptyExtraData(),
69 ::media::Unencrypted()); 69 false);
70 AvPipelineClient client; 70 AvPipelineClient client;
71 client.eos_cb = base::Bind(&AudioVideoPipelineImplTest::OnEos, 71 client.eos_cb = base::Bind(&AudioVideoPipelineImplTest::OnEos,
72 base::Unretained(this), STREAM_AUDIO); 72 base::Unretained(this), STREAM_AUDIO);
73 ::media::PipelineStatus status = media_pipeline_.InitializeAudio( 73 ::media::PipelineStatus status = media_pipeline_.InitializeAudio(
74 audio_config, client, CreateFrameProvider()); 74 audio_config, client, CreateFrameProvider());
75 ASSERT_EQ(::media::PIPELINE_OK, status); 75 ASSERT_EQ(::media::PIPELINE_OK, status);
76 } 76 }
77 if (::testing::get<1>(GetParam())) { 77 if (::testing::get<1>(GetParam())) {
78 std::vector<::media::VideoDecoderConfig> video_configs; 78 std::vector<::media::VideoDecoderConfig> video_configs;
79 video_configs.push_back(::media::VideoDecoderConfig( 79 video_configs.push_back(::media::VideoDecoderConfig(
80 ::media::kCodecH264, ::media::H264PROFILE_MAIN, 80 ::media::kCodecH264, ::media::H264PROFILE_MAIN,
81 ::media::PIXEL_FORMAT_I420, ::media::COLOR_SPACE_UNSPECIFIED, 81 ::media::PIXEL_FORMAT_I420, ::media::COLOR_SPACE_UNSPECIFIED,
82 gfx::Size(640, 480), gfx::Rect(0, 0, 640, 480), gfx::Size(640, 480), 82 gfx::Size(640, 480), gfx::Rect(0, 0, 640, 480), gfx::Size(640, 480),
83 ::media::EmptyExtraData(), ::media::Unencrypted())); 83 ::media::EmptyExtraData(), false));
84 VideoPipelineClient client; 84 VideoPipelineClient client;
85 client.av_pipeline_client.eos_cb = 85 client.av_pipeline_client.eos_cb =
86 base::Bind(&AudioVideoPipelineImplTest::OnEos, base::Unretained(this), 86 base::Bind(&AudioVideoPipelineImplTest::OnEos, base::Unretained(this),
87 STREAM_VIDEO); 87 STREAM_VIDEO);
88 ::media::PipelineStatus status = media_pipeline_.InitializeVideo( 88 ::media::PipelineStatus status = media_pipeline_.InitializeVideo(
89 video_configs, client, CreateFrameProvider()); 89 video_configs, client, CreateFrameProvider());
90 ASSERT_EQ(::media::PIPELINE_OK, status); 90 ASSERT_EQ(::media::PIPELINE_OK, status);
91 } 91 }
92 } 92 }
93 93
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 // Test all three types of pipeline: audio-only, video-only, audio-video. 208 // Test all three types of pipeline: audio-only, video-only, audio-video.
209 INSTANTIATE_TEST_CASE_P( 209 INSTANTIATE_TEST_CASE_P(
210 MediaPipelineImplTests, 210 MediaPipelineImplTests,
211 AudioVideoPipelineImplTest, 211 AudioVideoPipelineImplTest,
212 ::testing::Values(AudioVideoTuple(true, false), // Audio only. 212 ::testing::Values(AudioVideoTuple(true, false), // Audio only.
213 AudioVideoTuple(false, true), // Video only. 213 AudioVideoTuple(false, true), // Video only.
214 AudioVideoTuple(true, true))); // Audio and Video. 214 AudioVideoTuple(true, true))); // Audio and Video.
215 215
216 } // namespace media 216 } // namespace media
217 } // namespace chromecast 217 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/media/cma/pipeline/audio_decoder_software_wrapper.cc ('k') | chromecast/media/cma/test/mock_frame_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698