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

Unified Diff: content/renderer/media/media_stream_dependency_factory.cc

Issue 12383016: Merge AssociateStreamWithProducer message into CreateStream message for both audio output and input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments. Created 7 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
Index: content/renderer/media/media_stream_dependency_factory.cc
diff --git a/content/renderer/media/media_stream_dependency_factory.cc b/content/renderer/media/media_stream_dependency_factory.cc
index a4213696fd99fad0096650d957b0edc9d2101b9b..d5812eb71b2768ee7c1639e08812b36045cf3bd4 100644
--- a/content/renderer/media/media_stream_dependency_factory.cc
+++ b/content/renderer/media/media_stream_dependency_factory.cc
@@ -225,6 +225,7 @@ MediaStreamDependencyFactory::CreateRTCPeerConnectionHandler(
}
void MediaStreamDependencyFactory::CreateNativeMediaSources(
+ int render_view_id,
const WebKit::WebMediaConstraints& audio_constraints,
const WebKit::WebMediaConstraints& video_constraints,
WebKit::WebMediaStream* description,
@@ -279,7 +280,7 @@ void MediaStreamDependencyFactory::CreateNativeMediaSources(
const StreamDeviceInfo device_info = source_data->device_info();
if (IsAudioMediaType(device_info.device.type)) {
- if (!InitializeAudioSource(device_info)) {
+ if (!InitializeAudioSource(render_view_id, device_info)) {
DLOG(WARNING) << "Unsupported audio source";
sources_created.Run(description, false);
return;
@@ -448,7 +449,8 @@ MediaStreamDependencyFactory::CreateLocalVideoSource(
}
bool MediaStreamDependencyFactory::InitializeAudioSource(
- const StreamDeviceInfo& device_info) {
+ int render_view_id,
+ const StreamDeviceInfo& device_info) {
DVLOG(1) << "MediaStreamDependencyFactory::InitializeAudioSource()";
const MediaStreamDevice device = device_info.device;
@@ -458,6 +460,7 @@ bool MediaStreamDependencyFactory::InitializeAudioSource(
// TODO(henrika): refactor \content\public\common\media_stream_request.h
// to allow dependency of media::ChannelLayout and avoid static_cast.
if (!capturer->Initialize(
+ render_view_id,
static_cast<media::ChannelLayout>(device.channel_layout),
device.sample_rate))
return false;

Powered by Google App Engine
This is Rietveld 408576698