|
| PEAK_API_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_API_STATUS | peak_VideoWriter_Close (peak_video_handle hVideo) |
| | Closes a video file.
|
| |
| PEAK_API_STATUS | peak_VideoWriter_AddFrame (peak_video_handle hVideo, peak_frame_handle hFrame) |
| | Writes a image frame into the video file.
|
| |
| PEAK_API_STATUS | peak_VideoWriter_Container_GetEncoderList (peak_video_container container, peak_video_encoder *encoderList, size_t *encoderCount) |
| | Get the list of currently usable encoders.
|
| |
| PEAK_API_STATUS | peak_VideoWriter_Encoder_GetContainerList (peak_video_encoder encoder, peak_video_container *containerList, size_t *containerCount) |
| | Get the list of currently usable containers.
|
| |
| PEAK_API_STATUS | peak_VideoWriter_GetInfo (peak_video_handle hVideo, peak_video_info *videoInfo) |
| | Get information from the video stream.
|
| |
| PEAK_API_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_API_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_API_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_API_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_API_STATUS | peak_VideoWriter_WaitUntilQueueEmpty (peak_video_handle hVideo, int32_t timeout_ms) |
| | Wait until queue is empty.
|
| |
Functions for saving images as video file.
◆ 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.
◆ 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_video_container_option
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 | Framerate container option.
Use this option to set or retrieve the frame rate of the avi container. Given value must be an double.
|
◆ 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_video_encoder_option
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_VideoWriter_AddFrame()
◆ peak_VideoWriter_Close()
◆ peak_VideoWriter_Container_GetEncoderList()
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.
- Parameters
-
| [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 equal NULL:
out: minimal number of encoder types encoderList must be large enough to hold
encoderList unequal NULL:
in: number of encoder types encoderList can hold
out: number of encoder types filled by the function
|
- Returns
- PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
-
PEAK_STATUS_BUFFER_TOO_SMALL
encoderList is not NULL and the value of *encoderCount is too small to receive the expected amount of data.
-
PEAK_STATUS_INVALID_PARAMETER
encoder is an invalid container or encoderCount is an invalid pointer.
-
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
-
PEAK_STATUS_ERROR An unexpected internal error occurred.
◆ peak_VideoWriter_Container_Option_Get()
◆ peak_VideoWriter_Container_Option_Set()
◆ peak_VideoWriter_Encoder_GetContainerList()
Get the list of currently usable containers.
Queries the list of currently selectable containers.
This function implements the Two Staged Data Query principle.
- Parameters
-
| [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 equal NULL:
out: minimal number of container types containerList must be large enough to hold
containerList unequal NULL:
in: number of container types containerList can hold
out: number of container types filled by the function
|
- Returns
- PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
-
PEAK_STATUS_BUFFER_TOO_SMALL
containerList is not NULL and the value of *containerCount is too small to receive the expected amount of data.
-
PEAK_STATUS_INVALID_PARAMETER
encoder is an invalid encoder or containerCount is an invalid pointer.
-
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
-
PEAK_STATUS_ERROR An unexpected internal error occurred.
◆ peak_VideoWriter_Encoder_Option_Get()
◆ peak_VideoWriter_Encoder_Option_Set()
◆ peak_VideoWriter_GetInfo()
◆ peak_VideoWriter_Open()
Opens a video file with the given file name.
- Parameters
-
| [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. |
- Returns
- PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
-
PEAK_STATUS_INVALID_PARAMETER
hVideo and/or fileName are invalid pointers.
-
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
-
PEAK_STATUS_ACCESS_DENIED A file with the given file name already exists or can not be locked.
-
PEAK_STATUS_ERROR An unexpected internal error occurred.
◆ peak_VideoWriter_WaitUntilQueueEmpty()
| PEAK_API_STATUS peak_VideoWriter_WaitUntilQueueEmpty |
( |
peak_video_handle |
hVideo, |
|
|
int32_t |
timeout_ms |
|
) |
| |