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

Unified Diff: chromecast/media/service/cast_renderer.cc

Issue 2712883006: [Chromecast] Add new volume control API to CastMediaShlib (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « chromecast/media/cma/backend/multizone_backend_unittest.cc ('k') | chromecast/public/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/service/cast_renderer.cc
diff --git a/chromecast/media/service/cast_renderer.cc b/chromecast/media/service/cast_renderer.cc
index ff4efa933d60c30b76d6bcb4de36d3ed10ebc577..5a04adfb2e11178ab88a1c48e4c01ef6e66f236f 100644
--- a/chromecast/media/service/cast_renderer.cc
+++ b/chromecast/media/service/cast_renderer.cc
@@ -18,6 +18,7 @@
#include "chromecast/media/cma/pipeline/video_pipeline_client.h"
#include "chromecast/public/media/media_pipeline_backend.h"
#include "chromecast/public/media/media_pipeline_device_params.h"
+#include "chromecast/public/volume_control.h"
#include "media/audio/audio_device_description.h"
#include "media/base/audio_decoder_config.h"
#include "media/base/demuxer_stream.h"
@@ -98,9 +99,16 @@ void CastRenderer::Initialize(::media::MediaResource* media_resource,
if (device_id == "")
device_id = ::media::AudioDeviceDescription::kDefaultDeviceId;
- MediaPipelineDeviceParams params(
- sync_type, MediaPipelineDeviceParams::kAudioStreamNormal, device_id,
- backend_task_runner_.get());
+ AudioContentType content_type;
+ if (device_id == kAlarmAudioDeviceId) {
+ content_type = AudioContentType::kAlarm;
+ } else if (audio_device_id_ == kTtsAudioDeviceId) {
+ content_type = AudioContentType::kCommunication;
+ } else {
+ content_type = AudioContentType::kMedia;
+ }
+ MediaPipelineDeviceParams params(sync_type, backend_task_runner_.get(),
+ content_type, audio_device_id_);
if (audio_device_id_ == kTtsAudioDeviceId ||
audio_device_id_ ==
@@ -109,7 +117,7 @@ void CastRenderer::Initialize(::media::MediaResource* media_resource,
}
std::unique_ptr<MediaPipelineBackend> backend =
- backend_factory_->CreateBackend(params, audio_device_id_);
+ backend_factory_->CreateBackend(params);
// Create pipeline.
MediaPipelineClient pipeline_client;
« no previous file with comments | « chromecast/media/cma/backend/multizone_backend_unittest.cc ('k') | chromecast/public/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698