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

Unified Diff: content/browser/renderer_host/media/media_stream_dispatcher_host.cc

Issue 11298006: Browser-wide audio mirroring for TabCapture API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments, some unit tests, move attach/detach into virtual audio output stream Created 8 years, 1 month 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/browser/renderer_host/media/media_stream_dispatcher_host.cc
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
index ba20cf2f7e46b6d6d9c8313aaa67f3975ed6855d..09bb3cff954a526a6af36e3f83ed4c8f71179f00 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
@@ -5,6 +5,7 @@
#include "content/browser/renderer_host/media/media_stream_dispatcher_host.h"
#include "content/browser/browser_main_loop.h"
+#include "content/browser/renderer_host/media/web_contents_capture_util.h"
#include "content/common/media/media_stream_messages.h"
#include "content/common/media/media_stream_options.h"
#include "googleurl/src/gurl.h"
@@ -141,8 +142,16 @@ void MediaStreamDispatcherHost::OnGenerateStream(
std::string label;
if (components.audio_type == MEDIA_TAB_AUDIO_CAPTURE ||
components.video_type == MEDIA_TAB_VIDEO_CAPTURE) {
- const std::string& device_id = components.video_device_id;
- DCHECK(!device_id.empty());
+ DCHECK(!components.video_device_id.empty());
+
+ // Append our tab capture device id scheme.
+ // TODO(justinlin): This is kind of a hack, but the plumbing for audio
Alpha Left Google 2012/11/28 01:04:47 File a bug and put the link here.
justinlin 2012/11/28 14:30:31 Done.
+ // streams is too complicated to plumb in by type. Will revisit once it's
+ // refactored.
+ const std::string& device_id =
+ WebContentsCaptureUtil::AppendWebContentsDeviceScheme(
+ components.video_device_id);
+
// TODO(justinlin): Cleanup/get rid of GenerateStreamForDevice and merge
// with the regular GenerateStream.
GetManager()->GenerateStreamForDevice(

Powered by Google App Engine
This is Rietveld 408576698