Dynamic content in qroverlay?
Thibault Saunier
thibault at saunier.eu
Thu Mar 2 19:52:33 UTC 2023
Hi,
Since 1.22 the qroverlay supports setting per buffer overlay based on
GstCustomMeta. You can find it mentioned in the documentation:
https://gstreamer.pages.freedesktop.org/-/gstreamer/-/jobs/37354974/artifacts/documentation/qroverlay/qroverlay.html?gi-language=c#qroverlay
In the end this means that instead of trying to set the property in the
probe you should add a `GstQROverlayMeta` on the buffer with the values
specified in the documentation.
Regards,
Thibault
On Thu, 2023-03-02 at 12:38 +0100, Florian Echtler via gstreamer-devel
wrote:
> Hello everyone,
>
> I've fiddled around with including buffer-specific data in a video
> stream using
> qroverlay (somewhat like a custom version of debugqroverlay, which
> I'm using for
> now). I tried the following code snippet:
>
> # pad probe for debug QR code with timestamp
> def qr_probe_callback(pad,info,pdata):
> buf = info.get_buffer()
> parent = pad.get_parent_element()
> parent.set_property("data",str(buf.pts))
> return Gst.PadProbeReturn.OK
>
> [... and afterwards ...]
>
> sinkpad = qroverlay.get_static_pad("sink")
> sinkpad.add_probe(Gst.PadProbeType.BUFFER, qr_probe_callback,
> None)
>
> The pad probe gets called, but the QR code in the video stream seems
> to be stuck
> on the very first value that got set when the callback was triggered
> for the
> first time. What do I need to do to "re-render" the QR code with the
> updated
> data property?
>
> Best, Florian
> --
> SENT FROM MY DEC VT50 TERMINAL
More information about the gstreamer-devel
mailing list