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

Unified Diff: content/common/media/media_stream_options.cc

Issue 10912004: Begin adding support for tab mirroring via the MediaStream audio/video capturing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 8 years, 3 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.h ('k') | content/public/common/media_stream_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/media/media_stream_options.cc
diff --git a/content/common/media/media_stream_options.cc b/content/common/media/media_stream_options.cc
index 9daa96a54fad4628baa9c6a9c605aa2782b6da97..524bc203f87f44c647a380e7c7461b4576d5308f 100644
--- a/content/common/media/media_stream_options.cc
+++ b/content/common/media/media_stream_options.cc
@@ -4,13 +4,36 @@
#include "content/common/media/media_stream_options.h"
+#include "base/logging.h"
+
namespace media_stream {
+StreamOptions::StreamOptions()
+ : audio_type(content::MEDIA_NO_SERVICE),
+ video_type(content::MEDIA_NO_SERVICE) {}
+
+StreamOptions::StreamOptions(bool user_audio, bool user_video)
+ : audio_type(user_audio ?
+ content::MEDIA_DEVICE_AUDIO_CAPTURE :
+ content::MEDIA_NO_SERVICE),
+ video_type(user_video ?
+ content::MEDIA_DEVICE_VIDEO_CAPTURE :
+ content::MEDIA_NO_SERVICE) {}
+
+StreamOptions::StreamOptions(MediaStreamType audio_type,
+ MediaStreamType video_type)
+ : audio_type(audio_type), video_type(video_type) {
+ DCHECK(IsAudioMediaType(audio_type) ||
+ audio_type == content::MEDIA_NO_SERVICE);
+ DCHECK(IsVideoMediaType(video_type) ||
+ video_type == content::MEDIA_NO_SERVICE);
+}
+
// static
const int StreamDeviceInfo::kNoId = -1;
StreamDeviceInfo::StreamDeviceInfo()
- : stream_type(content::MEDIA_STREAM_DEVICE_TYPE_NO_SERVICE),
+ : stream_type(content::MEDIA_NO_SERVICE),
in_use(false),
session_id(kNoId) {}
« no previous file with comments | « content/common/media/media_stream_options.h ('k') | content/public/common/media_stream_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698