Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 VideoOption video_option; | 32 VideoOption video_option; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 // Type of media stream. | 35 // Type of media stream. |
| 36 enum MediaStreamType { | 36 enum MediaStreamType { |
| 37 kNoService = 0, | 37 kNoService = 0, |
| 38 kAudioCapture, | 38 kAudioCapture, |
| 39 kVideoCapture | 39 kVideoCapture |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 const int kNumMediaStreamTypes = 3; | |
|
wjia(left Chromium)
2011/07/01 03:58:34
moving kNumMediaStreamTypes into enum can remove t
mflodman1
2011/07/01 09:37:10
Done.
| |
| 43 | |
| 42 // StreamDeviceInfo describes information about a device. | 44 // StreamDeviceInfo describes information about a device. |
| 43 struct StreamDeviceInfo { | 45 struct StreamDeviceInfo { |
| 44 StreamDeviceInfo(); | 46 StreamDeviceInfo(); |
| 45 StreamDeviceInfo(MediaStreamType service_param, | 47 StreamDeviceInfo(MediaStreamType service_param, |
| 46 const std::string& name_param, | 48 const std::string& name_param, |
| 47 const std::string& device_param, | 49 const std::string& device_param, |
| 48 bool opened); | 50 bool opened); |
| 49 | 51 |
| 50 enum { kNoId = -1 }; | 52 enum { kNoId = -1 }; |
| 51 | 53 |
| 52 // Describes the capture type. | 54 // Describes the capture type. |
| 53 MediaStreamType stream_type; | 55 MediaStreamType stream_type; |
| 54 // Friendly name of the device. | 56 // Friendly name of the device. |
| 55 std::string name; | 57 std::string name; |
| 56 // Unique name of a device. Even if there are multiple devices with the same | 58 // Unique name of a device. Even if there are multiple devices with the same |
| 57 // friendly name connected to the computer, this will be unique. | 59 // friendly name connected to the computer, this will be unique. |
| 58 std::string device_id; | 60 std::string device_id; |
| 59 // Set to true if the device has been opened, false otherwise. | 61 // Set to true if the device has been opened, false otherwise. |
| 60 bool in_use; | 62 bool in_use; |
| 61 // Id for this capture session. Unique for all sessions of the same type. | 63 // Id for this capture session. Unique for all sessions of the same type. |
| 62 int session_id; | 64 int session_id; |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; | 67 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; |
| 66 | 68 |
| 67 } // namespace media_stream | 69 } // namespace media_stream |
| 68 | 70 |
| 69 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ | 71 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ |
| OLD | NEW |