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

Unified Diff: content/public/common/media_stream_request.h

Issue 11783059: Ensures that WebRTC works for device selection using a different sample rate than default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix after review from Chris Created 7 years, 11 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 | « content/common/media/media_stream_options.cc ('k') | content/public/common/media_stream_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/media_stream_request.h
diff --git a/content/public/common/media_stream_request.h b/content/public/common/media_stream_request.h
index d29a809cde06e0c197e592ca897e0e9c93149a49..5ff24e250fef74fa477e2369e4d64ce6979f8dc7 100644
--- a/content/public/common/media_stream_request.h
+++ b/content/public/common/media_stream_request.h
@@ -53,6 +53,13 @@ struct CONTENT_EXPORT MediaStreamDevice {
const std::string& id,
const std::string& name);
+ MediaStreamDevice(
+ MediaStreamType type,
+ const std::string& id,
+ const std::string& name,
+ int sample_rate,
+ int channel_layout);
+
~MediaStreamDevice();
// The device's type.
@@ -63,6 +70,18 @@ struct CONTENT_EXPORT MediaStreamDevice {
// The device's "friendly" name. Not guaranteed to be unique.
std::string name;
+
+ // Preferred sample rate in samples per second for the device.
+ // Only utilized for audio devices. Will be set to 0 if the constructor
+ // with three parameters (intended for video) is used.
+ int sample_rate;
+
+ // Preferred channel configuration for the device.
+ // Only utilized for audio devices. Will be set to 0 if the constructor
+ // with three parameters (intended for video) is used.
+ // TODO(henrika): ideally, we would like to use media::ChannelLayout here
+ // but including media/base/channel_layout.h violates checkdeps rules.
+ int channel_layout;
};
typedef std::vector<MediaStreamDevice> MediaStreamDevices;
« no previous file with comments | « content/common/media/media_stream_options.cc ('k') | content/public/common/media_stream_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698