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; |