WPILibC++ 2023.4.3-108-ge5452e3
cscore_c.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#ifndef CSCORE_CSCORE_C_H_
6#define CSCORE_CSCORE_C_H_
7
8#include <stdint.h>
9
10#ifdef __cplusplus
11#include <cstddef>
12#else
13#include <stddef.h>
14#endif
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/**
21 * @defgroup cscore_c_api cscore C API
22 *
23 * Handle-based interface for C.
24 *
25 * <p>Sources and sinks are reference counted internally to the library.
26 * Any time a source or sink handle is returned or provided to a callback,
27 * the reference count is incremented.
28 *
29 * <p>Calling CS_ReleaseSource() or CS_ReleaseSink() decrements the reference
30 * count, and when the reference count reaches zero, the object is destroyed.
31 *
32 * <p>Connecting a source to a sink increments the reference count of the
33 * source, and when the sink is destroyed (its reference count reaches zero),
34 * the source reference count is decremented.
35 *
36 * @{
37 */
38
39/**
40 * @defgroup cscore_typedefs Typedefs
41 * @{
42 */
43typedef int CS_Bool;
44typedef int CS_Status;
45
46typedef int CS_Handle;
52/** @} */
53
54/**
55 * Status values
56 */
59 CS_OK = 0,
60 CS_INVALID_HANDLE = -2000, // handle was invalid (does not exist)
67 CS_BAD_URL = -2007,
70};
71
72/**
73 * Logging levels
74 */
85};
86
87/**
88 * Pixel formats
89 */
99};
100
101/**
102 * Video mode
103 */
104typedef struct CS_VideoMode {
106 int width;
108 int fps;
110
111/**
112 * Property kinds
113 */
119 CS_PROP_ENUM = 8
121
122/**
123 * Source kinds
124 */
131};
132
133/**
134 * HTTP Camera kinds
135 */
140 CS_HTTP_AXIS = 3
142
143/**
144 * Sink kinds
145 */
150 CS_SINK_RAW = 8
152
153/**
154 * Listener event kinds
155 */
176 CS_USB_CAMERAS_CHANGED = 0x80000
178
179/**
180 * Telemetry kinds
181 */
186
187/** Connection strategy */
189 /**
190 * Automatically connect or disconnect based on whether any sinks are
191 * connected to this source. This is the default behavior.
192 */
194
195 /**
196 * Try to keep the connection open regardless of whether any sinks are
197 * connected.
198 */
200
201 /**
202 * Never open the connection. If this is set when the connection is open,
203 * close the connection.
204 */
207
208/**
209 * Listener event
210 */
211struct CS_Event {
213
214 // Valid for CS_SOURCE_* and CS_SINK_* respectively
217
218 // Source/sink/property name
219 const char* name;
220
221 // Fields for CS_SOURCE_VIDEOMODE_CHANGED event
223
224 // Fields for CS_SOURCE_PROPERTY_* events
227 int value;
228 const char* valueStr;
229
230 // Listener that was triggered
232};
233
234/**
235 * USB camera information
236 */
237typedef struct CS_UsbCameraInfo {
238 int dev;
239 char* path;
240 char* name;
246
247/**
248 * @defgroup cscore_property_cfunc Property Functions
249 * @{
250 */
252 CS_Status* status);
253char* CS_GetPropertyName(CS_Property property, CS_Status* status);
254int CS_GetProperty(CS_Property property, CS_Status* status);
255void CS_SetProperty(CS_Property property, int value, CS_Status* status);
261void CS_SetStringProperty(CS_Property property, const char* value,
262 CS_Status* status);
264 CS_Status* status);
265/** @} */
266
267/**
268 * @defgroup cscore_source_create_cfunc Source Creation Functions
269 * @{
270 */
271CS_Source CS_CreateUsbCameraDev(const char* name, int dev, CS_Status* status);
272CS_Source CS_CreateUsbCameraPath(const char* name, const char* path,
273 CS_Status* status);
274CS_Source CS_CreateHttpCamera(const char* name, const char* url,
275 enum CS_HttpCameraKind kind, CS_Status* status);
276CS_Source CS_CreateHttpCameraMulti(const char* name, const char** urls,
277 int count, enum CS_HttpCameraKind kind,
278 CS_Status* status);
279CS_Source CS_CreateCvSource(const char* name, const CS_VideoMode* mode,
280 CS_Status* status);
281/** @} */
282
283/**
284 * @defgroup cscore_source_cfunc Source Functions
285 * @{
286 */
292 enum CS_ConnectionStrategy strategy,
293 CS_Status* status);
297 CS_Status* status);
299 CS_Status* status);
301 CS_Status* status);
303 CS_Status* status);
305 enum CS_PixelFormat pixelFormat,
306 int width, int height, int fps,
307 CS_Status* status);
309 enum CS_PixelFormat pixelFormat,
310 CS_Status* status);
312 CS_Status* status);
315 CS_Status* status);
318 CS_Status* status);
320 CS_Status* status);
323/** @} */
324
325/**
326 * @defgroup cscore_source_prop_cfunc Camera Source Common Property Functions
327 * @{
328 */
330 CS_Status* status);
335 CS_Status* status);
339/** @} */
340
341/**
342 * @defgroup cscore_usbcamera_cfunc UsbCamera Source Functions
343 * @{
344 */
345void CS_SetUsbCameraPath(CS_Source source, const char* path, CS_Status* status);
348/** @} */
349
350/**
351 * @defgroup cscore_httpcamera_cfunc HttpCamera Source Functions
352 * @{
353 */
355 CS_Status* status);
356void CS_SetHttpCameraUrls(CS_Source source, const char** urls, int count,
357 CS_Status* status);
359/** @} */
360
361/**
362 * @defgroup cscore_opencv_source_cfunc OpenCV Source Functions
363 * @{
364 */
365void CS_NotifySourceError(CS_Source source, const char* msg, CS_Status* status);
367 CS_Status* status);
368void CS_SetSourceDescription(CS_Source source, const char* description,
369 CS_Status* status);
371 enum CS_PropertyKind kind, int minimum,
372 int maximum, int step, int defaultValue,
373 int value, CS_Status* status);
375 const char** choices, int count,
376 CS_Status* status);
377/** @} */
378
379/**
380 * @defgroup cscore_sink_create_cfunc Sink Creation Functions
381 * @{
382 */
383CS_Sink CS_CreateMjpegServer(const char* name, const char* listenAddress,
384 int port, CS_Status* status);
385CS_Sink CS_CreateCvSink(const char* name, CS_Status* status);
386CS_Sink CS_CreateCvSinkCallback(const char* name, void* data,
387 void (*processFrame)(void* data, uint64_t time),
388 CS_Status* status);
389/** @} */
390
391/**
392 * @defgroup cscore_sink_cfunc Sink Functions
393 * @{
394 */
396char* CS_GetSinkName(CS_Sink sink, CS_Status* status);
399 CS_Status* status);
401 CS_Status* status);
404 CS_Status* status);
405CS_Bool CS_SetSinkConfigJson(CS_Sink sink, const char* config,
406 CS_Status* status);
410void CS_ReleaseSink(CS_Sink sink, CS_Status* status);
411/** @} */
412
413/**
414 * @defgroup cscore_mjpegserver_cfunc MjpegServer Sink Functions
415 * @{
416 */
419/** @} */
420
421/**
422 * @defgroup cscore_opencv_sink_cfunc OpenCV Sink Functions
423 * @{
424 */
425void CS_SetSinkDescription(CS_Sink sink, const char* description,
426 CS_Status* status);
427char* CS_GetSinkError(CS_Sink sink, CS_Status* status);
428void CS_SetSinkEnabled(CS_Sink sink, CS_Bool enabled, CS_Status* status);
429/** @} */
430
431/**
432 * @defgroup cscore_listener_cfunc Listener Functions
433 * @{
434 */
435void CS_SetListenerOnStart(void (*onStart)(void* data), void* data);
436void CS_SetListenerOnExit(void (*onExit)(void* data), void* data);
438 void* data, void (*callback)(void* data, const struct CS_Event* event),
439 int eventMask, CS_Bool immediateNotify, CS_Status* status);
440
442
446 CS_Bool immediateNotify, CS_Status* status);
449 double timeout, CS_Bool* timedOut);
450void CS_FreeEvents(struct CS_Event* arr, int count);
452/** @} */
453
455
456/**
457 * @defgroup cscore_telemetry_cfunc Telemetry Functions
458 * @{
459 */
460void CS_SetTelemetryPeriod(double seconds);
463 CS_Status* status);
465 CS_Status* status);
466/** @} */
467
468/**
469 * @defgroup cscore_logging_cfunc Logging Functions
470 * @{
471 */
472typedef void (*CS_LogFunc)(unsigned int level, const char* file,
473 unsigned int line, const char* msg);
474void CS_SetLogger(CS_LogFunc func, unsigned int min_level);
475void CS_SetDefaultLogger(unsigned int min_level);
476/** @} */
477
478/**
479 * @defgroup cscore_shutdown_cfunc Library Shutdown Function
480 * @{
481 */
482void CS_Shutdown(void);
483/** @} */
484
485/**
486 * @defgroup cscore_utility_cfunc Utility Functions
487 * @{
488 */
489
492
495
498
499void CS_FreeString(char* str);
500void CS_FreeEnumPropertyChoices(char** choices, int count);
502void CS_FreeHttpCameraUrls(char** urls, int count);
503
506
507char* CS_GetHostname(void);
508
510void CS_FreeNetworkInterfaces(char** interfaces, int count);
511/** @} */
512
513/** @} */
514
515#ifdef __cplusplus
516} // extern "C"
517#endif
518
519#endif // CSCORE_CSCORE_C_H_
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
Definition: core.h:1240
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)
void CS_Shutdown(void)
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