CameraServer: enable usb cameras on non-Linux platforms (#1411)

This commit is contained in:
Peter Johnson
2018-11-09 20:27:23 -08:00
committed by GitHub
parent ac751d3224
commit ace37c517e
2 changed files with 0 additions and 7 deletions

View File

@@ -55,7 +55,6 @@ static wpi::StringRef MakeSourceValue(CS_Source source,
CS_Status status = 0;
buf.clear();
switch (cs::GetSourceKind(source, &status)) {
#ifdef __linux__
case cs::VideoSource::kUsb: {
wpi::StringRef prefix{"usb:"};
buf.append(prefix.begin(), prefix.end());
@@ -63,7 +62,6 @@ static wpi::StringRef MakeSourceValue(CS_Source source,
buf.append(path.begin(), path.end());
break;
}
#endif
case cs::VideoSource::kHttp: {
wpi::StringRef prefix{"ip:"};
buf.append(prefix.begin(), prefix.end());
@@ -455,7 +453,6 @@ CameraServer::CameraServer() : m_impl(new Impl) {}
CameraServer::~CameraServer() {}
#ifdef __linux__
cs::UsbCamera CameraServer::StartAutomaticCapture() {
cs::UsbCamera camera = StartAutomaticCapture(m_impl->m_defaultUsbDevice++);
auto csShared = GetCameraServerShared();
@@ -488,7 +485,6 @@ cs::UsbCamera CameraServer::StartAutomaticCapture(const wpi::Twine& name,
csShared->ReportUsbCamera(camera.GetHandle());
return camera;
}
#endif
cs::AxisCamera CameraServer::AddAxisCamera(const wpi::Twine& host) {
return AddAxisCamera("Axis Camera", host);