| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 bool DeviceManager::GetAudioInputDevice(const std::string& name, Device* out) { | 116 bool DeviceManager::GetAudioInputDevice(const std::string& name, Device* out) { |
| 117 return GetAudioDevice(true, name, out); | 117 return GetAudioDevice(true, name, out); |
| 118 } | 118 } |
| 119 | 119 |
| 120 bool DeviceManager::GetAudioOutputDevice(const std::string& name, Device* out) { | 120 bool DeviceManager::GetAudioOutputDevice(const std::string& name, Device* out) { |
| 121 return GetAudioDevice(false, name, out); | 121 return GetAudioDevice(false, name, out); |
| 122 } | 122 } |
| 123 | 123 |
| 124 bool DeviceManager::GetVideoCaptureDevices(std::vector<Device>* devices) { | 124 bool DeviceManager::GetVideoCaptureDevices(std::vector<Device>* devices) { |
| 125 devices->clear(); | 125 devices->clear(); |
| 126 #if defined(ANDROID) || defined(IOS) | 126 #if defined(ANDROID) || defined(WEBRTC_IOS) |
| 127 // On Android and iOS, we treat the camera(s) as a single device. Even if | 127 // On Android and iOS, we treat the camera(s) as a single device. Even if |
| 128 // there are multiple cameras, that's abstracted away at a higher level. | 128 // there are multiple cameras, that's abstracted away at a higher level. |
| 129 Device dev("camera", "1"); // name and ID | 129 Device dev("camera", "1"); // name and ID |
| 130 devices->push_back(dev); | 130 devices->push_back(dev); |
| 131 return true; | 131 return true; |
| 132 #else | 132 #else |
| 133 return false; | 133 return false; |
| 134 #endif | 134 #endif |
| 135 } | 135 } |
| 136 | 136 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 if (ShouldDeviceBeIgnored(it->name, exclusion_list)) { | 362 if (ShouldDeviceBeIgnored(it->name, exclusion_list)) { |
| 363 it = devices->erase(it); | 363 it = devices->erase(it); |
| 364 } else { | 364 } else { |
| 365 ++it; | 365 ++it; |
| 366 } | 366 } |
| 367 } | 367 } |
| 368 return true; | 368 return true; |
| 369 } | 369 } |
| 370 | 370 |
| 371 } // namespace cricket | 371 } // namespace cricket |
| OLD | NEW |