5#ifndef CSCORE_CSCORE_C_H_
6#define CSCORE_CSCORE_C_H_
306 int width,
int height,
int fps,
372 int maximum,
int step,
int defaultValue,
375 const char** choices,
int count,
449 double timeout,
CS_Bool* timedOut);
473 unsigned int line,
const char* msg);
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
constexpr auto count() -> size_t
Definition: core.h:1204
CS_EventKind
Listener event kinds.
Definition: cscore_c.h:156
CS_LogLevel
Logging levels.
Definition: cscore_c.h:75
CS_ConnectionStrategy
Connection strategy.
Definition: cscore_c.h:188
CS_HttpCameraKind
HTTP Camera kinds.
Definition: cscore_c.h:136
struct CS_VideoMode CS_VideoMode
Video mode.
CS_PropertyKind
Property kinds.
Definition: cscore_c.h:114
int CS_NotifierDestroyed(void)
CS_PixelFormat
Pixel formats.
Definition: cscore_c.h:90
CS_TelemetryKind
Telemetry kinds.
Definition: cscore_c.h:182
CS_SinkKind
Sink kinds.
Definition: cscore_c.h:146
CS_SourceKind
Source kinds.
Definition: cscore_c.h:125
struct CS_UsbCameraInfo CS_UsbCameraInfo
USB camera information.
CS_StatusValue
Status values.
Definition: cscore_c.h:57
@ CS_SOURCE_PROPERTY_CREATED
Definition: cscore_c.h:163
@ CS_SOURCE_VIDEOMODES_UPDATED
Definition: cscore_c.h:161
@ CS_SINK_PROPERTY_VALUE_UPDATED
Definition: cscore_c.h:174
@ CS_SOURCE_CONNECTED
Definition: cscore_c.h:159
@ CS_TELEMETRY_UPDATED
Definition: cscore_c.h:172
@ CS_SINK_ENABLED
Definition: cscore_c.h:169
@ CS_USB_CAMERAS_CHANGED
Definition: cscore_c.h:176
@ CS_SOURCE_CREATED
Definition: cscore_c.h:157
@ CS_SINK_DESTROYED
Definition: cscore_c.h:168
@ CS_SINK_PROPERTY_CREATED
Definition: cscore_c.h:173
@ CS_SINK_PROPERTY_CHOICES_UPDATED
Definition: cscore_c.h:175
@ CS_NETWORK_INTERFACES_CHANGED
Definition: cscore_c.h:171
@ CS_SOURCE_VIDEOMODE_CHANGED
Definition: cscore_c.h:162
@ CS_SINK_SOURCE_CHANGED
Definition: cscore_c.h:166
@ CS_SOURCE_PROPERTY_VALUE_UPDATED
Definition: cscore_c.h:164
@ CS_SOURCE_DISCONNECTED
Definition: cscore_c.h:160
@ CS_SOURCE_DESTROYED
Definition: cscore_c.h:158
@ CS_SINK_CREATED
Definition: cscore_c.h:167
@ CS_SOURCE_PROPERTY_CHOICES_UPDATED
Definition: cscore_c.h:165
@ CS_SINK_DISABLED
Definition: cscore_c.h:170
@ CS_LOG_WARNING
Definition: cscore_c.h:78
@ CS_LOG_DEBUG
Definition: cscore_c.h:80
@ CS_LOG_DEBUG1
Definition: cscore_c.h:81
@ CS_LOG_CRITICAL
Definition: cscore_c.h:76
@ CS_LOG_INFO
Definition: cscore_c.h:79
@ CS_LOG_DEBUG2
Definition: cscore_c.h:82
@ CS_LOG_DEBUG4
Definition: cscore_c.h:84
@ CS_LOG_ERROR
Definition: cscore_c.h:77
@ CS_LOG_DEBUG3
Definition: cscore_c.h:83
@ CS_CONNECTION_AUTO_MANAGE
Automatically connect or disconnect based on whether any sinks are connected to this source.
Definition: cscore_c.h:193
@ CS_CONNECTION_KEEP_OPEN
Try to keep the connection open regardless of whether any sinks are connected.
Definition: cscore_c.h:199
@ CS_CONNECTION_FORCE_CLOSE
Never open the connection.
Definition: cscore_c.h:205
@ CS_HTTP_MJPGSTREAMER
Definition: cscore_c.h:138
@ CS_HTTP_CSCORE
Definition: cscore_c.h:139
@ CS_HTTP_UNKNOWN
Definition: cscore_c.h:137
@ CS_HTTP_AXIS
Definition: cscore_c.h:140
@ CS_PROP_ENUM
Definition: cscore_c.h:119
@ CS_PROP_NONE
Definition: cscore_c.h:115
@ CS_PROP_INTEGER
Definition: cscore_c.h:117
@ CS_PROP_BOOLEAN
Definition: cscore_c.h:116
@ CS_PROP_STRING
Definition: cscore_c.h:118
@ CS_PIXFMT_BGR
Definition: cscore_c.h:95
@ CS_PIXFMT_GRAY
Definition: cscore_c.h:96
@ CS_PIXFMT_RGB565
Definition: cscore_c.h:94
@ CS_PIXFMT_Y16
Definition: cscore_c.h:97
@ CS_PIXFMT_MJPEG
Definition: cscore_c.h:92
@ CS_PIXFMT_YUYV
Definition: cscore_c.h:93
@ CS_PIXFMT_UNKNOWN
Definition: cscore_c.h:91
@ CS_PIXFMT_UYVY
Definition: cscore_c.h:98
@ CS_SOURCE_FRAMES_RECEIVED
Definition: cscore_c.h:184
@ CS_SOURCE_BYTES_RECEIVED
Definition: cscore_c.h:183
@ CS_SINK_MJPEG
Definition: cscore_c.h:148
@ CS_SINK_RAW
Definition: cscore_c.h:150
@ CS_SINK_CV
Definition: cscore_c.h:149
@ CS_SINK_UNKNOWN
Definition: cscore_c.h:147
@ CS_SOURCE_USB
Definition: cscore_c.h:127
@ CS_SOURCE_HTTP
Definition: cscore_c.h:128
@ CS_SOURCE_UNKNOWN
Definition: cscore_c.h:126
@ CS_SOURCE_RAW
Definition: cscore_c.h:130
@ CS_SOURCE_CV
Definition: cscore_c.h:129
@ CS_WRONG_HANDLE_SUBTYPE
Definition: cscore_c.h:61
@ CS_BAD_URL
Definition: cscore_c.h:67
@ CS_PROPERTY_WRITE_FAILED
Definition: cscore_c.h:58
@ CS_WRONG_PROPERTY_TYPE
Definition: cscore_c.h:63
@ CS_UNSUPPORTED_MODE
Definition: cscore_c.h:69
@ CS_INVALID_HANDLE
Definition: cscore_c.h:60
@ CS_EMPTY_VALUE
Definition: cscore_c.h:66
@ CS_OK
Definition: cscore_c.h:59
@ CS_INVALID_PROPERTY
Definition: cscore_c.h:62
@ CS_READ_FAILED
Definition: cscore_c.h:64
@ CS_TELEMETRY_NOT_ENABLED
Definition: cscore_c.h:68
@ CS_SOURCE_IS_DISCONNECTED
Definition: cscore_c.h:65
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:472
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, CS_Status *status)
CS_Sink CS_CreateCvSinkCallback(const char *name, void *data, void(*processFrame)(void *data, uint64_t time), CS_Status *status)
CS_Bool CS_SetSourcePixelFormat(CS_Source source, enum CS_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_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_Bool CS_SetSourceVideoModeDiscrete(CS_Source source, enum CS_PixelFormat pixelFormat, int width, int height, int fps, 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:51
int CS_Status
Definition: cscore_c.h:44
CS_Handle CS_ListenerPoller
Definition: cscore_c.h:49
CS_Handle CS_Property
Definition: cscore_c.h:47
CS_Handle CS_Sink
Definition: cscore_c.h:50
int CS_Handle
Definition: cscore_c.h:46
int CS_Bool
Definition: cscore_c.h:43
CS_Handle CS_Listener
Definition: cscore_c.h:48
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)
::uint64_t uint64_t
Definition: Meta.h:58
::int64_t int64_t
Definition: Meta.h:59
fps
Definition: velocity.h:46
Listener event.
Definition: cscore_c.h:211
const char * name
Definition: cscore_c.h:219
CS_Property property
Definition: cscore_c.h:225
CS_VideoMode mode
Definition: cscore_c.h:222
const char * valueStr
Definition: cscore_c.h:228
enum CS_PropertyKind propertyKind
Definition: cscore_c.h:226
int value
Definition: cscore_c.h:227
CS_Listener listener
Definition: cscore_c.h:231
enum CS_EventKind kind
Definition: cscore_c.h:212
CS_Source source
Definition: cscore_c.h:215
CS_Sink sink
Definition: cscore_c.h:216
USB camera information.
Definition: cscore_c.h:237
char ** otherPaths
Definition: cscore_c.h:242
int vendorId
Definition: cscore_c.h:243
int otherPathsCount
Definition: cscore_c.h:241
int dev
Definition: cscore_c.h:238
int productId
Definition: cscore_c.h:244
char * name
Definition: cscore_c.h:240
char * path
Definition: cscore_c.h:239
Video mode.
Definition: cscore_c.h:104
int width
Definition: cscore_c.h:106
int pixelFormat
Definition: cscore_c.h:105
int fps
Definition: cscore_c.h:108
int height
Definition: cscore_c.h:107
Definition: format.h:1552