mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Create VideoCamera base class and move camera settings functions to it.
This makes them available for both UsbCamera and HttpCamera / AxisCamera. To avoid virtual functions in the public-facing interface, move the implementation of the camera settings functions to the core library.
This commit is contained in:
@@ -82,6 +82,41 @@ void CvSourceImpl::SetStringProperty(int property, llvm::StringRef value,
|
||||
UpdatePropertyValue(property, true, 0, value);
|
||||
}
|
||||
|
||||
// These are only valid for cameras (should never get called)
|
||||
|
||||
void CvSourceImpl::SetBrightness(int brightness, CS_Status* status) {
|
||||
*status = CS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
int CvSourceImpl::GetBrightness(CS_Status* status) const {
|
||||
*status = CS_INVALID_HANDLE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CvSourceImpl::SetWhiteBalanceAuto(CS_Status* status) {
|
||||
*status = CS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
void CvSourceImpl::SetWhiteBalanceHoldCurrent(CS_Status* status) {
|
||||
*status = CS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
void CvSourceImpl::SetWhiteBalanceManual(int value, CS_Status* status) {
|
||||
*status = CS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
void CvSourceImpl::SetExposureAuto(CS_Status* status) {
|
||||
*status = CS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
void CvSourceImpl::SetExposureHoldCurrent(CS_Status* status) {
|
||||
*status = CS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
void CvSourceImpl::SetExposureManual(int value, CS_Status* status) {
|
||||
*status = CS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
bool CvSourceImpl::SetVideoMode(const VideoMode& mode, CS_Status* status) {
|
||||
// can't set video mode on OpenCV source
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user