Changeset 48600 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Sep 20, 2013 2:30:46 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 89166
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r48538 r48600 733 733 734 734 /** 735 * List video capture devices. 736 * 737 * @returns See produceList. 738 * @param pVirtualBox Reference to the IVirtualBox pointer. 739 */ 740 static HRESULT listVideoCaptureDevices(const ComPtr<IVirtualBox> pVirtualBox) 741 { 742 HRESULT rc; 743 ComPtr<IHost> host; 744 CHECK_ERROR(pVirtualBox, COMGETTER(Host)(host.asOutParam())); 745 com::SafeIfaceArray<IHostVideoCaptureDevice> hostVideoCaptureDevices; 746 CHECK_ERROR(host, COMGETTER(VideoCaptureDevices)(ComSafeArrayAsOutParam(hostVideoCaptureDevices))); 747 RTPrintf("Video Capture Devices: %u\n", hostVideoCaptureDevices.size()); 748 for (size_t i = 0; i < hostVideoCaptureDevices.size(); ++i) 749 { 750 ComPtr<IHostVideoCaptureDevice> p = hostVideoCaptureDevices[i]; 751 Bstr name; 752 p->COMGETTER(Name)(name.asOutParam()); 753 Bstr path; 754 p->COMGETTER(Path)(path.asOutParam()); 755 Bstr alias; 756 p->COMGETTER(Alias)(alias.asOutParam()); 757 RTPrintf("%ls \"%ls\"\n%ls\n", alias.raw(), name.raw(), path.raw()); 758 } 759 return rc; 760 } 761 762 763 /** 735 764 * The type of lists we can produce. 736 765 */ … … 760 789 kListExtPacks, 761 790 kListGroups, 762 kListNatNetworks 791 kListNatNetworks, 792 kListVideoCaptureDevices 763 793 }; 764 794 … … 1094 1124 } 1095 1125 1126 case kListVideoCaptureDevices: 1127 rc = listVideoCaptureDevices(pVirtualBox); 1128 break; 1129 1096 1130 /* No default here, want gcc warnings. */ 1097 1131 … … 1142 1176 { "extpacks", kListExtPacks, RTGETOPT_REQ_NOTHING }, 1143 1177 { "groups", kListGroups, RTGETOPT_REQ_NOTHING }, 1178 { "webcams", kListVideoCaptureDevices, RTGETOPT_REQ_NOTHING }, 1144 1179 }; 1145 1180 … … 1187 1222 case kListGroups: 1188 1223 case kListNatNetworks: 1224 case kListVideoCaptureDevices: 1189 1225 enmOptCommand = (enum enmListType)ch; 1190 1226 if (fOptMultiple)
Note:
See TracChangeset
for help on using the changeset viewer.