![]() |
IDS peak comfortC v1.14.0
|
Data Structures | |
| struct | peak_video_info |
| video info structure More... | |
Typedefs | |
| typedef struct peak_video * | peak_video_handle |
| peak Video handle | |
Enumerations | |
| enum | peak_video_encoder { PEAK_VIDEO_ENCODER_INVALID , PEAK_VIDEO_ENCODER_MJPEG } |
| peak Encoder types More... | |
| enum | peak_video_container { PEAK_VIDEO_CONTAINER_INVALID , PEAK_VIDEO_CONTAINER_AVI } |
| peak Container types More... | |
| enum | peak_video_container_option { PEAK_VIDEO_CONTAINER_OPTION_INVALID , PEAK_VIDEO_CONTAINER_OPTION_FRAMERATE } |
| peak container options More... | |
| enum | peak_video_encoder_option { PEAK_VIDEO_ENCODER_OPTION_INVALID , PEAK_VIDEO_ENCODER_OPTION_QUALITY } |
| peak container options More... | |
Functions | |
| peak_status | peak_VideoWriter_Open (peak_video_handle *hVideo, const char *fileName, peak_video_container container, peak_video_encoder encoder) |
| Opens a video file with the given file name. | |
| peak_status | peak_VideoWriter_Close (peak_video_handle hVideo) |
| Closes a video file. | |
| peak_status | peak_VideoWriter_AddFrame (peak_video_handle hVideo, peak_frame_handle hFrame) |
| Writes a image frame into the video file. | |
| peak_status | peak_VideoWriter_Container_GetEncoderList (peak_video_container container, peak_video_encoder *encoderList, size_t *encoderCount) |
| Get the list of currently usable encoders. | |
| peak_status | peak_VideoWriter_Encoder_GetContainerList (peak_video_encoder encoder, peak_video_container *containerList, size_t *containerCount) |
| Get the list of currently usable containers. | |
| peak_status | peak_VideoWriter_GetInfo (peak_video_handle hVideo, peak_video_info *videoInfo) |
| Get information from the video stream. | |
| peak_status | peak_VideoWriter_Container_Option_Set (peak_video_handle hVideo, peak_video_container_option containerOption, const void *value, size_t count) |
| Set additional container options. | |
| peak_status | peak_VideoWriter_Container_Option_Get (peak_video_handle hVideo, peak_video_container_option containerOption, void *value, size_t count, size_t *outCount) |
| Get container options. | |
| peak_status | peak_VideoWriter_Encoder_Option_Set (peak_video_handle hVideo, peak_video_encoder_option encoderOption, const void *value, size_t count) |
| Set additional encoder options. | |
| peak_status | peak_VideoWriter_Encoder_Option_Get (peak_video_handle hVideo, peak_video_encoder_option encoderOption, void *value, size_t count, size_t *outCount) |
| Get encoder options. | |
| peak_status | peak_VideoWriter_WaitUntilQueueEmpty (peak_video_handle hVideo, int32_t timeout_ms) |
| Wait until queue is empty. | |
Functions for saving images as video file.
| typedef struct peak_video* peak_video_handle |
peak Video handle
The video handle repesents an opened video handle.
The video handle is provided by the peak_VideoWriter_Open function and must be released by peak_VideoWriter_Close.
The video handle is required in every function which controls a video stream.
The value for an invalid camera handle is PEAK_INVALID_HANDLE.
| enum peak_video_container |
peak Container types
The container specifies the used file format for saving the video.
| Enumerator | |
|---|---|
| PEAK_VIDEO_CONTAINER_INVALID | Invalid container. Use this value for the initialization of variables of type peak_video_container. |
| PEAK_VIDEO_CONTAINER_AVI | Audio Video Interleave. |
peak container options
The container can be configured via the given options.
| Enumerator | |
|---|---|
| PEAK_VIDEO_CONTAINER_OPTION_INVALID | Invalid container option. Use this value for the initialization of variables of type peak_video_container_option. |
| PEAK_VIDEO_CONTAINER_OPTION_FRAMERATE | Frame rate container option. Use this option to set or retrieve the frame rate of the avi container. Given value must be an double. |
| enum peak_video_encoder |
peak Encoder types
The encoder specifies the used video compression.
| Enumerator | |
|---|---|
| PEAK_VIDEO_ENCODER_INVALID | Invalid encoder. Use this value for the initialization of variables of type peak_video_encoder. |
| PEAK_VIDEO_ENCODER_MJPEG | Motion JPEG. |
peak container options
The encoder can be configured via the given options.
| Enumerator | |
|---|---|
| PEAK_VIDEO_ENCODER_OPTION_INVALID | Invalid encoder option. Use this value for the initialization of variables of type peak_video_encoder_option. |
| PEAK_VIDEO_ENCODER_OPTION_QUALITY | Quality encoder option. Use this option to set or retrieve the quality of the mjpeg encoder. Given value must be an int32_t. |
| peak_status peak_VideoWriter_AddFrame | ( | peak_video_handle | hVideo, |
| peak_frame_handle | hFrame ) |
Writes a image frame into the video file.
| [in] | hVideo | The video handle. |
| [in] | hFrame | A frame handle. |
hVideo is an invalid video handle or hFrame is an invalid frame handle. hFrame has an unsupported pixel format. | peak_status peak_VideoWriter_Close | ( | peak_video_handle | hVideo | ) |
Closes a video file.
| [in] | hVideo | The video handle. |
hVideo is an invalid video handle. | peak_status peak_VideoWriter_Container_GetEncoderList | ( | peak_video_container | container, |
| peak_video_encoder * | encoderList, | ||
| size_t * | encoderCount ) |
Get the list of currently usable encoders.
Queries the list of currently selectable encoders for the given container.
This function implements the Two Staged Data Query principle.
| [in] | container | Container |
| [out] | encoderList | Pointer to a user allocated array buffer to receive the encoder type list. If this parameter is NULL, encoderCount will contain the current number of encoder types. The required size of encoderList in bytes is encoderCount x sizeof(peak_video_encoder). |
| [in,out] | encoderCount |
|
encoderList is not NULL and the value of *encoderCount is too small to receive the expected amount of data. encoder is an invalid container or encoderCount is an invalid pointer. | peak_status peak_VideoWriter_Container_Option_Get | ( | peak_video_handle | hVideo, |
| peak_video_container_option | containerOption, | ||
| void * | value, | ||
| size_t | count, | ||
| size_t * | outCount ) |
Get container options.
| [in] | hVideo | The video handle. |
| [in] | containerOption | Container option to retrieve see peak_video_container_option |
| [out] | value | see peak_video_container_option for possible values |
| [in] | count | size of value in bytes. |
| [out] | outCount | size of written data in bytes. |
hVideo is an invalid video handle. containerOption is an invalid option or value is an invalid pointer or the size of count is incorrect. | peak_status peak_VideoWriter_Container_Option_Set | ( | peak_video_handle | hVideo, |
| peak_video_container_option | containerOption, | ||
| const void * | value, | ||
| size_t | count ) |
Set additional container options.
| [in] | hVideo | The video handle. |
| [in] | containerOption | Container option to set see peak_video_container_option |
| [in] | value | see peak_video_container_option |
| [in] | count | size of value in bytes. |
hVideo is an invalid video handle. containerOption is an invalid option or value is an invalid pointer or the size of count is incorrect. | peak_status peak_VideoWriter_Encoder_GetContainerList | ( | peak_video_encoder | encoder, |
| peak_video_container * | containerList, | ||
| size_t * | containerCount ) |
Get the list of currently usable containers.
Queries the list of currently selectable containers.
This function implements the Two Staged Data Query principle.
| [in] | encoder | Encoder |
| [out] | containerList | Pointer to a user allocated array buffer to receive the container type list. If this parameter is NULL, containerCount will contain the current number of container types. The required size of containerList in bytes is containerCount x sizeof(peak_video_container). |
| [in,out] | containerCount |
|
containerList is not NULL and the value of *containerCount is too small to receive the expected amount of data. encoder is an invalid encoder or containerCount is an invalid pointer. | peak_status peak_VideoWriter_Encoder_Option_Get | ( | peak_video_handle | hVideo, |
| peak_video_encoder_option | encoderOption, | ||
| void * | value, | ||
| size_t | count, | ||
| size_t * | outCount ) |
Get encoder options.
| [in] | hVideo | The video handle. |
| [in] | encoderOption | Encoder option to retrieve see peak_video_encoder_option. |
| [out] | value | see peak_video_encoder_option. |
| [in] | count | size of value in bytes. |
| [out] | outCount | size of written data in bytes. |
hVideo is an invalid video handle. encoderOption is an invalid option or value is an invalid pointer or the size of count is incorrect. | peak_status peak_VideoWriter_Encoder_Option_Set | ( | peak_video_handle | hVideo, |
| peak_video_encoder_option | encoderOption, | ||
| const void * | value, | ||
| size_t | count ) |
Set additional encoder options.
| [in] | hVideo | The video handle. |
| [in] | encoderOption | Encoder option to set see peak_video_encoder_option |
| [in] | value | see peak_video_encoder_option for possible values |
| [in] | count | size of value in bytes. |
hVideo is an invalid video handle. encoderOption is an invalid option or value is an invalid pointer or the size of count is incorrect. | peak_status peak_VideoWriter_GetInfo | ( | peak_video_handle | hVideo, |
| peak_video_info * | videoInfo ) |
Get information from the video stream.
| [in] | hVideo | The video handle. |
| [out] | videoInfo | Video information. |
hVideo is an invalid video handle. videoInfo is an invalid pointer. | peak_status peak_VideoWriter_Open | ( | peak_video_handle * | hVideo, |
| const char * | fileName, | ||
| peak_video_container | container, | ||
| peak_video_encoder | encoder ) |
Opens a video file with the given file name.
| [out] | hVideo | The video handle. |
| [in] | fileName | The given file name to use as an utf-8 encoded string |
| [in] | container | The container of the video. |
| [in] | encoder | The encoder of the video. |
hVideo and/or fileName are invalid pointers. | peak_status peak_VideoWriter_WaitUntilQueueEmpty | ( | peak_video_handle | hVideo, |
| int32_t | timeout_ms ) |
Wait until queue is empty.
| [in] | hVideo | The video handle. |
| [in] | timeout_ms | Timeout in milliseconds |
hVideo is an invalid video handle.