Vid_rend: syncpoint wait timeout on setting nvcompositor gstreamer element's sink pad property

In order to switch display output from one HDMI capture source to another, I’m layering one video on top of another (zorder property), and with the newly uppermost plane having initial alpha = 0.0. Over the course of the next 15 frames (so 0.5s total at 30fps) that alpha is set with an increasing value, ultimately 1.0, so as to fade in the new video of interest.

No synchronisation is attempted (there’s a simple usleep() between increments), and most of the time the transition goes fine. Today I witnessed the error “vid_rend: syncpoint wait timeout”. The nvcompositor output goes via a tee / queues to both nvoverlaysink and nvv4l2h265.

Searches on these forums for this error point to now-fixed issues when running X. In this case I am not running Desktop/X.

Any ideas about this error? Is a synchronisation mechanism required when setting nvcompositor sink pad properties frame-by-frame?

It should not require syncup call if next element is nvoverlaysink or nvv4l2h265ecc. But for a try, please call NvBufferMemSyncForCpu() and NvBufferMemSyncForDevice() after NvBufferComposite() in nvcompositor. You can download the source code package to get source code of the plugin, and do customization.

1 Like

Well, I am having a fun time trying to figure out what parameters to supply to those functions, both requiring (int dmabuf_fd, unsigned int plane, void **pVirtAddr).

In the meantime, I tried setting the alpha property every other frame, instead of every frame, and thus far I have hit no issues.

Whilst I suspect there may be some sort of race condition when updating an nvcompositor sink pad every frame with a new alpha value, I seem to have stumbled across an acceptable workaround. If you want me to further investigate whether adding those two sync() lines addresses the issue I see sporadically, I’m going to need some further guidance eg regarding buffers… are they the 1 to N compositor input buffers, or the single output buffer? Thanks!

Further testing reveals setting the alpha every other frame simply lowers (halves?) the chance of an error.

I’ll try again to implement those sync calls.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.