Function
AravisStreamCallback
Declaration
void
(* ArvStreamCallback) (
void* user_data,
ArvStreamCallbackType type,
ArvBuffer* buffer
)
Description [src]
This is the signature of the callback passed on an ArvStream
instantiation, which will be called on the stream
receiving thread initialization and finalization, and on every received buffer, once when the buffer is pulled from
the buffer queue, and one more when the buffer is done (successfully or not).
buffer
is assured to be a valid ArvBuffer
object only when type is ARV_STREAM_CALLBACK_TYPE_START_BUFFER
or
ARV_STREAM_CALLBACK_TYPE_BUFFER_DONE
.
The callback is awaken from the stream receiving thread, which means it is forbidden to access to the camera instance, except if you take care to protect the instance access from concurrent access. It also means all the time spent in the callback is less time available for the incoming data handling. CPU intensive image processing should happen elsewhere.
Parameters
user_data
-
Type:
void*
A pointer to user data associated to this callback.
The argument can be NULL
.The data is owned by the caller of the function. type
-
Type:
ArvStreamCallbackType
Reason of the callback call.
buffer
-
Type:
ArvBuffer
A
ArvBuffer
object.The data is owned by the caller of the function.