5#ifndef CSCORE_CSCORE_C_H_
6#define CSCORE_CSCORE_C_H_
294 int width,
int height,
int fps,
360 int maximum,
int step,
int defaultValue,
363 const char** choices,
int count,
377 void (*processFrame)(
void* data, uint64_t time),
428 void* data,
void (*callback)(
void* data,
const struct CS_Event* event),
439 double timeout,
CS_Bool* timedOut);
463 unsigned int line,
const char* msg);
WPI_PixelFormat
Pixel formats.
Definition: RawFrame.h:49
then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file
Definition: ThirdPartyNotices.txt:192
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation source
Definition: ThirdPartyNotices.txt:111
CS_EventKind
Listener event kinds.
Definition: cscore_c.h:144
CS_LogLevel
Logging levels.
Definition: cscore_c.h:77
CS_ConnectionStrategy
Connection strategy.
Definition: cscore_c.h:176
CS_HttpCameraKind
HTTP Camera kinds.
Definition: cscore_c.h:124
struct CS_VideoMode CS_VideoMode
Video mode.
CS_PropertyKind
Property kinds.
Definition: cscore_c.h:102
int CS_NotifierDestroyed(void)
CS_TelemetryKind
Telemetry kinds.
Definition: cscore_c.h:170
CS_SinkKind
Sink kinds.
Definition: cscore_c.h:134
CS_SourceKind
Source kinds.
Definition: cscore_c.h:113
struct CS_UsbCameraInfo CS_UsbCameraInfo
USB camera information.
CS_StatusValue
Status values.
Definition: cscore_c.h:59
@ CS_SOURCE_PROPERTY_CREATED
Definition: cscore_c.h:151
@ CS_SOURCE_VIDEOMODES_UPDATED
Definition: cscore_c.h:149
@ CS_SINK_PROPERTY_VALUE_UPDATED
Definition: cscore_c.h:162
@ CS_SOURCE_CONNECTED
Definition: cscore_c.h:147
@ CS_TELEMETRY_UPDATED
Definition: cscore_c.h:160
@ CS_SINK_ENABLED
Definition: cscore_c.h:157
@ CS_USB_CAMERAS_CHANGED
Definition: cscore_c.h:164
@ CS_SOURCE_CREATED
Definition: cscore_c.h:145
@ CS_SINK_DESTROYED
Definition: cscore_c.h:156
@ CS_SINK_PROPERTY_CREATED
Definition: cscore_c.h:161
@ CS_SINK_PROPERTY_CHOICES_UPDATED
Definition: cscore_c.h:163
@ CS_NETWORK_INTERFACES_CHANGED
Definition: cscore_c.h:159
@ CS_SOURCE_VIDEOMODE_CHANGED
Definition: cscore_c.h:150
@ CS_SINK_SOURCE_CHANGED
Definition: cscore_c.h:154
@ CS_SOURCE_PROPERTY_VALUE_UPDATED
Definition: cscore_c.h:152
@ CS_SOURCE_DISCONNECTED
Definition: cscore_c.h:148
@ CS_SOURCE_DESTROYED
Definition: cscore_c.h:146
@ CS_SINK_CREATED
Definition: cscore_c.h:155
@ CS_SOURCE_PROPERTY_CHOICES_UPDATED
Definition: cscore_c.h:153
@ CS_SINK_DISABLED
Definition: cscore_c.h:158
@ CS_LOG_WARNING
Definition: cscore_c.h:80
@ CS_LOG_DEBUG
Definition: cscore_c.h:82
@ CS_LOG_DEBUG1
Definition: cscore_c.h:83
@ CS_LOG_CRITICAL
Definition: cscore_c.h:78
@ CS_LOG_INFO
Definition: cscore_c.h:81
@ CS_LOG_DEBUG2
Definition: cscore_c.h:84
@ CS_LOG_DEBUG4
Definition: cscore_c.h:86
@ CS_LOG_ERROR
Definition: cscore_c.h:79
@ CS_LOG_DEBUG3
Definition: cscore_c.h:85
@ CS_CONNECTION_AUTO_MANAGE
Automatically connect or disconnect based on whether any sinks are connected to this source.
Definition: cscore_c.h:181
@ CS_CONNECTION_KEEP_OPEN
Try to keep the connection open regardless of whether any sinks are connected.
Definition: cscore_c.h:187
@ CS_CONNECTION_FORCE_CLOSE
Never open the connection.
Definition: cscore_c.h:193
@ CS_HTTP_MJPGSTREAMER
Definition: cscore_c.h:126
@ CS_HTTP_CSCORE
Definition: cscore_c.h:127
@ CS_HTTP_UNKNOWN
Definition: cscore_c.h:125
@ CS_HTTP_AXIS
Definition: cscore_c.h:128
@ CS_PROP_ENUM
Definition: cscore_c.h:107
@ CS_PROP_NONE
Definition: cscore_c.h:103
@ CS_PROP_INTEGER
Definition: cscore_c.h:105
@ CS_PROP_BOOLEAN
Definition: cscore_c.h:104
@ CS_PROP_STRING
Definition: cscore_c.h:106
@ CS_SOURCE_FRAMES_RECEIVED
Definition: cscore_c.h:172
@ CS_SOURCE_BYTES_RECEIVED
Definition: cscore_c.h:171
@ CS_SINK_MJPEG
Definition: cscore_c.h:136
@ CS_SINK_RAW
Definition: cscore_c.h:138
@ CS_SINK_CV
Definition: cscore_c.h:137
@ CS_SINK_UNKNOWN
Definition: cscore_c.h:135
@ CS_SOURCE_USB
Definition: cscore_c.h:115
@ CS_SOURCE_HTTP
Definition: cscore_c.h:116
@ CS_SOURCE_UNKNOWN
Definition: cscore_c.h:114
@ CS_SOURCE_RAW
Definition: cscore_c.h:118
@ CS_SOURCE_CV
Definition: cscore_c.h:117
@ CS_WRONG_HANDLE_SUBTYPE
Definition: cscore_c.h:63
@ CS_BAD_URL
Definition: cscore_c.h:69
@ CS_PROPERTY_WRITE_FAILED
Definition: cscore_c.h:60
@ CS_WRONG_PROPERTY_TYPE
Definition: cscore_c.h:65
@ CS_UNSUPPORTED_MODE
Definition: cscore_c.h:71
@ CS_INVALID_HANDLE
Definition: cscore_c.h:62
@ CS_EMPTY_VALUE
Definition: cscore_c.h:68
@ CS_OK
Definition: cscore_c.h:61
@ CS_INVALID_PROPERTY
Definition: cscore_c.h:64
@ CS_READ_FAILED
Definition: cscore_c.h:66
@ CS_TELEMETRY_NOT_ENABLED
Definition: cscore_c.h:70
@ CS_SOURCE_IS_DISCONNECTED
Definition: cscore_c.h:67
char ** CS_GetHttpCameraUrls(CS_Source source, int *count, CS_Status *status)
enum CS_HttpCameraKind CS_GetHttpCameraKind(CS_Source source, CS_Status *status)
void CS_SetHttpCameraUrls(CS_Source source, const char **urls, int count, CS_Status *status)
CS_Listener CS_AddPolledListener(CS_ListenerPoller poller, int eventMask, CS_Bool immediateNotify, CS_Status *status)
CS_ListenerPoller CS_CreateListenerPoller(void)
void CS_SetListenerOnExit(void(*onExit)(void *data), void *data)
void CS_DestroyListenerPoller(CS_ListenerPoller poller)
void CS_SetListenerOnStart(void(*onStart)(void *data), void *data)
void CS_RemoveListener(CS_Listener handle, CS_Status *status)
void CS_CancelPollListener(CS_ListenerPoller poller)
struct CS_Event * CS_PollListenerTimeout(CS_ListenerPoller poller, int *count, double timeout, CS_Bool *timedOut)
CS_Listener CS_AddListener(void *data, void(*callback)(void *data, const struct CS_Event *event), int eventMask, CS_Bool immediateNotify, CS_Status *status)
struct CS_Event * CS_PollListener(CS_ListenerPoller poller, int *count)
void CS_FreeEvents(struct CS_Event *arr, int count)
void CS_SetDefaultLogger(unsigned int min_level)
void(* CS_LogFunc)(unsigned int level, const char *file, unsigned int line, const char *msg)
Definition: cscore_c.h:462
void CS_SetLogger(CS_LogFunc func, unsigned int min_level)
char * CS_GetMjpegServerListenAddress(CS_Sink sink, CS_Status *status)
int CS_GetMjpegServerPort(CS_Sink sink, CS_Status *status)
char * CS_GetSinkError(CS_Sink sink, CS_Status *status)
void CS_SetSinkEnabled(CS_Sink sink, CS_Bool enabled, CS_Status *status)
void CS_SetSinkDescription(CS_Sink sink, const char *description, CS_Status *status)
void CS_SetSourceEnumPropertyChoices(CS_Source source, CS_Property property, const char **choices, int count, CS_Status *status)
void CS_SetSourceDescription(CS_Source source, const char *description, CS_Status *status)
CS_Property CS_CreateSourceProperty(CS_Source source, const char *name, enum CS_PropertyKind kind, int minimum, int maximum, int step, int defaultValue, int value, CS_Status *status)
void CS_NotifySourceError(CS_Source source, const char *msg, CS_Status *status)
void CS_SetSourceConnected(CS_Source source, CS_Bool connected, CS_Status *status)
char ** CS_GetEnumPropertyChoices(CS_Property property, int *count, CS_Status *status)
int CS_GetPropertyStep(CS_Property property, CS_Status *status)
char * CS_GetPropertyName(CS_Property property, CS_Status *status)
int CS_GetPropertyMin(CS_Property property, CS_Status *status)
char * CS_GetStringProperty(CS_Property property, CS_Status *status)
enum CS_PropertyKind CS_GetPropertyKind(CS_Property property, CS_Status *status)
int CS_GetProperty(CS_Property property, CS_Status *status)
void CS_SetProperty(CS_Property property, int value, CS_Status *status)
void CS_SetStringProperty(CS_Property property, const char *value, CS_Status *status)
int CS_GetPropertyDefault(CS_Property property, CS_Status *status)
int CS_GetPropertyMax(CS_Property property, CS_Status *status)
CS_Source CS_GetSinkSource(CS_Sink sink, CS_Status *status)
char * CS_GetSinkDescription(CS_Sink sink, CS_Status *status)
void CS_ReleaseSink(CS_Sink sink, CS_Status *status)
CS_Bool CS_SetSinkConfigJson(CS_Sink sink, const char *config, CS_Status *status)
CS_Property CS_GetSinkSourceProperty(CS_Sink sink, const char *name, CS_Status *status)
CS_Sink CS_CopySink(CS_Sink sink, CS_Status *status)
char * CS_GetSinkConfigJson(CS_Sink sink, CS_Status *status)
void CS_SetSinkSource(CS_Sink sink, CS_Source source, CS_Status *status)
CS_Property CS_GetSinkProperty(CS_Sink sink, const char *name, CS_Status *status)
enum CS_SinkKind CS_GetSinkKind(CS_Sink sink, CS_Status *status)
CS_Property * CS_EnumerateSinkProperties(CS_Sink sink, int *count, CS_Status *status)
char * CS_GetSinkName(CS_Sink sink, CS_Status *status)
CS_Sink CS_CreateMjpegServer(const char *name, const char *listenAddress, int port, CS_Status *status)
CS_Sink CS_CreateCvSink(const char *name, enum WPI_PixelFormat pixelFormat, CS_Status *status)
CS_Sink CS_CreateCvSinkCallback(const char *name, enum WPI_PixelFormat pixelFormat, void *data, void(*processFrame)(void *data, uint64_t time), CS_Status *status)
CS_Bool CS_SetSourcePixelFormat(CS_Source source, enum WPI_PixelFormat pixelFormat, CS_Status *status)
CS_Bool CS_IsSourceEnabled(CS_Source source, CS_Status *status)
char * CS_GetSourceConfigJson(CS_Source source, CS_Status *status)
void CS_SetSourceConnectionStrategy(CS_Source source, enum CS_ConnectionStrategy strategy, CS_Status *status)
CS_Bool CS_SetSourceResolution(CS_Source source, int width, int height, CS_Status *status)
CS_Bool CS_SetSourceConfigJson(CS_Source source, const char *config, CS_Status *status)
void CS_ReleaseSource(CS_Source source, CS_Status *status)
CS_Bool CS_SetSourceVideoModeDiscrete(CS_Source source, enum WPI_PixelFormat pixelFormat, int width, int height, int fps, CS_Status *status)
CS_Bool CS_IsSourceConnected(CS_Source source, CS_Status *status)
char * CS_GetSourceDescription(CS_Source source, CS_Status *status)
CS_Sink * CS_EnumerateSourceSinks(CS_Source source, int *count, CS_Status *status)
CS_Property CS_GetSourceProperty(CS_Source source, const char *name, CS_Status *status)
CS_Source CS_CopySource(CS_Source source, CS_Status *status)
CS_Bool CS_SetSourceVideoMode(CS_Source source, const CS_VideoMode *mode, CS_Status *status)
uint64_t CS_GetSourceLastFrameTime(CS_Source source, CS_Status *status)
CS_VideoMode * CS_EnumerateSourceVideoModes(CS_Source source, int *count, CS_Status *status)
void CS_GetSourceVideoMode(CS_Source source, CS_VideoMode *mode, CS_Status *status)
CS_Property * CS_EnumerateSourceProperties(CS_Source source, int *count, CS_Status *status)
char * CS_GetSourceName(CS_Source source, CS_Status *status)
CS_Bool CS_SetSourceFPS(CS_Source source, int fps, CS_Status *status)
enum CS_SourceKind CS_GetSourceKind(CS_Source source, CS_Status *status)
CS_Source CS_CreateHttpCamera(const char *name, const char *url, enum CS_HttpCameraKind kind, CS_Status *status)
CS_Source CS_CreateUsbCameraPath(const char *name, const char *path, CS_Status *status)
CS_Source CS_CreateUsbCameraDev(const char *name, int dev, CS_Status *status)
CS_Source CS_CreateHttpCameraMulti(const char *name, const char **urls, int count, enum CS_HttpCameraKind kind, CS_Status *status)
CS_Source CS_CreateCvSource(const char *name, const CS_VideoMode *mode, CS_Status *status)
void CS_SetCameraWhiteBalanceHoldCurrent(CS_Source source, CS_Status *status)
void CS_SetCameraExposureHoldCurrent(CS_Source source, CS_Status *status)
void CS_SetCameraExposureManual(CS_Source source, int value, CS_Status *status)
void CS_SetCameraWhiteBalanceManual(CS_Source source, int value, CS_Status *status)
void CS_SetCameraExposureAuto(CS_Source source, CS_Status *status)
void CS_SetCameraWhiteBalanceAuto(CS_Source source, CS_Status *status)
void CS_SetCameraBrightness(CS_Source source, int brightness, CS_Status *status)
int CS_GetCameraBrightness(CS_Source source, CS_Status *status)
double CS_GetTelemetryElapsedTime(void)
double CS_GetTelemetryAverageValue(CS_Handle handle, enum CS_TelemetryKind kind, CS_Status *status)
int64_t CS_GetTelemetryValue(CS_Handle handle, enum CS_TelemetryKind kind, CS_Status *status)
void CS_SetTelemetryPeriod(double seconds)
CS_Handle CS_Source
Definition: cscore_c.h:53
int CS_Status
Definition: cscore_c.h:46
CS_Handle CS_ListenerPoller
Definition: cscore_c.h:51
CS_Handle CS_Property
Definition: cscore_c.h:49
CS_Handle CS_Sink
Definition: cscore_c.h:52
int CS_Handle
Definition: cscore_c.h:48
int CS_Bool
Definition: cscore_c.h:45
CS_Handle CS_Listener
Definition: cscore_c.h:50
CS_UsbCameraInfo * CS_GetUsbCameraInfo(CS_Source source, CS_Status *status)
void CS_SetUsbCameraPath(CS_Source source, const char *path, CS_Status *status)
char * CS_GetUsbCameraPath(CS_Source source, CS_Status *status)
void CS_FreeNetworkInterfaces(char **interfaces, int count)
void CS_ReleaseEnumeratedSources(CS_Source *sources, int count)
void CS_FreeString(char *str)
CS_UsbCameraInfo * CS_EnumerateUsbCameras(int *count, CS_Status *status)
CS_Sink * CS_EnumerateSinks(int *count, CS_Status *status)
void CS_FreeUsbCameraInfo(CS_UsbCameraInfo *info)
void CS_FreeEnumeratedVideoModes(CS_VideoMode *modes, int count)
void CS_ReleaseEnumeratedSinks(CS_Sink *sinks, int count)
char * CS_GetHostname(void)
void CS_FreeHttpCameraUrls(char **urls, int count)
void CS_FreeEnumPropertyChoices(char **choices, int count)
CS_Source * CS_EnumerateSources(int *count, CS_Status *status)
void CS_FreeEnumeratedUsbCameras(CS_UsbCameraInfo *cameras, int count)
void CS_FreeEnumeratedProperties(CS_Property *properties, int count)
char ** CS_GetNetworkInterfaces(int *count)
constexpr auto count() -> size_t
Definition: core.h:1203
fps
Definition: velocity.h:46
constexpr const char * name(const T &)
Listener event.
Definition: cscore_c.h:199
const char * name
Definition: cscore_c.h:207
CS_Property property
Definition: cscore_c.h:213
CS_VideoMode mode
Definition: cscore_c.h:210
const char * valueStr
Definition: cscore_c.h:216
enum CS_PropertyKind propertyKind
Definition: cscore_c.h:214
int value
Definition: cscore_c.h:215
CS_Listener listener
Definition: cscore_c.h:219
enum CS_EventKind kind
Definition: cscore_c.h:200
CS_Source source
Definition: cscore_c.h:203
CS_Sink sink
Definition: cscore_c.h:204
USB camera information.
Definition: cscore_c.h:225
char ** otherPaths
Definition: cscore_c.h:230
int vendorId
Definition: cscore_c.h:231
int otherPathsCount
Definition: cscore_c.h:229
int dev
Definition: cscore_c.h:226
int productId
Definition: cscore_c.h:232
char * name
Definition: cscore_c.h:228
char * path
Definition: cscore_c.h:227
Video mode.
Definition: cscore_c.h:92
int width
Definition: cscore_c.h:94
int pixelFormat
Definition: cscore_c.h:93
int fps
Definition: cscore_c.h:96
int height
Definition: cscore_c.h:95