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

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

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: Had to restore usage of UTF16ToUTF8() in MediaStreamImpl::OnCreateNativeSourcesComplete to build on… 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
Index: content/public/common/media_stream_request.cc
diff --git a/content/public/common/media_stream_request.cc b/content/public/common/media_stream_request.cc
index 8d2f66731cbec9b3c29f98ce66e93ed10018164e..8fd3937e5ebfc7a7fb1187bba40608ab26491227 100644
--- a/content/public/common/media_stream_request.cc
+++ b/content/public/common/media_stream_request.cc
@@ -26,7 +26,24 @@ MediaStreamDevice::MediaStreamDevice(
const std::string& name)
: type(type),
id(id),
- name(name) {
+ name(name),
+ sample_rate(0),
+ channel_layout(0) {
+ DCHECK(IsVideoMediaType(type));
+}
+
+MediaStreamDevice::MediaStreamDevice(
+ MediaStreamType type,
+ const std::string& id,
+ const std::string& name,
+ int sample_rate,
+ int channel_layout)
+ : type(type),
+ id(id),
+ name(name),
+ sample_rate(sample_rate),
+ channel_layout(channel_layout) {
+ DCHECK(IsAudioMediaType(type));
}
MediaStreamDevice::~MediaStreamDevice() {}

Powered by Google App Engine
This is Rietveld 408576698