| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_DEVICES_H_ | 5 #ifndef CONTENT_COMMON_MEDIA_MEDIA_DEVICES_H_ |
| 6 #define CONTENT_COMMON_MEDIA_MEDIA_DEVICES_H_ | 6 #define CONTENT_COMMON_MEDIA_MEDIA_DEVICES_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 "media/base/video_facing.h" |
| 12 | 13 |
| 13 namespace media { | 14 namespace media { |
| 14 struct AudioDeviceDescription; | 15 struct AudioDeviceDescription; |
| 15 struct VideoCaptureDeviceDescriptor; | 16 struct VideoCaptureDeviceDescriptor; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace content { | 19 namespace content { |
| 19 | 20 |
| 20 enum MediaDeviceType { | 21 enum MediaDeviceType { |
| 21 MEDIA_DEVICE_TYPE_AUDIO_INPUT, | 22 MEDIA_DEVICE_TYPE_AUDIO_INPUT, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 34 explicit MediaDeviceInfo(const media::AudioDeviceDescription& description); | 35 explicit MediaDeviceInfo(const media::AudioDeviceDescription& description); |
| 35 explicit MediaDeviceInfo( | 36 explicit MediaDeviceInfo( |
| 36 const media::VideoCaptureDeviceDescriptor& descriptor); | 37 const media::VideoCaptureDeviceDescriptor& descriptor); |
| 37 ~MediaDeviceInfo(); | 38 ~MediaDeviceInfo(); |
| 38 MediaDeviceInfo& operator=(const MediaDeviceInfo& other); | 39 MediaDeviceInfo& operator=(const MediaDeviceInfo& other); |
| 39 MediaDeviceInfo& operator=(MediaDeviceInfo&& other); | 40 MediaDeviceInfo& operator=(MediaDeviceInfo&& other); |
| 40 | 41 |
| 41 std::string device_id; | 42 std::string device_id; |
| 42 std::string label; | 43 std::string label; |
| 43 std::string group_id; | 44 std::string group_id; |
| 45 media::VideoFacingMode video_facing; |
| 44 }; | 46 }; |
| 45 | 47 |
| 46 using MediaDeviceInfoArray = std::vector<MediaDeviceInfo>; | 48 using MediaDeviceInfoArray = std::vector<MediaDeviceInfo>; |
| 47 | 49 |
| 48 bool operator==(const MediaDeviceInfo& first, const MediaDeviceInfo& second); | 50 bool operator==(const MediaDeviceInfo& first, const MediaDeviceInfo& second); |
| 49 | 51 |
| 50 inline bool IsValidMediaDeviceType(MediaDeviceType type) { | 52 inline bool IsValidMediaDeviceType(MediaDeviceType type) { |
| 51 return type >= 0 && type < NUM_MEDIA_DEVICE_TYPES; | 53 return type >= 0 && type < NUM_MEDIA_DEVICE_TYPES; |
| 52 } | 54 } |
| 53 | 55 |
| 54 } // namespace content | 56 } // namespace content |
| 55 | 57 |
| 56 #endif // CONTENT_COMMON_MEDIA_MEDIA_DEVICES_H_ | 58 #endif // CONTENT_COMMON_MEDIA_MEDIA_DEVICES_H_ |
| OLD | NEW |