mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
UsbCamera: Allow silencing of Connecting message (#1231)
This commit is contained in:
@@ -268,6 +268,10 @@ class UsbCamera : public VideoCamera {
|
||||
|
||||
/// Get the path to the device.
|
||||
std::string GetPath() const;
|
||||
|
||||
/// Set how verbose the camera connection messages are.
|
||||
/// @param level 0=don't display Connecting message, 1=do display message
|
||||
void SetConnectVerbose(int level);
|
||||
};
|
||||
|
||||
/// A source that represents a MJPEG-over-HTTP (IP) camera.
|
||||
|
||||
@@ -233,6 +233,12 @@ inline std::string UsbCamera::GetPath() const {
|
||||
return ::cs::GetUsbCameraPath(m_handle, &m_status);
|
||||
}
|
||||
|
||||
inline void UsbCamera::SetConnectVerbose(int level) {
|
||||
m_status = 0;
|
||||
SetProperty(GetSourceProperty(m_handle, "connect_verbose", &m_status), level,
|
||||
&m_status);
|
||||
}
|
||||
|
||||
inline HttpCamera::HttpCamera(wpi::StringRef name, wpi::StringRef url,
|
||||
HttpCameraKind kind) {
|
||||
m_handle = CreateHttpCamera(
|
||||
|
||||
Reference in New Issue
Block a user