<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 12, 2019 at 10:22 AM Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca">nicolas@ndufresne.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Le mercredi 12 juin 2019 à 09:42 -0400, pisymbol . a écrit :<br>
> <br>
> <br>
> On Wed, Jun 12, 2019 at 9:20 AM pisymbol . <<a href="mailto:pisymbol@gmail.com" target="_blank">pisymbol@gmail.com</a>> wrote:<br>
> > <br>
> > On Tue, Jun 11, 2019 at 11:19 PM Guillaume Desmottes <<a href="mailto:guillaume.desmottes@collabora.com" target="_blank">guillaume.desmottes@collabora.com</a>> wrote:<br>
> > > Hi there,<br>
> > > The gtksink and gtkglsink in <a href="https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/tree/master/tests/examples/gtk" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/tree/master/tests/examples/gtk</a><br>
> > > should be helpful to you.<br>
> > > <br>
> > <br>
> > Great! I know them. Now an example that uses them? :-)<br>
> > <br>
> > <br>
> <br>
> Full disclosure: I have now gotten it to work from a tip by Mattias. My point though is that in order to link videoconvert to gtksink you need to expose videoconverts src as a ghost pad which is no where to be found in the documentation. <br>
> <br>
> What worked for me (the missing link - literally):<br>
> <br>
> ghostpad = Gst.Ghostpad.new("sink", videoconveter_element.get_static_pad('src'))<br>
> bin.add_pad(ghotspad)<br>
> <br>
> And then I was able to link in gtksink and pack it using gtksink.props.widget. This stuff needs to be documented since the overwhelming majorities that turn up on Google simply do not work with the current API.<br>
<br>
Ghosting is not specific to using gtksink. If you use custom bins with<br>
pads, you have to learn how to ghost the pads.<br>
</blockquote><div><br></div><div>Totally agreed. But how would you use videoconvert to gtksink in PyGst? <br></div><div><br></div><div>Here's the thing:</div><div><br></div><div>gst-launch-1.0 filesrc location="blah" ! videoconvert ! gtksink</div><div><br></div><div>Just works. But if you use the parse_bin_from_description() API you then have to ghost pad out videoconvert to gtksink to make it actually display something. I understand why now but there are like ZERO examples of this idiom anywhere I could find by simply Googling. Mattias was kind of enough to suggest this and ti worked.</div><div><br></div><div>The bottom line is most of the examples out there are just flat out wrong. Shouldn't the official gstreamer doc be a bit more comprehensive in this regard? At leaat on the Python side? I'm just asking. I'm not excusing any one of being lazy. Though maybe I didn't read the doc thoroughly enough and I do apologize in advance if that is the case.<br></div><div><br></div><div>-aps<br></div></div></div>