Howto restart after "control-lost" signal

Hello,
how can I restart my gige camera after “control-lost” signal.
What I’m doing now is calling:

  • arv_camera_stop_acquisition (arvcam->camera);
  • g_object_unref (arvcam->stream);
  • g_object_unref (arvcam->camera);
    then restarting all from beginnning:
  • arvcam->camera = arv_camera_new (arv_get_device_id (id));
  • arvcam->stream = arv_camera_create_stream (arvcam->camera, NULL, NULL);
  • arv_stream_push_buffer (arvcam->stream, arv_buffer_new (payload, NULL));
  • arv_camera_start_acquisition (arvcam->camera);
    (plus other secondary settings…)

The camera seems to work fine: param setting, soft trigger…
but
buffer = arv_stream_timeout_pop_buffer (arvcam->stream,timeout);
always return buffer==NULL;

Any advice?

Hi Mirco,

Which version of aravis are you using ?

There is a reference leak in 0.7.4 that prevents the disconnection of the camera. Does the acquisition work if you wait for 10 or 20 seconds after the control-lost signal ?

Hi Emmanuel,
I’m using version 0.6.4 with a DFK 39 TIS camera.
The signal “control lost” is due to a breakpoint stop while debugging,
and if I wait some seconds into the breakpoint the acquisition doesn’t restart (I’m using soft-trigger in TriggerMode)