WPILibC++  2019.3.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
cs Namespace Reference

CameraServer (cscore) namespace. More...

Classes

class  AxisCamera
 A source that represents an Axis IP camera. More...
 
class  CvSink
 A sink for user code to accept video frames as OpenCV images. More...
 
class  CvSource
 A source for user code to provide OpenCV images as video frames. More...
 
class  HttpCamera
 A source that represents a MJPEG-over-HTTP (IP) camera. More...
 
class  MjpegServer
 A sink that acts as a MJPEG-over-HTTP network server. More...
 
struct  RawEvent
 Listener event. More...
 
class  UsbCamera
 A source that represents a USB camera. More...
 
struct  UsbCameraInfo
 USB camera information. More...
 
class  VideoCamera
 A source that represents a video camera. More...
 
class  VideoEvent
 An event generated by the library and provided to event listeners. More...
 
class  VideoListener
 An event listener. More...
 
struct  VideoMode
 Video mode. More...
 
class  VideoProperty
 A source or sink property. More...
 
class  VideoSink
 A sink for video that accepts a sequence of frames. More...
 
class  VideoSource
 A source for video that provides a sequence of frames. More...
 

Typedefs

using LogFunc = std::function< void(unsigned int level, const char *file, unsigned int line, const char *msg)>
 

Functions

CS_PropertyKind GetPropertyKind (CS_Property property, CS_Status *status)
 
std::string GetPropertyName (CS_Property property, CS_Status *status)
 
wpi::StringRef GetPropertyName (CS_Property property, wpi::SmallVectorImpl< char > &buf, CS_Status *status)
 
int GetProperty (CS_Property property, CS_Status *status)
 
void SetProperty (CS_Property property, int value, CS_Status *status)
 
int GetPropertyMin (CS_Property property, CS_Status *status)
 
int GetPropertyMax (CS_Property property, CS_Status *status)
 
int GetPropertyStep (CS_Property property, CS_Status *status)
 
int GetPropertyDefault (CS_Property property, CS_Status *status)
 
std::string GetStringProperty (CS_Property property, CS_Status *status)
 
wpi::StringRef GetStringProperty (CS_Property property, wpi::SmallVectorImpl< char > &buf, CS_Status *status)
 
void SetStringProperty (CS_Property property, const wpi::Twine &value, CS_Status *status)
 
std::vector< std::string > GetEnumPropertyChoices (CS_Property property, CS_Status *status)
 
CS_Source CreateUsbCameraDev (const wpi::Twine &name, int dev, CS_Status *status)
 
CS_Source CreateUsbCameraPath (const wpi::Twine &name, const wpi::Twine &path, CS_Status *status)
 
CS_Source CreateHttpCamera (const wpi::Twine &name, const wpi::Twine &url, CS_HttpCameraKind kind, CS_Status *status)
 
CS_Source CreateHttpCamera (const wpi::Twine &name, wpi::ArrayRef< std::string > urls, CS_HttpCameraKind kind, CS_Status *status)
 
CS_Source CreateCvSource (const wpi::Twine &name, const VideoMode &mode, CS_Status *status)
 
CS_SourceKind GetSourceKind (CS_Source source, CS_Status *status)
 
std::string GetSourceName (CS_Source source, CS_Status *status)
 
wpi::StringRef GetSourceName (CS_Source source, wpi::SmallVectorImpl< char > &buf, CS_Status *status)
 
std::string GetSourceDescription (CS_Source source, CS_Status *status)
 
wpi::StringRef GetSourceDescription (CS_Source source, wpi::SmallVectorImpl< char > &buf, CS_Status *status)
 
uint64_t GetSourceLastFrameTime (CS_Source source, CS_Status *status)
 
void SetSourceConnectionStrategy (CS_Source source, CS_ConnectionStrategy strategy, CS_Status *status)
 
bool IsSourceConnected (CS_Source source, CS_Status *status)
 
bool IsSourceEnabled (CS_Source source, CS_Status *status)
 
CS_Property GetSourceProperty (CS_Source source, const wpi::Twine &name, CS_Status *status)
 
wpi::ArrayRef< CS_Property > EnumerateSourceProperties (CS_Source source, wpi::SmallVectorImpl< CS_Property > &vec, CS_Status *status)
 
VideoMode GetSourceVideoMode (CS_Source source, CS_Status *status)
 
bool SetSourceVideoMode (CS_Source source, const VideoMode &mode, CS_Status *status)
 
bool SetSourcePixelFormat (CS_Source source, VideoMode::PixelFormat pixelFormat, CS_Status *status)
 
bool SetSourceResolution (CS_Source source, int width, int height, CS_Status *status)
 
bool SetSourceFPS (CS_Source source, int fps, CS_Status *status)
 
bool SetSourceConfigJson (CS_Source source, wpi::StringRef config, CS_Status *status)
 
bool SetSourceConfigJson (CS_Source source, const wpi::json &config, CS_Status *status)
 
std::string GetSourceConfigJson (CS_Source source, CS_Status *status)
 
wpi::json GetSourceConfigJsonObject (CS_Source source, CS_Status *status)
 
std::vector< VideoModeEnumerateSourceVideoModes (CS_Source source, CS_Status *status)
 
wpi::ArrayRef< CS_Sink > EnumerateSourceSinks (CS_Source source, wpi::SmallVectorImpl< CS_Sink > &vec, CS_Status *status)
 
CS_Source CopySource (CS_Source source, CS_Status *status)
 
void ReleaseSource (CS_Source source, CS_Status *status)
 
void SetCameraBrightness (CS_Source source, int brightness, CS_Status *status)
 
int GetCameraBrightness (CS_Source source, CS_Status *status)
 
void SetCameraWhiteBalanceAuto (CS_Source source, CS_Status *status)
 
void SetCameraWhiteBalanceHoldCurrent (CS_Source source, CS_Status *status)
 
void SetCameraWhiteBalanceManual (CS_Source source, int value, CS_Status *status)
 
void SetCameraExposureAuto (CS_Source source, CS_Status *status)
 
void SetCameraExposureHoldCurrent (CS_Source source, CS_Status *status)
 
void SetCameraExposureManual (CS_Source source, int value, CS_Status *status)
 
std::string GetUsbCameraPath (CS_Source source, CS_Status *status)
 
UsbCameraInfo GetUsbCameraInfo (CS_Source source, CS_Status *status)
 
CS_HttpCameraKind GetHttpCameraKind (CS_Source source, CS_Status *status)
 
void SetHttpCameraUrls (CS_Source source, wpi::ArrayRef< std::string > urls, CS_Status *status)
 
std::vector< std::string > GetHttpCameraUrls (CS_Source source, CS_Status *status)
 
void PutSourceFrame (CS_Source source, cv::Mat &image, CS_Status *status)
 
void NotifySourceError (CS_Source source, const wpi::Twine &msg, CS_Status *status)
 
void SetSourceConnected (CS_Source source, bool connected, CS_Status *status)
 
void SetSourceDescription (CS_Source source, const wpi::Twine &description, CS_Status *status)
 
CS_Property CreateSourceProperty (CS_Source source, const wpi::Twine &name, CS_PropertyKind kind, int minimum, int maximum, int step, int defaultValue, int value, CS_Status *status)
 
void SetSourceEnumPropertyChoices (CS_Source source, CS_Property property, wpi::ArrayRef< std::string > choices, CS_Status *status)
 
CS_Sink CreateMjpegServer (const wpi::Twine &name, const wpi::Twine &listenAddress, int port, CS_Status *status)
 
CS_Sink CreateCvSink (const wpi::Twine &name, CS_Status *status)
 
CS_Sink CreateCvSinkCallback (const wpi::Twine &name, std::function< void(uint64_t time)> processFrame, CS_Status *status)
 
CS_SinkKind GetSinkKind (CS_Sink sink, CS_Status *status)
 
std::string GetSinkName (CS_Sink sink, CS_Status *status)
 
wpi::StringRef GetSinkName (CS_Sink sink, wpi::SmallVectorImpl< char > &buf, CS_Status *status)
 
std::string GetSinkDescription (CS_Sink sink, CS_Status *status)
 
wpi::StringRef GetSinkDescription (CS_Sink sink, wpi::SmallVectorImpl< char > &buf, CS_Status *status)
 
CS_Property GetSinkProperty (CS_Sink sink, const wpi::Twine &name, CS_Status *status)
 
wpi::ArrayRef< CS_Property > EnumerateSinkProperties (CS_Sink sink, wpi::SmallVectorImpl< CS_Property > &vec, CS_Status *status)
 
void SetSinkSource (CS_Sink sink, CS_Source source, CS_Status *status)
 
CS_Property GetSinkSourceProperty (CS_Sink sink, const wpi::Twine &name, CS_Status *status)
 
bool SetSinkConfigJson (CS_Sink sink, wpi::StringRef config, CS_Status *status)
 
bool SetSinkConfigJson (CS_Sink sink, const wpi::json &config, CS_Status *status)
 
std::string GetSinkConfigJson (CS_Sink sink, CS_Status *status)
 
wpi::json GetSinkConfigJsonObject (CS_Sink sink, CS_Status *status)
 
CS_Source GetSinkSource (CS_Sink sink, CS_Status *status)
 
CS_Sink CopySink (CS_Sink sink, CS_Status *status)
 
void ReleaseSink (CS_Sink sink, CS_Status *status)
 
std::string GetMjpegServerListenAddress (CS_Sink sink, CS_Status *status)
 
int GetMjpegServerPort (CS_Sink sink, CS_Status *status)
 
void SetSinkDescription (CS_Sink sink, const wpi::Twine &description, CS_Status *status)
 
uint64_t GrabSinkFrame (CS_Sink sink, cv::Mat &image, CS_Status *status)
 
uint64_t GrabSinkFrameTimeout (CS_Sink sink, cv::Mat &image, double timeout, CS_Status *status)
 
std::string GetSinkError (CS_Sink sink, CS_Status *status)
 
wpi::StringRef GetSinkError (CS_Sink sink, wpi::SmallVectorImpl< char > &buf, CS_Status *status)
 
void SetSinkEnabled (CS_Sink sink, bool enabled, CS_Status *status)
 
void SetListenerOnStart (std::function< void()> onStart)
 
void SetListenerOnExit (std::function< void()> onExit)
 
CS_Listener AddListener (std::function< void(const RawEvent &event)> callback, int eventMask, bool immediateNotify, CS_Status *status)
 
void RemoveListener (CS_Listener handle, CS_Status *status)
 
bool NotifierDestroyed ()
 
void SetTelemetryPeriod (double seconds)
 
double GetTelemetryElapsedTime ()
 
int64_t GetTelemetryValue (CS_Handle handle, CS_TelemetryKind kind, CS_Status *status)
 
double GetTelemetryAverageValue (CS_Handle handle, CS_TelemetryKind kind, CS_Status *status)
 
void SetLogger (LogFunc func, unsigned int min_level)
 
void SetDefaultLogger (unsigned int min_level)
 
void Shutdown ()
 
std::vector< UsbCameraInfoEnumerateUsbCameras (CS_Status *status)
 
wpi::ArrayRef< CS_Source > EnumerateSourceHandles (wpi::SmallVectorImpl< CS_Source > &vec, CS_Status *status)
 
wpi::ArrayRef< CS_Sink > EnumerateSinkHandles (wpi::SmallVectorImpl< CS_Sink > &vec, CS_Status *status)
 
std::string GetHostname ()
 
std::vector< std::string > GetNetworkInterfaces ()
 

Detailed Description

CameraServer (cscore) namespace.