mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
USBCamera, HTTPCamera: Name functions consistent with classes.
This commit is contained in:
@@ -1517,14 +1517,14 @@ void USBCameraImpl::NumSinksEnabledChanged() {
|
||||
|
||||
namespace cs {
|
||||
|
||||
CS_Source CreateUSBSourceDev(llvm::StringRef name, int dev, CS_Status* status) {
|
||||
CS_Source CreateUSBCameraDev(llvm::StringRef name, int dev, CS_Status* status) {
|
||||
llvm::SmallString<32> path;
|
||||
llvm::raw_svector_ostream oss{path};
|
||||
oss << "/dev/video" << dev;
|
||||
return CreateUSBSourcePath(name, oss.str(), status);
|
||||
return CreateUSBCameraPath(name, oss.str(), status);
|
||||
}
|
||||
|
||||
CS_Source CreateUSBSourcePath(llvm::StringRef name, llvm::StringRef path,
|
||||
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);
|
||||
@@ -1570,13 +1570,13 @@ std::vector<USBCameraInfo> EnumerateUSBCameras(CS_Status* status) {
|
||||
|
||||
extern "C" {
|
||||
|
||||
CS_Source CS_CreateUSBSourceDev(const char* name, int dev, CS_Status* status) {
|
||||
return cs::CreateUSBSourceDev(name, dev, status);
|
||||
CS_Source CS_CreateUSBCameraDev(const char* name, int dev, CS_Status* status) {
|
||||
return cs::CreateUSBCameraDev(name, dev, status);
|
||||
}
|
||||
|
||||
CS_Source CS_CreateUSBSourcePath(const char* name, const char* path,
|
||||
CS_Source CS_CreateUSBCameraPath(const char* name, const char* path,
|
||||
CS_Status* status) {
|
||||
return cs::CreateUSBSourcePath(name, path, status);
|
||||
return cs::CreateUSBCameraPath(name, path, status);
|
||||
}
|
||||
|
||||
CS_USBCameraInfo* CS_EnumerateUSBCameras(int* count, CS_Status* status) {
|
||||
|
||||
@@ -74,9 +74,9 @@ char** CS_GetEnumPropertyChoices(CS_Property property, int* count,
|
||||
return out;
|
||||
}
|
||||
|
||||
CS_Source CS_CreateHTTPSource(const char* name, const char* url,
|
||||
CS_Source CS_CreateHTTPCamera(const char* name, const char* url,
|
||||
CS_Status* status) {
|
||||
return cs::CreateHTTPSource(name, url, status);
|
||||
return cs::CreateHTTPCamera(name, url, status);
|
||||
}
|
||||
|
||||
CS_Source CS_CreateCvSource(const char* name, const CS_VideoMode* mode,
|
||||
|
||||
@@ -142,7 +142,7 @@ std::vector<std::string> GetEnumPropertyChoices(CS_Property property,
|
||||
// Source Creation Functions
|
||||
//
|
||||
|
||||
CS_Source CreateHTTPSource(llvm::StringRef name, llvm::StringRef url,
|
||||
CS_Source CreateHTTPCamera(llvm::StringRef name, llvm::StringRef url,
|
||||
CS_Status* status) {
|
||||
return 0; // TODO
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user