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

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

Issue 312773002: Support for audio output devices for getMediaDevices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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_dispatcher.cc
diff --git a/content/renderer/media/media_stream_dispatcher.cc b/content/renderer/media/media_stream_dispatcher.cc
index 6446c3c6930155942467b7bca5910d760259e5d4..0a2da78e8bd95f12f8453220e36af8661fba0758 100644
--- a/content/renderer/media/media_stream_dispatcher.cc
+++ b/content/renderer/media/media_stream_dispatcher.cc
@@ -137,7 +137,8 @@ void MediaStreamDispatcher::EnumerateDevices(
const GURL& security_origin) {
DCHECK(main_loop_->BelongsToCurrentThread());
DCHECK(type == MEDIA_DEVICE_AUDIO_CAPTURE ||
- type == MEDIA_DEVICE_VIDEO_CAPTURE);
+ type == MEDIA_DEVICE_VIDEO_CAPTURE ||
+ type == MEDIA_DEVICE_AUDIO_OUTPUT);
DVLOG(1) << "MediaStreamDispatcher::EnumerateDevices("
<< request_id << ")";
@@ -298,7 +299,7 @@ void MediaStreamDispatcher::OnDeviceStopped(
return;
}
Stream* stream = &it->second;
- if (IsAudioMediaType(device_info.device.type))
+ if (IsAudioInputMediaType(device_info.device.type))
RemoveStreamDeviceFromArray(device_info, &stream->audio_array);
else
RemoveStreamDeviceFromArray(device_info, &stream->video_array);
@@ -336,7 +337,7 @@ void MediaStreamDispatcher::OnDeviceOpened(
if (request.ipc_request == request_id) {
Stream new_stream;
new_stream.handler = request.handler;
- if (IsAudioMediaType(device_info.device.type)) {
+ if (IsAudioInputMediaType(device_info.device.type)) {
new_stream.audio_array.push_back(device_info);
} else if (IsVideoMediaType(device_info.device.type)) {
new_stream.video_array.push_back(device_info);
« no previous file with comments | « content/public/common/media_stream_request.cc ('k') | content/renderer/media/media_stream_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698