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 |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 // StreamDeviceInfo describes information about a device. | 33 // StreamDeviceInfo describes information about a device. |
34 struct CONTENT_EXPORT StreamDeviceInfo { | 34 struct CONTENT_EXPORT StreamDeviceInfo { |
35 static const int kNoId; | 35 static const int kNoId; |
36 | 36 |
37 StreamDeviceInfo(); | 37 StreamDeviceInfo(); |
38 StreamDeviceInfo(MediaStreamType service_param, | 38 StreamDeviceInfo(MediaStreamType service_param, |
39 const std::string& name_param, | 39 const std::string& name_param, |
40 const std::string& device_param, | 40 const std::string& device_param, |
41 bool opened); | 41 bool opened); |
| 42 static bool IsEqual(const StreamDeviceInfo& first, |
| 43 const StreamDeviceInfo& second); |
42 | 44 |
43 // Describes the capture type. | 45 // Describes the capture type. |
44 MediaStreamType stream_type; | 46 MediaStreamType stream_type; |
45 // Friendly name of the device. | 47 // Friendly name of the device. |
46 std::string name; | 48 std::string name; |
47 // Unique name of a device. Even if there are multiple devices with the same | 49 // Unique name of a device. Even if there are multiple devices with the same |
48 // friendly name connected to the computer, this will be unique. | 50 // friendly name connected to the computer, this will be unique. |
49 std::string device_id; | 51 std::string device_id; |
50 // Set to true if the device has been opened, false otherwise. | 52 // Set to true if the device has been opened, false otherwise. |
51 bool in_use; | 53 bool in_use; |
52 // Id for this capture session. Unique for all sessions of the same type. | 54 // Id for this capture session. Unique for all sessions of the same type. |
53 int session_id; | 55 int session_id; |
54 }; | 56 }; |
55 | 57 |
56 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; | 58 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; |
57 | 59 |
58 } // namespace media_stream | 60 } // namespace media_stream |
59 | 61 |
60 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ | 62 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ |
OLD | NEW |