video3d_frame_get_meters video3d_stop_streaming navigation bar

Table of Contents

video3d_frame_release

Release the frame so that it can be re-used by the video3d API.

Description

The video3d_frame_release function releases the frame so that it can be re-used by the video3d API.

Prototype

t_error
video3d_frame_release(t_video3d_frame frame);
    

Parameters

t_video3d_frame frame

The handle to the frame returned by video3d_stream_get_frame.

Return value

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

result = video3d_start_streaming(capture);

while (result >= 0 || result == -QERR_WOULD_BLOCK)
{
    t_video3d_frame frame;

    /* Wait until the next frame period */
    timeout_add(&timeout, &timeout, &interval);
    qtimer_sleep(&timeout);

    /* Read an RGB frame */
    result = video3d_stream_get_frame(rgb_stream, &frame);
    if (result >= 0) {
        /* Get an RGB frame. If a frame is available then display it */
        result = video3d_frame_get_data(frame, image);
        if (result >= 0) {
            ... process image ...
        }

        video3d_frame_release(frame);
    }
}
    
video3d_stop_streaming(capture);
    

See Also

 

navigation bar