WPILibC++ 2024.3.2
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#include <wpi/RawFrame.h>
11
12#ifdef __cplusplus
13#include <cstddef>
14#else
15#include <stddef.h>
16#endif
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22/**
23 * @defgroup cscore_c_api cscore C API
24 *
25 * Handle-based interface for C.
26 *
27 * <p>Sources and sinks are reference counted internally to the library.
28 * Any time a source or sink handle is returned or provided to a callback,
29 * the reference count is incremented.
30 *
31 * <p>Calling CS_ReleaseSource() or CS_ReleaseSink() decrements the reference
32 * count, and when the reference count reaches zero, the object is destroyed.
33 *
34 * <p>Connecting a source to a sink increments the reference count of the
35 * source, and when the sink is destroyed (its reference count reaches zero),
36 * the source reference count is decremented.
37 *
38 * @{
39 */
40
41/**
42 * @defgroup cscore_typedefs Typedefs
43 * @{
44 */
45typedef int CS_Bool;
46typedef int CS_Status;
47
48typedef int CS_Handle;
54/** @} */
55
56/**
57 * Status values
58 */
61 CS_OK = 0,
62 CS_INVALID_HANDLE = -2000, // handle was invalid (does not exist)
69 CS_BAD_URL = -2007,
72};
73
74/**
75 * Logging levels
76 */
87};
88
89/**
90 * Video mode
91 */
92typedef struct CS_VideoMode {
94 int width;
95 int height;
96 int fps;
98
99/**
100 * Property kinds
101 */
107 CS_PROP_ENUM = 8
109
110/**
111 * Source kinds
112 */
119};
120
121/**
122 * HTTP Camera kinds
123 */
128 CS_HTTP_AXIS = 3
130
131/**
132 * Sink kinds
133 */
138 CS_SINK_RAW = 8
140
141/**
142 * Listener event kinds
143 */
164 CS_USB_CAMERAS_CHANGED = 0x80000
166
167/**
168 * Telemetry kinds
169 */
174
175/** Connection strategy */
177 /**
178 * Automatically connect or disconnect based on whether any sinks are
179 * connected to this source. This is the default behavior.
180 */
182
183 /**
184 * Try to keep the connection open regardless of whether any sinks are
185 * connected.
186 */
188
189 /**
190 * Never open the connection. If this is set when the connection is open,
191 * close the connection.
192 */
195
196/**
197 * Listener event
198 */
199struct CS_Event {
201
202 // Valid for CS_SOURCE_* and CS_SINK_* respectively
205
206 // Source/sink/property name
207 const char* name;
208
209 // Fields for CS_SOURCE_VIDEOMODE_CHANGED event
211
212 // Fields for CS_SOURCE_PROPERTY_* events
215 int value;
216 const char* valueStr;
217
218 // Listener that was triggered
220};
221
222/**
223 * USB camera information
224 */
225typedef struct CS_UsbCameraInfo {
226 int dev;
227 char* path;
228 char* name;
234
235/**
236 * @defgroup cscore_property_cfunc Property Functions
237 * @{
238 */
240 CS_Status* status);
241char* CS_GetPropertyName(CS_Property property, CS_Status* status);
242int CS_GetProperty(CS_Property property, CS_Status* status);
243void CS_SetProperty(CS_Property property, int value, CS_Status* status);
249void CS_SetStringProperty(CS_Property property, const char* value,
250 CS_Status* status);
252 CS_Status* status);
253/** @} */
254
255/**
256 * @defgroup cscore_source_create_cfunc Source Creation Functions
257 * @{
258 */
259CS_Source CS_CreateUsbCameraDev(const char* name, int dev, CS_Status* status);
260CS_Source CS_CreateUsbCameraPath(const char* name, const char* path,
261 CS_Status* status);
262CS_Source CS_CreateHttpCamera(const char* name, const char* url,
263 enum CS_HttpCameraKind kind, CS_Status* status);
264CS_Source CS_CreateHttpCameraMulti(const char* name, const char** urls,
265 int count, enum CS_HttpCameraKind kind,
266 CS_Status* status);
268 CS_Status* status);
269/** @} */
270
271/**
272 * @defgroup cscore_source_cfunc Source Functions
273 * @{
274 */
280 enum CS_ConnectionStrategy strategy,
281 CS_Status* status);
285 CS_Status* status);
287 CS_Status* status);
289 CS_Status* status);
291 CS_Status* status);
293 enum WPI_PixelFormat pixelFormat,
294 int width, int height, int fps,
295 CS_Status* status);
297 enum WPI_PixelFormat pixelFormat,
298 CS_Status* status);
300 CS_Status* status);
303 CS_Status* status);
306 CS_Status* status);
308 CS_Status* status);
311/** @} */
312
313/**
314 * @defgroup cscore_source_prop_cfunc Camera Source Common Property Functions
315 * @{
316 */
318 CS_Status* status);
323 CS_Status* status);
327/** @} */
328
329/**
330 * @defgroup cscore_usbcamera_cfunc UsbCamera Source Functions
331 * @{
332 */
333void CS_SetUsbCameraPath(CS_Source source, const char* path, CS_Status* status);
336/** @} */
337
338/**
339 * @defgroup cscore_httpcamera_cfunc HttpCamera Source Functions
340 * @{
341 */
343 CS_Status* status);
344void CS_SetHttpCameraUrls(CS_Source source, const char** urls, int count,
345 CS_Status* status);
347/** @} */
348
349/**
350 * @defgroup cscore_opencv_source_cfunc OpenCV Source Functions
351 * @{
352 */
353void CS_NotifySourceError(CS_Source source, const char* msg, CS_Status* status);
355 CS_Status* status);
356void CS_SetSourceDescription(CS_Source source, const char* description,
357 CS_Status* status);
359 enum CS_PropertyKind kind, int minimum,
360 int maximum, int step, int defaultValue,
361 int value, CS_Status* status);
363 const char** choices, int count,
364 CS_Status* status);
365/** @} */
366
367/**
368 * @defgroup cscore_sink_create_cfunc Sink Creation Functions
369 * @{
370 */
371CS_Sink CS_CreateMjpegServer(const char* name, const char* listenAddress,
372 int port, CS_Status* status);
373CS_Sink CS_CreateCvSink(const char* name, enum WPI_PixelFormat pixelFormat,
374 CS_Status* status);
376 enum WPI_PixelFormat pixelFormat, void* data,
377 void (*processFrame)(void* data, uint64_t time),
378 CS_Status* status);
379/** @} */
380
381/**
382 * @defgroup cscore_sink_cfunc Sink Functions
383 * @{
384 */
386char* CS_GetSinkName(CS_Sink sink, CS_Status* status);
389 CS_Status* status);
391 CS_Status* status);
394 CS_Status* status);
395CS_Bool CS_SetSinkConfigJson(CS_Sink sink, const char* config,
396 CS_Status* status);
400void CS_ReleaseSink(CS_Sink sink, CS_Status* status);
401/** @} */
402
403/**
404 * @defgroup cscore_mjpegserver_cfunc MjpegServer Sink Functions
405 * @{
406 */
409/** @} */
410
411/**
412 * @defgroup cscore_opencv_sink_cfunc OpenCV Sink Functions
413 * @{
414 */
415void CS_SetSinkDescription(CS_Sink sink, const char* description,
416 CS_Status* status);
417char* CS_GetSinkError(CS_Sink sink, CS_Status* status);
418void CS_SetSinkEnabled(CS_Sink sink, CS_Bool enabled, CS_Status* status);
419/** @} */
420
421/**
422 * @defgroup cscore_listener_cfunc Listener Functions
423 * @{
424 */
425void CS_SetListenerOnStart(void (*onStart)(void* data), void* data);
426void CS_SetListenerOnExit(void (*onExit)(void* data), void* data);
428 void* data, void (*callback)(void* data, const struct CS_Event* event),
429 int eventMask, CS_Bool immediateNotify, CS_Status* status);
430
432
436 CS_Bool immediateNotify, CS_Status* status);
439 double timeout, CS_Bool* timedOut);
440void CS_FreeEvents(struct CS_Event* arr, int count);
442/** @} */
443
445
446/**
447 * @defgroup cscore_telemetry_cfunc Telemetry Functions
448 * @{
449 */
450void CS_SetTelemetryPeriod(double seconds);
453 CS_Status* status);
455 CS_Status* status);
456/** @} */
457
458/**
459 * @defgroup cscore_logging_cfunc Logging Functions
460 * @{
461 */
462typedef void (*CS_LogFunc)(unsigned int level, const char* file,
463 unsigned int line, const char* msg);
464void CS_SetLogger(CS_LogFunc func, unsigned int min_level);
465void CS_SetDefaultLogger(unsigned int min_level);
466/** @} */
467
468/**
469 * @defgroup cscore_shutdown_cfunc Library Shutdown Function
470 * @{
471 */
472void CS_Shutdown(void);
473/** @} */
474
475/**
476 * @defgroup cscore_utility_cfunc Utility Functions
477 * @{
478 */
479
482
485
488
489void CS_FreeString(char* str);
490void CS_FreeEnumPropertyChoices(char** choices, int count);
492void CS_FreeHttpCameraUrls(char** urls, int count);
493
496
497char* CS_GetHostname(void);
498
500void CS_FreeNetworkInterfaces(char** interfaces, int count);
501/** @} */
502
503/** @} */
504
505#ifdef __cplusplus
506} // extern "C"
507#endif
508
509#endif // CSCORE_CSCORE_C_H_
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)
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, 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