aravis icon indicating copy to clipboard operation
aravis copied to clipboard

Gv control access API implementation

Open Ekleog opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe.

A way to know whether we currently have control access has been made available with https://github.com/AravisProject/aravis/issues/382. Unfortunately, there is currently no good way to relinquish control access without finalizing the whole camera.

Describe the solution you'd like

Would it make sense to just make arv_gv_device_take_control and arv_gv_device_leave_control non-static?

Describe alternatives you've considered

Not doing this, but then it would mean the only way to relinquish control access on the camera is to actually finalize the whole camera, which is especially unpleasant in affine-typed languages (like Rust) where we can't have uninitialized variables hanging around.

Additional context

Well… as usual, thank you for all the work put on aravis! (and yes, I'll eventually find the time to come back to #396, sorry for the delay…)

Ekleog avatar Aug 18 '20 18:08 Ekleog

Hi,

Would it make sense to just make arv_gv_device_take_control and arv_gv_device_leave_control non-static?

It is not as simple as that. If we want to expose this control API, we have to take care to handle correctly the heartbeat thread.

Also, it would be the opportunity to implement a lazy control access mode. ArvGvdevice would gain device control access only for write or command actions, and would release the control access after a timeout, or when the device is finalized. This default mode could exist in addition to an explicit control access.

EmmanuelP avatar Aug 19 '20 06:08 EmmanuelP

@EmmanuelP Any idea when this can/will be landed?

Thanks!

lovesegfault avatar Sep 15 '20 18:09 lovesegfault