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

Unified Diff: chromecast/public/media/media_pipeline_device_params.h

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/public/avsettings.h ('k') | chromecast/public/volume_control.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/public/media/media_pipeline_device_params.h
diff --git a/chromecast/public/media/media_pipeline_device_params.h b/chromecast/public/media/media_pipeline_device_params.h
index d6ba837c6ccd24b375b42ff1dbed3f23f0716bd7..47375d3cc89f1f773ef89c6e15ac5675f30508b4 100644
--- a/chromecast/public/media/media_pipeline_device_params.h
+++ b/chromecast/public/media/media_pipeline_device_params.h
@@ -12,6 +12,8 @@ class TaskRunner;
namespace media {
+enum class AudioContentType; // See chromecast/public/volume_control.h
+
// Supplies creation parameters to platform-specific pipeline backend.
struct MediaPipelineDeviceParams {
enum MediaSyncType {
@@ -39,44 +41,48 @@ struct MediaPipelineDeviceParams {
kAudioStreamSoundEffects = 1,
};
- MediaPipelineDeviceParams(TaskRunner* task_runner_in)
+ MediaPipelineDeviceParams(TaskRunner* task_runner_in,
+ AudioContentType content_type_in,
+ const std::string& device_id_in)
: sync_type(kModeSyncPts),
audio_type(kAudioStreamNormal),
- task_runner(task_runner_in) {}
+ task_runner(task_runner_in),
+ content_type(content_type_in),
+ device_id(device_id_in) {}
MediaPipelineDeviceParams(MediaSyncType sync_type_in,
- TaskRunner* task_runner_in)
+ TaskRunner* task_runner_in,
+ AudioContentType content_type_in,
+ const std::string& device_id_in)
: sync_type(sync_type_in),
audio_type(kAudioStreamNormal),
- task_runner(task_runner_in) {}
+ task_runner(task_runner_in),
+ content_type(content_type_in),
+ device_id(device_id_in) {}
MediaPipelineDeviceParams(MediaSyncType sync_type_in,
AudioStreamType audio_type_in,
- TaskRunner* task_runner_in)
+ TaskRunner* task_runner_in,
+ AudioContentType content_type_in,
+ const std::string& device_id_in)
: sync_type(sync_type_in),
audio_type(audio_type_in),
- task_runner(task_runner_in) {}
-
- // |device_id_in| should be from media/audio/audio_device_description.h or
- // chromecast/media/base/audio_device_ids.h
- MediaPipelineDeviceParams(MediaSyncType sync_type_in,
- AudioStreamType audio_type_in,
- const std::string& device_id_in,
- TaskRunner* task_runner_in)
- : sync_type(sync_type_in),
- audio_type(audio_type_in),
- device_id(device_id_in),
- task_runner(task_runner_in) {}
+ task_runner(task_runner_in),
+ content_type(content_type_in),
+ device_id(device_id_in) {}
const MediaSyncType sync_type;
const AudioStreamType audio_type;
- const std::string device_id;
// task_runner allows backend implementations to post tasks to the media
// thread. Since all calls from cast_shell into the backend are made on
// the media thread, this may simplify thread management and safety for
// some backends.
TaskRunner* const task_runner;
+
+ // Identifies the content type for volume control.
+ const AudioContentType content_type;
+ const std::string device_id;
};
} // namespace media
« no previous file with comments | « chromecast/public/avsettings.h ('k') | chromecast/public/volume_control.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698