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

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: Created 8 years, 4 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/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..0915b5d0e98179d0ce7ee05238883220a8029b73 100644
--- a/content/common/media/media_stream_options.cc
+++ b/content/common/media/media_stream_options.cc
@@ -4,8 +4,33 @@
#include "content/common/media/media_stream_options.h"
+#include "base/logging.h"
+
namespace media_stream {
+StreamOptions::StreamOptions()
+ : audio_type(content::MEDIA_STREAM_DEVICE_TYPE_NO_SERVICE),
+ video_type(content::MEDIA_STREAM_DEVICE_TYPE_NO_SERVICE) {}
+
+StreamOptions::StreamOptions(bool user_audio, bool user_video)
+ : audio_type(user_audio ?
+ content::MEDIA_STREAM_DEVICE_TYPE_USER_AUDIO_CAPTURE :
+ content::MEDIA_STREAM_DEVICE_TYPE_NO_SERVICE),
+ video_type(user_video ?
+ content::MEDIA_STREAM_DEVICE_TYPE_USER_VIDEO_CAPTURE :
+ content::MEDIA_STREAM_DEVICE_TYPE_NO_SERVICE) {}
+
+StreamOptions::StreamOptions(MediaStreamType audio_type,
+ MediaStreamType video_type,
+ const std::string& opt_device_id)
+ : audio_type(audio_type), video_type(video_type),
+ opt_device_id(opt_device_id) {
+ DCHECK(IsAudioMediaStreamDeviceType(audio_type) ||
+ audio_type == content::MEDIA_STREAM_DEVICE_TYPE_NO_SERVICE);
+ DCHECK(IsVideoMediaStreamDeviceType(video_type) ||
+ video_type == content::MEDIA_STREAM_DEVICE_TYPE_NO_SERVICE);
+}
+
// static
const int StreamDeviceInfo::kNoId = -1;

Powered by Google App Engine
This is Rietveld 408576698