gst: support sparse aravissrc streams#1075
Conversation
Add explicit timing and timeout policy controls so aravissrc can wait for sparse or triggered image streams without treating every empty buffer pop as a fatal error. Keep fixed-rate behavior as the default, skip framerate caps/latency reporting for sparse timing, and allow GstBaseSrc unlock to interrupt waits cleanly.
|
Hi, Thanks for the patch. Could you provide some gstreamer pipeline examples that exhibit the problems this work fixes ? It'll help me review the changes. Thanks. |
|
Hi, Sure. The intention of these changes is to better support triggered and other sparse acquisition modes where long periods without frames are expected. timeout-policy Controls how buffer acquisition timeouts are handled:
timing-mode Controls how the source advertises timing characteristics to GStreamer:
The two properties address different aspects of sparse acquisition. timeout-policy controls error handling, while timing-mode describes the stream semantics to GStreamer. A triggered camera may produce frames irregularly and therefore be a sparse stream regardless of whether trigger timeouts should be considered an error. This is why the properties are independent and can be combined as needed.
The default configuration remains unchanged (timeout-policy=error, timing-mode=fixed). The primary motivation is triggered acquisition. With the default behaviour (error + fixed), a pipeline may fail if triggers stop arriving for longer than the acquisition timeout: gst-launch-1.0 aravissrc features="TriggerSelector=FrameStart TriggerMode=On TriggerActivation=RisingEdge TriggerSource=Line1" timeout-policy=error timing-mode=fixed ! video/x-raw,format=RGB,width=720,height=540 ! videoconvert ! autovideosinkFor sparse triggered acquisition, the pipeline can instead remain running while waiting for the next trigger: gst-launch-1.0 aravissrc features="TriggerSelector=FrameStart TriggerMode=On TriggerActivation=RisingEdge TriggerSource=Line1" timeout-policy=wait timing-mode=sparse ! video/x-raw,format=RGB,width=720,height=540 ! videoconvert ! autovideosink |
|
Ok. Thanks for the explanation and the example pipelines. I will have a look soon. |
Add sparse stream handling for aravissrc
This adds explicit timing and timeout policy controls so aravissrc can wait for sparse or triggered image streams without treating every empty buffer pop as a fatal error.
For triggered cameras, it is valid that no frame is available for some time. In that case the stream can still be healthy, so this change allows aravissrc to keep waiting when requested.
The existing fixed-rate behavior stays the default. Sparse timing skips fixed framerate caps and latency reporting, and GstBaseSrc unlock can interrupt waits cleanly.
Tested:
aravissrcthrough GStreamer with a Basler a2A1920-51gcBAS camera in triggered/sparse acquisition mode.