Add method to get source/sink type.

Also provide convenience method to enumerate all sinks connected to a source.
This commit is contained in:
Peter Johnson
2016-11-15 22:18:32 -08:00
parent 6446b9ef10
commit 3381340eb5
17 changed files with 253 additions and 34 deletions

View File

@@ -1360,7 +1360,7 @@ CS_Source CreateUSBCameraDev(llvm::StringRef name, int dev, CS_Status* status) {
CS_Source CreateUSBCameraPath(llvm::StringRef name, llvm::StringRef path,
CS_Status* status) {
auto source = std::make_shared<USBCameraImpl>(name, path);
return Sources::GetInstance().Allocate(SourceData::kUSB, source);
return Sources::GetInstance().Allocate(CS_SOURCE_USB, source);
}
std::vector<USBCameraInfo> EnumerateUSBCameras(CS_Status* status) {