video3d_frame_get_timestamp video3d_frame_get_motion_data navigation bar

Table of Contents

video3d_frame_get_data

Get the frame data in the specified image format and data type.

Description

The video3d_frame_get_data function gets the frame data in the specified image format and data type. The data parameter must point to memory large enough to hold the image in the specified format and data type (HxWx3 or HxW). For example, if the image format and data type specified in the video3d_stream_open function was IMAGE_FORMAT_COL_MAJOR_PLANAR_RGB and IMAGE_DATA_TYPE_UINT8 then the buffer must be at least frame_width * frame_height * 3 * sizeof(t_uint8) bytes in size.

Prototype

t_error
video3d_frame_get_data(t_video3d_frame frame, void * data);
    

Parameters

t_video3d_frame frame

The handle to the frame returned by video3d_stream_get_frame.

void * data

The image data in the format and data type specified in the video3d_stream_open function that created the stream.

Return value

The return value is 0 if the frame data was retrieved 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.

Requirements

Include Files

Libraries

quanser_video3d.h

quanser_media.lib;quanser_communications.lib;quanser_runtime.lib;quanser_common.lib

Examples

t_uint8 image[640*480*3];
t_error result;

result = video3d_frame_get_data(frame, image);
    

See Also

 

navigation bar