| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ | 5 #ifndef CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ |
| 6 #define CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ | 6 #define CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "content/public/common/media_stream_request.h" | 12 #include "content/public/common/media_stream_request.h" |
| 13 | 13 |
| 14 namespace media_stream { | 14 namespace media_stream { |
| 15 | 15 |
| 16 // StreamOptions is a Chromium representation of WebKit's | 16 // StreamOptions is a Chromium representation of WebKit's |
| 17 // WebGenerateStreamOptionFlags. It describes the components in a request for a | 17 // WebUserMediaRequest Options. It describes the components |
| 18 // new media stream. | 18 // in a request for a new media stream. |
| 19 struct CONTENT_EXPORT StreamOptions { | 19 struct CONTENT_EXPORT StreamOptions { |
| 20 enum VideoOption { | 20 StreamOptions() : audio(false), video(false) {} |
| 21 kNoCamera = 0, | 21 StreamOptions(bool audio, bool video) |
| 22 kFacingUser, | 22 : audio(audio), video(video) {} |
| 23 kFacingEnvironment, | |
| 24 kFacingBoth | |
| 25 }; | |
| 26 | |
| 27 StreamOptions() : audio(false), video_option(kNoCamera) {} | |
| 28 StreamOptions(bool audio, VideoOption option) | |
| 29 : audio(audio), video_option(option) {} | |
| 30 | 23 |
| 31 // True if the stream shall contain an audio input stream. | 24 // True if the stream shall contain an audio input stream. |
| 32 bool audio; | 25 bool audio; |
| 33 | 26 |
| 34 // Describes if a / which type of video capture device is requested. | 27 // True if the stream shall contain a video input stream. |
| 35 VideoOption video_option; | 28 bool video; |
| 36 }; | 29 }; |
| 37 | 30 |
| 38 typedef content::MediaStreamDeviceType MediaStreamType; | 31 typedef content::MediaStreamDeviceType MediaStreamType; |
| 39 | 32 |
| 40 // StreamDeviceInfo describes information about a device. | 33 // StreamDeviceInfo describes information about a device. |
| 41 struct CONTENT_EXPORT StreamDeviceInfo { | 34 struct CONTENT_EXPORT StreamDeviceInfo { |
| 42 static const int kNoId; | 35 static const int kNoId; |
| 43 | 36 |
| 44 StreamDeviceInfo(); | 37 StreamDeviceInfo(); |
| 45 StreamDeviceInfo(MediaStreamType service_param, | 38 StreamDeviceInfo(MediaStreamType service_param, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 58 bool in_use; | 51 bool in_use; |
| 59 // Id for this capture session. Unique for all sessions of the same type. | 52 // Id for this capture session. Unique for all sessions of the same type. |
| 60 int session_id; | 53 int session_id; |
| 61 }; | 54 }; |
| 62 | 55 |
| 63 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; | 56 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; |
| 64 | 57 |
| 65 } // namespace media_stream | 58 } // namespace media_stream |
| 66 | 59 |
| 67 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ | 60 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ |
| OLD | NEW |