Handle of VideoCapture object
Used to handle pointer (void *) to VideoCapture object
Handle of VideoFrame object
Used to handle pointer (void *) to VideoFrame object
Invokes by VideoCapture object on new video frame capture
hVideoCapture | Handle of VideoCapture object |
hFrame | Handle of VideoFrame object |
customObject | Pointer to custom object, defined in VideoCapture_Create function |
You need to delete the hFrame object after this event using VideoFrame_Destroy function.
Invokes by VideoCapture object on error
hVideoCapture | Handle of VideoCapture object |
errorCode | Error code (see ERR_CAPTURE enumeration values) |
customObject | Pointer to custom object, defined in VideoCapture_Create function |
VIDEOCAPTURE DTKVIDAPI VideoCapture_Create( |
| ) |
Create Video Capture object
frameCapturedCallback | FrameCapturedCallback function |
captureErrorCallback | CaptureErrorCallback function |
customObject void* | Pointer to custom object |
void DTKVIDAPI VideoCapture_Destroy( |
| ) |
int DTKVIDAPI VideoCapture_StartCaptureFromFile( |
| ) |
Start video capture from video file
hVideoCapture | Handle of VideoCapture object |
fileName Video | file path |
repeat_count int | Repeat count, default 0 (always repeat) |
Value 0 on success, or one of ERR_CAPTURE enumeration values.
int DTKVIDAPI VideoCapture_StartCaptureFromIPCamera( |
| ) |
Start video capture from IP camera
hVideoCapture | Handle of VideoCapture object |
ipCameraURL const char* | IP camera URL (RTSP or HTTP). The URL must include user name and password if required. |
Value 0 on success, or one of ERR_CAPTURE enumeration values.
int DTKVIDAPI VideoCapture_StartCaptureFromDevice( |
| ) |
Start video capture from video device
hVideoCapture | Handle of VideoCapture object |
deviceIndex int | Device index starting from 0 (0 - first video device) |
captureWidth int | Capture X-resolution in pixels |
captureHeight int | Capture Y-resolution in pixels |
Value 0 on success, or one of ERR_CAPTURE enumeration values.
If video device do not support defined resolution, then will be selected nearest resolution supported by this device.
int DTKVIDAPI VideoCapture_GetVideoWidth( |
| ) |
Gets the width of the video stream in pixels
hVideoCapture | Handle of VideoCapture object |
Width of the video stream in pixels. If the video stream is not started, the return value is 0.
int DTKVIDAPI VideoCapture_GetVideoHeight( |
| ) |
Gets the height of the video stream in pixels
hVideoCapture | Handle of VideoCapture object |
Height of the video stream in pixels. If the video stream is not started, the return value is 0.
int DTKVIDAPI VideoCapture_GetVideoFPS( |
| ) |
Gets the frames per second (FPS) of the video stream
hVideoCapture | Handle of VideoCapture object |
Frames per second (FPS) of the video stream. If the video stream is not started, the return value is 0.
int DTKVIDAPI VideoCapture_GetVideoFOURCC( |
| ) |
Gets the FOURCC code of the video stream
hVideoCapture | Handle of VideoCapture object |
FOURCC code (32 bit integer) of the video stream. If the video stream is not started, the return value is 0.
int DTKVIDAPI VideoCapture_StopCapture( |
| ) |
Stop video capture
hVideoCapture | Handle of VideoCapture object |
Value 0 on success, or one of ERR_CAPTURE enumeration values.
int DTKVIDAPI VideoCapture_GetLibraryVersion( |
| ) |
Return library version
buffer char* | Pointer to string buffer which receives library version |
buff_size int | Size of string buffer |
Number of bytes copied to buffer. If buffer = NULL or buff_size = 0, then function return number of bytes required for store result string
void DTKVIDAPI VideoFrame_Destroy( |
| ) |
int DTKVIDAPI VideoFrame_GetWidth( |
| ) |
int DTKVIDAPI VideoFrame_GetHeight( |
| ) |
int64 DTKVIDAPI VideoFrame_Timestamp( |
| ) |
int DTKVIDAPI VideoFrame_GetImageBuffer( |
| ) |
Gets the image buffer of frame in specified pixel format
hFrame | Handle of VideoFrame object |
format | pixel format |
pImageBuffer void** | Pointer to a pointer which receives the image buffer containing pixel data of the image |
width int* | Pointer to integer variable which receives width of image |
height int* | Pointer to integer variable which receives height of image |
stride int* | Pointer to integer variable which receives size of one image row in bytes |
You need to call VideoFrame_FreeImageBuffer with received pointer to free memory. This property used for video mode only
void DTKVIDAPI VideoFrame_FreeImageBuffer( |
| ) |
Deletes image buffer
pImageBuffer void* | Pointer to image buffer received using VideoFrame_GetImageBuffer function. |