Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(956)

Side by Side Diff: webrtc/media/devices/macdeviceinfo.cc

Issue 1715883002: Remove DeviceManager and DeviceInfo. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/devices/linuxdevicemanager.cc ('k') | webrtc/media/devices/macdevicemanager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include "webrtc/media/devices/deviceinfo.h"
12
13 namespace cricket {
14
15 bool GetUsbId(const Device& device, std::string* usb_id) {
16 // Both PID and VID are 4 characters.
17 const int id_size = 4;
18 if (device.id.size() < 2 * id_size) {
19 return false;
20 }
21
22 // The last characters of device id is a concatenation of VID and then PID.
23 const size_t vid_location = device.id.size() - 2 * id_size;
24 std::string id_vendor = device.id.substr(vid_location, id_size);
25 const size_t pid_location = device.id.size() - id_size;
26 std::string id_product = device.id.substr(pid_location, id_size);
27
28 usb_id->clear();
29 usb_id->append(id_vendor);
30 usb_id->append(":");
31 usb_id->append(id_product);
32 return true;
33 }
34
35 bool GetUsbVersion(const Device& device, std::string* usb_version) {
36 return false;
37 }
38
39 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/devices/linuxdevicemanager.cc ('k') | webrtc/media/devices/macdevicemanager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698