OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 MobileDeviceManager::~MobileDeviceManager() {} | 47 MobileDeviceManager::~MobileDeviceManager() {} |
48 | 48 |
49 bool MobileDeviceManager::GetVideoCaptureDevices(std::vector<Device>* devs) { | 49 bool MobileDeviceManager::GetVideoCaptureDevices(std::vector<Device>* devs) { |
50 devs->clear(); | 50 devs->clear(); |
51 rtc::scoped_ptr<webrtc::VideoCaptureModule::DeviceInfo> info( | 51 rtc::scoped_ptr<webrtc::VideoCaptureModule::DeviceInfo> info( |
52 webrtc::VideoCaptureFactory::CreateDeviceInfo(0)); | 52 webrtc::VideoCaptureFactory::CreateDeviceInfo(0)); |
53 if (!info) | 53 if (!info) |
54 return false; | 54 return false; |
55 | 55 |
56 uint32 num_cams = info->NumberOfDevices(); | 56 uint32_t num_cams = info->NumberOfDevices(); |
57 char id[256]; | 57 char id[256]; |
58 char name[256]; | 58 char name[256]; |
59 for (uint32 i = 0; i < num_cams; ++i) { | 59 for (uint32_t i = 0; i < num_cams; ++i) { |
60 if (info->GetDeviceName(i, name, arraysize(name), id, arraysize(id))) | 60 if (info->GetDeviceName(i, name, arraysize(name), id, arraysize(id))) |
61 continue; | 61 continue; |
62 devs->push_back(Device(name, id)); | 62 devs->push_back(Device(name, id)); |
63 } | 63 } |
64 return true; | 64 return true; |
65 } | 65 } |
66 | 66 |
67 DeviceManagerInterface* DeviceManagerFactory::Create() { | 67 DeviceManagerInterface* DeviceManagerFactory::Create() { |
68 return new MobileDeviceManager(); | 68 return new MobileDeviceManager(); |
69 } | 69 } |
70 | 70 |
71 bool GetUsbId(const Device& device, std::string* usb_id) { return false; } | 71 bool GetUsbId(const Device& device, std::string* usb_id) { return false; } |
72 | 72 |
73 bool GetUsbVersion(const Device& device, std::string* usb_version) { | 73 bool GetUsbVersion(const Device& device, std::string* usb_version) { |
74 return false; | 74 return false; |
75 } | 75 } |
76 | 76 |
77 } // namespace cricket | 77 } // namespace cricket |
OLD | NEW |