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

Unified Diff: media/filters/pipeline_integration_test_base.cc

Issue 177333003: Add support for midstream audio configuration changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ABS
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: media/filters/pipeline_integration_test_base.cc
diff --git a/media/filters/pipeline_integration_test_base.cc b/media/filters/pipeline_integration_test_base.cc
index 8dce18cc493ab2d5b2752158146b6fea7e35f38f..9dc8aecab12043d6401908908a55ab93ffefe7e6 100644
--- a/media/filters/pipeline_integration_test_base.cc
+++ b/media/filters/pipeline_integration_test_base.cc
@@ -32,7 +32,8 @@ PipelineIntegrationTestBase::PipelineIntegrationTestBase()
new MediaLog())),
ended_(false),
pipeline_status_(PIPELINE_OK),
- last_video_frame_format_(VideoFrame::UNKNOWN) {
+ last_video_frame_format_(VideoFrame::UNKNOWN),
+ hardware_config_(AudioParameters(), AudioParameters()) {
base::MD5Init(&md5_context_);
EXPECT_CALL(*this, OnSetOpaque(true)).Times(AnyNumber());
}
@@ -265,6 +266,13 @@ PipelineIntegrationTestBase::CreateFilterCollection(
audio_decoders.push_back(
new OpusAudioDecoder(message_loop_.message_loop_proxy()));
+ AudioParameters out_params(AudioParameters::AUDIO_PCM_LOW_LATENCY,
+ CHANNEL_LAYOUT_STEREO,
+ 44100,
+ 16,
+ 512);
+ hardware_config_.UpdateOutputConfig(out_params);
+
AudioRendererImpl* audio_renderer_impl = new AudioRendererImpl(
message_loop_.message_loop_proxy(),
(clockless_playback_)
@@ -273,7 +281,8 @@ PipelineIntegrationTestBase::CreateFilterCollection(
audio_decoders.Pass(),
base::Bind(&PipelineIntegrationTestBase::SetDecryptor,
base::Unretained(this),
- decryptor));
+ decryptor),
+ hardware_config_);
// Disable underflow if hashing is enabled.
if (hashing_enabled_) {
audio_sink_->StartAudioHashForTesting();

Powered by Google App Engine
This is Rietveld 408576698