Table of Contents
video3d_open
Opens a 3D video capture device, such as am RGBD camera.
Description
The video3d_open function opens a 3D video capture device, such as an RGBD camera. The camera is identified by a device identifier. The handle to the capture session returned by this function is used by the other functions in the Multimedia API to refer to the session. This handle must be closed using the video3d_close function when the session is no longer in use.
Prototype
t_error video3d_open(const char * device_id, t_video3d * handle);
Parameters
const char * device_id
A string identifying the video capture device to be opened. If it is a number, such as "3", then the device will be opened basd on its index in the device list. The number may be octal or hexadecimal as well. Otherwise, it will identify the device based on its serial number.
If the device identifier is followed by an "@" symbol and a URL then it will access a simulated 3D video device or access a 3D video device through a video proxy server, using the given communications URL.
t_video3d * handle
The address of a t_video3d
variable in which the handle to the capture session
will be stored. This handle is then passed to the other video3d functions to identify the
capture session.
Return value
The return value is 0 if the 3D video capture session is opened successfully. Otherwise a negative
error code is returned. Error codes are
defined in quanser_errors.h
. A suitable error message
may be retrieved using msg_get_error_message.
Error codes
QERR_INVALID_ARGUMENT
One of the arguments is invalid.
QERR_OUT_OF_MEMORY
There is not enough memory to complete the operation.
Requirements
Include Files |
Libraries |
---|---|
quanser_video3d.h |
quanser_media.lib;quanser_communications.lib;quanser_runtime.lib;quanser_common.lib |
Examples
t_video3d capture; t_error result = video3d_open("0", &capture); if (result >= 0) { ... video3d_close(capture); } else { TCHAR message[512]; msg_get_error_message(NULL, result, message, sizeof(message)); _tprintf(_T("Failed to open video capture session. %s (error %d)\n"), message, -result); }
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.