<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font face="DejaVu Sans">Thanks Matt!</font></p>
<p><font face="DejaVu Sans">Works like a charm, and I don't think
I'd ever have found that one :) So just to clarify for others:
it's on the *glvideomixerelement*, not on the </font><font
face="DejaVu Sans"><font face="DejaVu Sans">glvideomixer *bin*.
To hook it up: glvideomixer.get_by_name("mixer").connect("</font></font><font
face="DejaVu Sans"><font face="DejaVu Sans">samples-selected",
callback)</font> </font></p>
<p>Kind regards,<br>
Michiel<br>
</p>
<div class="moz-cite-prefix">On 12-11-2020 07:06, Matthew Waters
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:76ba93f5-3918-ebf3-d214-5ea6976c5874@gmail.com">There is
a samples-selected signal on glvideomixerelement (in 1.18+) where
you can get a callback at the correct place to set the necessary
pad information after selection but before composition which
should work for this case. <br>
<br>
See e.g.
<a class="moz-txt-link-freetext"
href="https://gstreamer.freedesktop.org/documentation/base/gstaggregator.html?gi-language=c#GstAggregator::samples-selected">https://gstreamer.freedesktop.org/documentation/base/gstaggregator.html?gi-language=c#GstAggregator::samples-selected</a>
<a class="moz-txt-link-rfc2396E"
href="https://gstreamer.freedesktop.org/documentation/base/gstaggregator.html?gi-language=c#GstAggregator::samples-selected"><https://gstreamer.freedesktop.org/documentation/base/gstaggregator.html?gi-language=c#GstAggregator::samples-selected></a>.
<br>
<br>
Cheers <br>
-Matt <br>
<br>
On 12/11/20 2:42 am, Michiel Konstapel wrote: <br>
<blockquote type="cite">Hi all, <br>
<br>
What I am trying to achieve, is to do "digital pan/zoom" on live
video frames using a glvideomixer. For each frame, I want to set
xpos, ypos, width, and height on the glvideomixer sink (input)
pad - ideally, right before each buffer is processed. However,
when I do this in a buffer probe callback on the sink pad, I
occasionally get incorrect frames, where some of the properties
have updated and others have not. For example, the xpos might
have been updated while the ypos, height and width are still the
old values, resulting in a distorted frame. Note that I am using
the Python bindings, so I don't think I have access to a
`set_property` that can set multiple properties in one call, as
would be possible from C. <br>
<br>
My workaround so far is to set the properties from a probe on
the *source* pad instead. That way, the property changes have
one frame duration (40 ms, at 25 fps) to be applied. That
appears to be working, and I can live with the extra one frame
delay, but I am still curious why this is required. I would
expect the buffer not to be delivered to the input pad until the
probe callback has returned, and the set_property calls to have
completed. <br>
<br>
Is this an issue specifically with glvideomixer? Are
set_property calls allowed from a probe callback? If not, what
about a signal handler? Would it be better to insert an identity
element before the mixer and call set_property from its handoff
signal? <br>
<br>
Alternatively, I could do the set_property calls from the main
thread, but then I don't see any way to synchronize them against
the glvideomixer's redraws; there's no way to do locking to
ensure all four properties are updated at once, is there? <br>
<br>
Kind regards, <br>
Michiel <br>
<br>
_______________________________________________ <br>
gstreamer-devel mailing list <br>
<a class="moz-txt-link-abbreviated"
href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<br>
<a class="moz-txt-link-freetext"
href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
<br>
</blockquote>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<div class="moz-signature">-- <br>
<font face="'DejaVu Sans',sans-serif"> Michiel Konstapel<br>
<em>Lead Software Developer</em><br>
<a href="https://www.aanmelder.nl">www.aanmelder.nl</a><br>
<br>
T: +31 (0)15 2400119<br>
E: <a href="mailto:michiel@aanmelder.nl">michiel@aanmelder.nl</a>
<p><a href="https://www.aanmelder.nl/i/footer" target="_blank"><img
alt="" src="https://www.aanmelder.nl/i/footer-img"></a></p>
</font></div>
</body>
</html>