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

Unified Diff: media/test/pipeline_integration_test_base.cc

Issue 1942803002: Caching AudioOutputDevice instances in mixer manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make WebAudioSourceProvider to always return real sink info reguardless the client - to avoid behavior change. Created 4 years, 7 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
« no previous file with comments | « media/test/pipeline_integration_test_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/pipeline_integration_test_base.cc
diff --git a/media/test/pipeline_integration_test_base.cc b/media/test/pipeline_integration_test_base.cc
index 38421836760246804bb5119158a2244a1c4d3cac..003ce5e5c47d975618fba048693c23d3e6d2493c 100644
--- a/media/test/pipeline_integration_test_base.cc
+++ b/media/test/pipeline_integration_test_base.cc
@@ -48,8 +48,7 @@ PipelineIntegrationTestBase::PipelineIntegrationTestBase()
ended_(false),
pipeline_status_(PIPELINE_OK),
last_video_frame_format_(PIXEL_FORMAT_UNKNOWN),
- last_video_frame_color_space_(COLOR_SPACE_UNSPECIFIED),
- hardware_config_(AudioParameters(), AudioParameters()) {
+ last_video_frame_color_space_(COLOR_SPACE_UNSPECIFIED) {
base::MD5Init(&md5_context_);
}
@@ -299,12 +298,6 @@ std::unique_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer() {
video_sink_.get(), std::move(video_decoders), false, nullptr,
new MediaLog()));
- if (!clockless_playback_) {
- audio_sink_ = new NullAudioSink(message_loop_.task_runner());
- } else {
- clockless_audio_sink_ = new ClocklessAudioSink();
- }
-
ScopedVector<AudioDecoder> audio_decoders;
#if !defined(MEDIA_DISABLE_FFMPEG)
@@ -314,11 +307,17 @@ std::unique_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer() {
audio_decoders.push_back(new OpusAudioDecoder(message_loop_.task_runner()));
- // Don't allow the audio renderer to resample buffers if hashing is enabled.
- if (!hashing_enabled_) {
- AudioParameters out_params(AudioParameters::AUDIO_PCM_LOW_LATENCY,
- CHANNEL_LAYOUT_STEREO, 44100, 16, 512);
- hardware_config_.UpdateOutputConfig(out_params);
+ if (!clockless_playback_) {
+ audio_sink_ = new NullAudioSink(message_loop_.task_runner());
+ } else {
+ clockless_audio_sink_ = new ClocklessAudioSink(OutputDeviceInfo(
+ "", OUTPUT_DEVICE_STATUS_OK,
+ // Don't allow the audio renderer to resample buffers if hashing is
+ // enabled:
+ hashing_enabled_
+ ? AudioParameters()
+ : AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY,
+ CHANNEL_LAYOUT_STEREO, 44100, 16, 512)));
}
std::unique_ptr<AudioRenderer> audio_renderer(new AudioRendererImpl(
@@ -326,7 +325,7 @@ std::unique_ptr<Renderer> PipelineIntegrationTestBase::CreateRenderer() {
(clockless_playback_)
? static_cast<AudioRendererSink*>(clockless_audio_sink_.get())
: audio_sink_.get(),
- std::move(audio_decoders), hardware_config_, new MediaLog()));
+ std::move(audio_decoders), new MediaLog()));
if (hashing_enabled_) {
if (clockless_playback_)
clockless_audio_sink_->StartAudioHashForTesting();
« no previous file with comments | « media/test/pipeline_integration_test_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698