If arv_camera_acquisition() (single image acquisition) is called before arv_camera_start_acquisition(), the buffers are always null when trying
buffer = arv_stream_try_pop_buffer(stream);
and frame rate is 0.
Minimal reproducible example:
Just take “arvexample.c” and add the code from “arvacquisitiontest.c” in the main function
int main (int argc, char **argv)
{
ApplicationData data;
ArvCamera *camera;
ArvStream *stream;
GError *error = NULL;
int i;
data.buffer_count = 0;
/* Instantiation of the first available camera */
camera = arv_camera_new (NULL, &error);
// Code from arvacquisitiontest.c
// ======================================== //
// ArvCamera *camera; // We already have a camera
ArvBuffer *buffer;
// camera = arv_camera_new (argc > 1 ? argv[1] : NULL, NULL); // We already instantiated
buffer = arv_camera_acquisition (camera, 0, NULL);
if (ARV_IS_BUFFER (buffer))
printf ("Image successfully acquired\n");
else
printf ("Failed to acquire a single image\n");
g_clear_object (&buffer);
// ======================================== //
if (ARV_IS_CAMERA (camera)) {
...
// more code follows
...
}
...
}
It seems to be the case that calling arv_camera_acquisition() blocks the aravis stream internally somehow… Any help is appreciated.