CCAux
2.20.0.0
CCAux API reference
|
Functions | |
EXTERN_C CCAUXDLL_API VIDEOHANDLE CCAUXDLL_CALLING_CONV | GetVideo (void) |
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV | Video_release (VIDEOHANDLE) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_init (VIDEOHANDLE, uint8_t deviceNr) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_showVideo (VIDEOHANDLE, bool show) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_setDeInterlaceMode (VIDEOHANDLE, DeInterlaceMode mode) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_getDeInterlaceMode (VIDEOHANDLE, DeInterlaceMode *mode) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_setMirroring (VIDEOHANDLE, CCStatus mode) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_getMirroring (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_getRotation (VIDEOHANDLE, VideoRotation *rotation) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_setActiveChannel (VIDEOHANDLE, VideoChannel channel) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_getActiveChannel (VIDEOHANDLE, VideoChannel *channel) |
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_getColorKeys (VIDEOHANDLE, uint8_t *rKey, uint8_t *gKey, uint8_t *bKey) |
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_getRawImage (VIDEOHANDLE, uint16_t *width, uint16_t *height, float32_t *frameRate) |
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_getVideoStandard (VIDEOHANDLE, videoStandard *standard) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_getStatus (VIDEOHANDLE, uint8_t *status) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_setScaling (VIDEOHANDLE, float32_t x, float32_t y) |
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_activateSnapshot (VIDEOHANDLE, bool activate) |
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_takeSnapshotRaw (VIDEOHANDLE, char_t *rawImgBuffer, uint32_t rawImgBuffSize, bool bInterlaced) |
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_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_freeBmpBuffer (VIDEOHANDLE, char_t *bmpBuffer) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_minimize (VIDEOHANDLE) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_restore (VIDEOHANDLE) |
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_getDecoderReg (VIDEOHANDLE, uint8_t decoderRegister, uint8_t *registerValue) |
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_getCropping (VIDEOHANDLE, uint8_t *top, uint8_t *left, uint8_t *bottom, uint8_t *right) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_showFrame (VIDEOHANDLE) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_setGraphicsOverlay (VIDEOHANDLE, CCStatus mode) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV | Video_getGraphicsOverlay (VIDEOHANDLE, CCStatus *mode) |
Functions in the Video class
EXTERN_C CCAUXDLL_API VIDEOHANDLE CCAUXDLL_CALLING_CONV CrossControl::GetVideo | ( | void | ) |
Factory function that creates instances of the Video object.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_activateSnapshot | ( | VIDEOHANDLE | , |
bool | activate | ||
) |
To be able to take snapshot the snapshot function has to be active. After activation it takes 120ms before first snapshot can be taken. The Snapshot function can be active all the time. If power consumption and heat is an issue, snapshot may be turned off.
Supported Platform(s): XL, XM (Windows)
activate | Set to true if the snapshot function shall be active. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_createBitmap | ( | VIDEOHANDLE | , |
char_t ** | bmpBuffer, | ||
uint32_t * | bmpBufSize, | ||
const char_t * | rawImgBuffer, | ||
uint32_t | rawImgBufSize, | ||
bool | bInterlaced, | ||
bool | bNTSCFormat | ||
) |
Create a bitmap from a raw image buffer. The bmp buffer is allocated in the function and has to be deallocated by the application.
Supported Platform(s): XL, XM (Windows)
bmpBuffer | Bitmap ram buffer allocated by the API, has to be deallocated with freeBmpBuffer() by the application. |
bmpBufSize | Size of the returned bitmap buffer. |
rawImgBuffer | Raw image buffer from takeSnapShotRaw. |
rawImgBufSize | Size of the raw image buffer. |
bInterlaced | Interlaced, if true the bitmap only contains every second line in the image, to save bandwidth. |
bNTSCFormat | True if the video format in rawImageBuffer is NTSC format. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_freeBmpBuffer | ( | VIDEOHANDLE | , |
char_t * | bmpBuffer | ||
) |
Free the memory allocated for BMP buffer.
Supported Platform(s): XL, XM (Windows)
bmpBuffer | The bmp buffer to free. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_getActiveChannel | ( | VIDEOHANDLE | , |
VideoChannel * | channel | ||
) |
Get the current video channel.
Supported Platform(s): XL, XM, XS, XA, VC, VA
channel | Enum defining available channels. (VC platform has only 1 channel, Analog_Channel_1) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_getColorKeys | ( | VIDEOHANDLE | , |
uint8_t * | rKey, | ||
uint8_t * | gKey, | ||
uint8_t * | bKey | ||
) |
Get color key values. Note that the system uses 18 bit colors, so the two least significant bits are not used.
Supported Platform(s): XL, XM
rKey | Red value. |
gKey | Green value. |
bKey | Blue value. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_getCropping | ( | VIDEOHANDLE | , |
uint8_t * | top, | ||
uint8_t * | left, | ||
uint8_t * | bottom, | ||
uint8_t * | right | ||
) |
Get Crop parameters.
Supported Platform(s): XL, XM, XS, XA, VC, VA
top | Crop top (lines). |
left | Crop left (lines). |
bottom | Crop bottom (lines). |
right | Crop right (lines). |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_getDecoderReg | ( | VIDEOHANDLE | , |
uint8_t | decoderRegister, | ||
uint8_t * | registerValue | ||
) |
Get Video decoder bus register. Advanced function for direct access to the video decoder TVP5150AM1 registers.
Supported Platform(s): XL, XM, XS, XA, VC, VA
decoderRegister | Decoder Register Address. |
registerValue | register value. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_getDeInterlaceMode | ( | VIDEOHANDLE | , |
DeInterlaceMode * | mode | ||
) |
Get the deinterlace mode used when decoding the interlaced video stream.
Supported Platform(s): XL, XM
mode | The current mode. See enum DeInterlaceMode for descriptions of the modes. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_getGraphicsOverlay | ( | VIDEOHANDLE | , |
CCStatus * | mode | ||
) |
Get the current graphics overlaying mode.
Supported Platform(s): XA, XS, VC, VA
mode | Overlay enable mode |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_getMirroring | ( | VIDEOHANDLE | , |
CCStatus * | mode | ||
) |
Get the current mirroring mode of the video image.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
mode | The current mode. Enabled or Disabled. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_getRawImage | ( | VIDEOHANDLE | , |
uint16_t * | width, | ||
uint16_t * | height, | ||
float32_t * | frameRate | ||
) |
Get the raw image size of moving image before any scaling and frame rate. For snapshot the height is 4 row less.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
width | Width of raw image. |
height | Height of raw moving image, snapshot are 4 bytes less. |
frameRate | Received video frame rate. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_getRotation | ( | VIDEOHANDLE | , |
VideoRotation * | rotation | ||
) |
Get the current rotation of the video image.
Supported Platform(s): XA, XS, VC, VA, VS
rotation | Enum defining the current rotation. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_getScaling | ( | VIDEOHANDLE | , |
float32_t * | x, | ||
float32_t * | y | ||
) |
Get Video Scaling (image size). If the deinterlace mode is set to DeInterlace_Even or DeInterlace_Odd, this function divides the actual vertical scaling by a factor of two, to get the same scaling factor as set with setScaling.
Supported Platform(s): XL, XM
x | Horizontal scaling (0.25-4). |
y | Vertical scaling (0.25-4 DeInterlace_BOB) (0.125-2 DeInterlace_Even, DeInterlace_Odd). |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_getStatus | ( | VIDEOHANDLE | , |
uint8_t * | status | ||
) |
Video status byte.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
status | Status byte Bit 0: video on/off 0 = Off, 1 = On. Bit 2-1: De-interlacing method, 0 = Only even rows, 1 = Only odd rows, 2 = BOB, 3 = invalid. Bit 3: Mirroring mode, 0 = Off, 1 = On Bit 4: Read or write operation to analogue video decoder in progress. Bit 5: Analogue video decoder ready bit. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_getVideoArea | ( | VIDEOHANDLE | , |
uint16_t * | topLeftX, | ||
uint16_t * | topLeftY, | ||
uint16_t * | bottomRigthX, | ||
uint16_t * | bottomRigthY | ||
) |
Get the area where video is shown.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
topLeftX | Top left X coordinate on screen. |
topLeftY | Top left Y coordinate on screen. |
bottomRigthX | Bottom right X coordinate on screen. |
bottomRigthY | Bottom right Y coordinate on screen. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_getVideoStandard | ( | VIDEOHANDLE | , |
videoStandard * | standard | ||
) |
Get video standard. The video decoder auto detects the video standard of the source.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
standard | Video standard. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_init | ( | VIDEOHANDLE | , |
uint8_t | deviceNr | ||
) |
Initialize a video device. The video device will initially use the following settings: DeInterlace_BOB and mirroring disabled.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
deviceNr | Device to connect to (1,2). Select one of 2 devices to connect to. (VC platform has only 1 device) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_minimize | ( | VIDEOHANDLE | ) |
Minimizes the video area. Restore with restore() call.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV CrossControl::Video_release | ( | VIDEOHANDLE | ) |
Delete the Video object.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_restore | ( | VIDEOHANDLE | ) |
Restores the video area to the size it was before a minimize() call. Don't use restore if minimize has not been used first.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_setActiveChannel | ( | VIDEOHANDLE | , |
VideoChannel | channel | ||
) |
Sets the active video channel.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
channel | Enum defining available channels. (VC and VS platforms have only 1 channel, Analog_Channel_1) |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_setColorKeys | ( | VIDEOHANDLE | , |
uint8_t | rKey, | ||
uint8_t | gKey, | ||
uint8_t | bKey | ||
) |
Set color keys. Writes RGB color key values. Note that the system uses 18 bit colors, so the two least significant bits are not used.
Supported Platform(s): XL, XM
rKey | Red key value. |
gKey | Green key value. |
bKey | Blue key value. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_setCropping | ( | VIDEOHANDLE | , |
uint8_t | top, | ||
uint8_t | left, | ||
uint8_t | bottom, | ||
uint8_t | right | ||
) |
Crop video image. Note that the video chip manual says the following about horisontal cropping: The number of pixels of active video must be an even number. The parameters top and bottom are internally converted to an even number. This is due to the input video being interlaced, a pair of odd/even lines are allways cropped together. On XA/XS platforms, cropping from top/bottom on device 2 (channels 3 and 4) is not supported.
Supported Platform(s): XL, XM, XS, XA, VC, VA
top | Crop top (0-255 lines). |
left | Crop left (0-127 lines). |
bottom | Crop bottom (0-255 lines). |
right | Crop right (0-127 lines). |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_setDecoderReg | ( | VIDEOHANDLE | , |
uint8_t | decoderRegister, | ||
uint8_t | registerValue | ||
) |
Set Video decoder bus register. Advanced function for direct access to the video decoder TVP5150AM1 registers.
Supported Platform(s): XL, XM, XS, XA, VC, VA
decoderRegister | Decoder Register Address. |
registerValue | register value. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_setDeInterlaceMode | ( | VIDEOHANDLE | , |
DeInterlaceMode | mode | ||
) |
Set the deinterlace mode used when decoding the interlaced video stream.
Supported Platform(s): XL, XM
mode | The mode to set. See enum DeInterlaceMode for descriptions of the modes. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_setGraphicsOverlay | ( | VIDEOHANDLE | , |
CCStatus | mode | ||
) |
Enable or disable overlaying of graphics on top of video.
Supported Platform(s): XA, XS, VC, VA
mode | Overlay enable mode |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_setMirroring | ( | VIDEOHANDLE | , |
CCStatus | mode | ||
) |
Enable or disable mirroring of the video image.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
mode | The mode to set. Enabled or Disabled. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_setRotation | ( | VIDEOHANDLE | , |
VideoRotation | rotation | ||
) |
Set the current rotation of the video image.
Supported Platform(s): XA, XS, VC, VA, VS
rotation | Enum defining the rotation to set. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_setScaling | ( | VIDEOHANDLE | , |
float32_t | x, | ||
float32_t | y | ||
) |
Set Video Scaling (image size). If the deinterlace mode is set to DeInterlace_Even or DeInterlace_Odd, this function multiplies the vertical scaling by a factor of two, to get the correct image proportions.
Supported Platform(s): XL, XM
x | Horizontal scaling (0.25-4). |
y | Vertical scaling (0.25-4 DeInterlace_BOB) (0.125-2 DeInterlace_Even, DeInterlace_Odd). |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_setVideoArea | ( | VIDEOHANDLE | , |
uint16_t | topLeftX, | ||
uint16_t | topLeftY, | ||
uint16_t | bottomRightX, | ||
uint16_t | bottomRightY | ||
) |
Set the area where video is shown.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
topLeftX | Top left X coordinate on screen. |
topLeftY | Top left Y coordinate on screen. |
bottomRightX | Bottom right X coordinate on screen. |
bottomRightY | Bottom right Y coordinate on screen. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_showFrame | ( | VIDEOHANDLE | ) |
Copy one frame from camera to the display.
Supported Platform(s): XA, XS, VC, VA
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_showVideo | ( | VIDEOHANDLE | , |
bool | show | ||
) |
Show or hide the video image. Note that it may take some time before the video is shown and correct input info can be read by getRawImage.
Supported Platform(s): XL, XM, XS, XA, VC, VA, VS
show | True shows the video image. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_takeSnapshot | ( | VIDEOHANDLE | , |
const char_t * | path, | ||
bool | bInterlaced | ||
) |
Takes a snapshot of the current video image and stores it to a bitmap file. This is a combination of takeSnapShotRaw, getVideoStandard and createBitMap and then storing of the bmpBuffer to file. To be able to take a snapshot, the snapshot function has to be active.
Supported Platform(s): XL, XM (Windows)
path | The file path to where the image should be stored. |
bInterlaced | If true the bitmap only contains every second line in the image, to save bandwidth. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_takeSnapshotBmp | ( | VIDEOHANDLE | , |
char_t ** | bmpBuffer, | ||
uint32_t * | bmpBufSize, | ||
bool | bInterlaced, | ||
bool | bNTSCFormat | ||
) |
Takes a snapshot of the current video image and return a data buffer with a bitmap image. The bmp buffer is allocated in the function and has to be deallocated with freeBmpBuffer() by the application. This is a combination of the function takeSnapShotRaw and createBitMap. To be able to take a snapshot, the snapshot function has to be active.
Supported Platform(s): XL, XM (Windows)
bmpBuffer | Bitmap ram buffer allocated by the API, has to be deallocated with freeBmpBuffer() by the application. |
bmpBufSize | Size of the returned bitmap buffer. |
bInterlaced | If true the bitmap only contains every second line in the image, to save bandwidth. |
bNTSCFormat | True if the video format in rawImageBuffer is NTSC format. |
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Video_takeSnapshotRaw | ( | VIDEOHANDLE | , |
char_t * | rawImgBuffer, | ||
uint32_t | rawImgBuffSize, | ||
bool | bInterlaced | ||
) |
Takes a snapshot of the current video image and return raw image data. The size of the raw image is when interlaced = false 0x100 + line count * row count * 4. The size of the raw image is when interlaced = true 0x100 + line count * row count * 2. To be able to take a snapshot, the snapshot function has to be active. This function is blocking until a new frame is available from the decoder. An error will be returned if the decoder doesn't return any frames before a timeout.
Supported Platform(s): XL, XM (Windows)
rawImgBuffer | Buffer for image to be stored in. |
rawImgBuffSize | Size of the buffer. |
bInterlaced | If true the bitmap only contains every second line in the image, to save bandwidth. |