CCAux  2.20.0.0
CCAux API reference
Video.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) 2023 CrossControl AB
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; with
8  * version 2.1 of the License.
9  */
10 /*
11  * File description:
12  * Analog Video
13  *
14  * Use the function GetVideo() to get a handle to pass on to the other functions.
15  * Use the method Video_release(VIDEOHANDLE) to return the handle.
16  *
17  ************************************************/
18 
19 #ifndef CC_VIDEO_H
20 #define CC_VIDEO_H
21 
22 #include "CCAuxErrors.h"
23 #include "CCAuxTypes.h"
24 #include "CCPlatform.h"
25 
26 #ifdef __cplusplus
27 namespace CrossControl
28 {
29 #endif
30 
31 typedef void *VIDEOHANDLE;
32 
49 EXTERN_C
50 CCAUXDLL_API
52 CCAUXDLL_CALLING_CONV
53 GetVideo(void);
54 
62 EXTERN_C
63 CCAUXDLL_API
64 void CCAUXDLL_CALLING_CONV Video_release(VIDEOHANDLE);
65 
78 EXTERN_C
79 CCAUXDLL_API
80 eErr CCAUXDLL_CALLING_CONV Video_init(VIDEOHANDLE, uint8_t deviceNr);
81 
92 EXTERN_C
93 CCAUXDLL_API
94 eErr CCAUXDLL_CALLING_CONV Video_showVideo(VIDEOHANDLE, bool show);
95 
105 EXTERN_C
106 CCAUXDLL_API
108 
118 EXTERN_C
119 CCAUXDLL_API
121 
131 EXTERN_C
132 CCAUXDLL_API
133 eErr CCAUXDLL_CALLING_CONV Video_setMirroring(VIDEOHANDLE, CCStatus mode);
134 
144 EXTERN_C
145 CCAUXDLL_API
146 eErr CCAUXDLL_CALLING_CONV Video_getMirroring(VIDEOHANDLE, CCStatus *mode);
147 
157 EXTERN_C
158 CCAUXDLL_API
159 eErr CCAUXDLL_CALLING_CONV Video_setRotation(VIDEOHANDLE, VideoRotation rotation);
160 
170 EXTERN_C
171 CCAUXDLL_API
172 eErr CCAUXDLL_CALLING_CONV Video_getRotation(VIDEOHANDLE, VideoRotation *rotation);
173 
183 EXTERN_C
184 CCAUXDLL_API
185 eErr CCAUXDLL_CALLING_CONV Video_setActiveChannel(VIDEOHANDLE, VideoChannel channel);
186 
196 EXTERN_C
197 CCAUXDLL_API
198 eErr CCAUXDLL_CALLING_CONV Video_getActiveChannel(VIDEOHANDLE, VideoChannel *channel);
199 
213 EXTERN_C
214 CCAUXDLL_API
215 eErr CCAUXDLL_CALLING_CONV Video_setColorKeys(VIDEOHANDLE, uint8_t rKey, uint8_t gKey, uint8_t bKey);
216 
229 EXTERN_C
230 CCAUXDLL_API
231 eErr CCAUXDLL_CALLING_CONV Video_getColorKeys(VIDEOHANDLE, uint8_t *rKey, uint8_t *gKey, uint8_t *bKey);
232 
245 EXTERN_C
246 CCAUXDLL_API
247 eErr CCAUXDLL_CALLING_CONV Video_setVideoArea(VIDEOHANDLE, uint16_t topLeftX, uint16_t topLeftY, uint16_t bottomRightX,
248  uint16_t bottomRightY);
249 
262 EXTERN_C
263 CCAUXDLL_API
264 eErr CCAUXDLL_CALLING_CONV Video_getRawImage(VIDEOHANDLE, uint16_t *width, uint16_t *height, float32_t *frameRate);
265 
278 EXTERN_C
279 CCAUXDLL_API
280 eErr CCAUXDLL_CALLING_CONV Video_getVideoArea(VIDEOHANDLE, uint16_t *topLeftX, uint16_t *topLeftY,
281  uint16_t *bottomRigthX, uint16_t *bottomRigthY);
282 
293 EXTERN_C
294 CCAUXDLL_API
295 eErr CCAUXDLL_CALLING_CONV Video_getVideoStandard(VIDEOHANDLE, videoStandard *standard);
296 
317 EXTERN_C
318 CCAUXDLL_API
319 eErr CCAUXDLL_CALLING_CONV Video_getStatus(VIDEOHANDLE, uint8_t *status);
320 
333 EXTERN_C
334 CCAUXDLL_API
335 eErr CCAUXDLL_CALLING_CONV Video_setScaling(VIDEOHANDLE, float32_t x, float32_t y);
336 
349 EXTERN_C
350 CCAUXDLL_API
351 eErr CCAUXDLL_CALLING_CONV Video_getScaling(VIDEOHANDLE, float32_t *x, float32_t *y);
352 
365 EXTERN_C
366 CCAUXDLL_API
367 eErr CCAUXDLL_CALLING_CONV Video_activateSnapshot(VIDEOHANDLE, bool activate);
368 
382 EXTERN_C
383 CCAUXDLL_API
384 eErr CCAUXDLL_CALLING_CONV Video_takeSnapshot(VIDEOHANDLE, const char_t *path, bool bInterlaced);
385 
405 EXTERN_C
406 CCAUXDLL_API
407 eErr CCAUXDLL_CALLING_CONV Video_takeSnapshotRaw(VIDEOHANDLE, char_t *rawImgBuffer, uint32_t rawImgBuffSize,
408  bool bInterlaced);
409 
429 EXTERN_C
430 CCAUXDLL_API
431 eErr CCAUXDLL_CALLING_CONV Video_takeSnapshotBmp(VIDEOHANDLE, char_t **bmpBuffer, uint32_t *bmpBufSize,
432  bool bInterlaced, bool bNTSCFormat);
433 
452 EXTERN_C
453 CCAUXDLL_API
454 eErr CCAUXDLL_CALLING_CONV Video_createBitmap(VIDEOHANDLE, char_t **bmpBuffer, uint32_t *bmpBufSize,
455  const char_t *rawImgBuffer, uint32_t rawImgBufSize, bool bInterlaced,
456  bool bNTSCFormat);
457 
467 EXTERN_C
468 CCAUXDLL_API
469 eErr CCAUXDLL_CALLING_CONV Video_freeBmpBuffer(VIDEOHANDLE, char_t *bmpBuffer);
470 
479 EXTERN_C
480 CCAUXDLL_API
481 eErr CCAUXDLL_CALLING_CONV Video_minimize(VIDEOHANDLE);
482 
491 EXTERN_C
492 CCAUXDLL_API
493 eErr CCAUXDLL_CALLING_CONV Video_restore(VIDEOHANDLE);
494 
507 EXTERN_C
508 CCAUXDLL_API
509 eErr CCAUXDLL_CALLING_CONV Video_setDecoderReg(VIDEOHANDLE, uint8_t decoderRegister, uint8_t registerValue);
510 
523 EXTERN_C
524 CCAUXDLL_API
525 eErr CCAUXDLL_CALLING_CONV Video_getDecoderReg(VIDEOHANDLE, uint8_t decoderRegister, uint8_t *registerValue);
526 
544 EXTERN_C
545 CCAUXDLL_API
546 eErr CCAUXDLL_CALLING_CONV Video_setCropping(VIDEOHANDLE, uint8_t top, uint8_t left, uint8_t bottom, uint8_t right);
547 
560 EXTERN_C
561 CCAUXDLL_API
562 eErr CCAUXDLL_CALLING_CONV Video_getCropping(VIDEOHANDLE, uint8_t *top, uint8_t *left, uint8_t *bottom, uint8_t *right);
563 
571 EXTERN_C
572 CCAUXDLL_API
573 eErr CCAUXDLL_CALLING_CONV Video_showFrame(VIDEOHANDLE);
574 
584 EXTERN_C
585 CCAUXDLL_API
586 eErr CCAUXDLL_CALLING_CONV Video_setGraphicsOverlay(VIDEOHANDLE, CCStatus mode);
587 
597 EXTERN_C
598 CCAUXDLL_API
599 eErr CCAUXDLL_CALLING_CONV Video_getGraphicsOverlay(VIDEOHANDLE, CCStatus *mode);
600 
602 #ifdef __cplusplus
603 } /* namespace CrossControl */
604 #endif
605 
606 #endif /* CC_VIDEO_H */
unsigned short uint16_t
Definition: CCAuxTypes.h:38
char char_t
Definition: CCAuxTypes.h:17
unsigned int uint32_t
Definition: CCAuxTypes.h:39
float float32_t
Definition: CCAuxTypes.h:15
unsigned char uint8_t
Definition: CCAuxTypes.h:37
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_setVideoArea(VIDEOHANDLE, uint16_t topLeftX, uint16_t topLeftY, uint16_t bottomRightX, uint16_t bottomRightY)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_getGraphicsOverlay(VIDEOHANDLE, CCStatus *mode)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_getVideoArea(VIDEOHANDLE, uint16_t *topLeftX, uint16_t *topLeftY, uint16_t *bottomRigthX, uint16_t *bottomRigthY)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_setActiveChannel(VIDEOHANDLE, VideoChannel channel)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_getScaling(VIDEOHANDLE, float32_t *x, float32_t *y)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_getVideoStandard(VIDEOHANDLE, videoStandard *standard)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_takeSnapshotBmp(VIDEOHANDLE, char_t **bmpBuffer, uint32_t *bmpBufSize, bool bInterlaced, bool bNTSCFormat)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_takeSnapshot(VIDEOHANDLE, const char_t *path, bool bInterlaced)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_getRotation(VIDEOHANDLE, VideoRotation *rotation)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_freeBmpBuffer(VIDEOHANDLE, char_t *bmpBuffer)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_setColorKeys(VIDEOHANDLE, uint8_t rKey, uint8_t gKey, uint8_t bKey)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_minimize(VIDEOHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_showFrame(VIDEOHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_setDeInterlaceMode(VIDEOHANDLE, DeInterlaceMode mode)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_getColorKeys(VIDEOHANDLE, uint8_t *rKey, uint8_t *gKey, uint8_t *bKey)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_init(VIDEOHANDLE, uint8_t deviceNr)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_getActiveChannel(VIDEOHANDLE, VideoChannel *channel)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_createBitmap(VIDEOHANDLE, char_t **bmpBuffer, uint32_t *bmpBufSize, const char_t *rawImgBuffer, uint32_t rawImgBufSize, bool bInterlaced, bool bNTSCFormat)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_restore(VIDEOHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_setMirroring(VIDEOHANDLE, CCStatus mode)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_setRotation(VIDEOHANDLE, VideoRotation rotation)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_setGraphicsOverlay(VIDEOHANDLE, CCStatus mode)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_setDecoderReg(VIDEOHANDLE, uint8_t decoderRegister, uint8_t registerValue)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_getMirroring(VIDEOHANDLE, CCStatus *mode)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_getCropping(VIDEOHANDLE, uint8_t *top, uint8_t *left, uint8_t *bottom, uint8_t *right)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_showVideo(VIDEOHANDLE, bool show)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_setCropping(VIDEOHANDLE, uint8_t top, uint8_t left, uint8_t bottom, uint8_t right)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_getRawImage(VIDEOHANDLE, uint16_t *width, uint16_t *height, float32_t *frameRate)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_getDeInterlaceMode(VIDEOHANDLE, DeInterlaceMode *mode)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_getDecoderReg(VIDEOHANDLE, uint8_t decoderRegister, uint8_t *registerValue)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_getStatus(VIDEOHANDLE, uint8_t *status)
EXTERN_C CCAUXDLL_API VIDEOHANDLE CCAUXDLL_CALLING_CONV GetVideo(void)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_takeSnapshotRaw(VIDEOHANDLE, char_t *rawImgBuffer, uint32_t rawImgBuffSize, bool bInterlaced)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_activateSnapshot(VIDEOHANDLE, bool activate)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Video_setScaling(VIDEOHANDLE, float32_t x, float32_t y)
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV Video_release(VIDEOHANDLE)
Definition: About.h:30
VideoChannel
Definition: CCAuxTypes.h:218
videoStandard
Definition: CCAuxTypes.h:260
CCStatus
Definition: CCAuxTypes.h:153
DeInterlaceMode
Definition: CCAuxTypes.h:208
void * VIDEOHANDLE
Definition: Video.h:31
VideoRotation
Definition: CCAuxTypes.h:271
eErr
Definition: CCAuxTypes.h:162