GetAndWait()

Get a buffer of media data, waiting until a buffer is available or a specific time has passed

Synopsis:

#include <OMXAL/OpenMAXAL_QNX.h>
struct XAQNXBufferQueueSinkItf_ {
    XAQNXBuffer* (*GetAndWait)(XAQNXBufferQueueSinkItf self,
                               const struct timespec *abstime);
} ;

Arguments:

self
A reference to the sink interface
abstime
A pointer to an immutable timespec structure specifying the absolute time at which the timeout is to expire

Library:

mmfilter

Description:

This function attempts to get a buffer of media data. The function blocks until a buffer is available or the absolute time given in abstime has passed. The exception is if playback or recording is stopped, in which case a NULL pointer is returned right away.

For the abstime value, the clock source is considered to be CLOCK_REALTIME (CLOCK_MONOTONIC can't be selected here). This value can also be NULL to wait indefinitely for a buffer to become available.

Returns:

A pointer to an XAQNXBuffer containing media data sent to the sink. If no data items were available (i.e., if playback or recording is stopped or the timeout expired), NULL is returned.