<div dir="ltr">Nevermind, just got it to work!</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 16, 2016 at 3:42 PM, Gottfried Haider <span dir="ltr"><<a href="mailto:gottfried.haider@gmail.com" target="_blank">gottfried.haider@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks, that's great!<div><br></div><div>One last problem (I hope): how would I be able to programmatically get those elements in the video-sink bin?</div><div><br></div><div>gst_bin_get_by_name() on the main pipeline does not work anymore, e.g. when searching for the glupload, even though the function supposedly also looks into child bins.</div><div><br></div><div>Also tried iterating over sinks with gst_bin_iterate_sink() and look for my glupload there, but didn't seem to work.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>G</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 16, 2016 at 3:05 PM, Matthew Waters <span dir="ltr"><<a href="mailto:ystreet00@gmail.com" target="_blank">ystreet00@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><span>
<div>On 16/09/16 22:53, Gottfried Haider
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Thanks Matt!
<div><br>
</div>
<div>Regarding the playbin-option: Is it possible to create a
"custom video branch" (GstBin) as part of a textual pipeline
description? (that is being fed to gst_parse_launch)</div>
</div>
</blockquote>
<br></span>
You can create a bin as the video-sink for gst-launch-1.0. You just
need to enclose the video-sink parameter in double quotes and a bin
should be created with your elements inside.<br>
<br>
e.g. gst-launch-1.0 playbin uri=<a>file:///path/to/file</a>
video-sink="glupload ! glcolorconvert ! glfiltercube !
glimagesinkelement" will cubify the video.<br>
<br>
Cheers<br>
-Matt<div><div><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div>Or do I need to create a new bin in code, set it up with
glupload ! capsfilter ! fakesink (like in testegc [1]), and
later use gst_pipeline_new() and
gst_parse_bin_from_description<wbr>() to create a custom pipeline
that references the video bin created earlier?</div>
<div><br>
</div>
<div>Best</div>
<div>G</div>
<div><br>
</div>
<div>[1] <a href="https://cgit.freedesktop.org/gstreamer/gst-omx/tree/examples/egl/testegl.c#n1079" target="_blank">https://cgit.freedesktop.o<wbr>rg/gstreamer/gst-omx/tree/exam<wbr>ples/egl/testegl.c#n1079</a></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Sep 16, 2016 at 2:26 PM,
Matthew Waters <span dir="ltr"><<a href="mailto:ystreet00@gmail.com" target="_blank">ystreet00@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 16/09/16 20:10, Gottfried Haider wrote:<br>
> Hello all,<br>
><br>
> I have this pipeline as part of Processing's glvideo
library, that<br>
> works great - but doesn't play audio:<br>
><br>
> uridecodebin uri=... ! glupload name=glup !
glcolorconvert !<br>
> capsfilter name=filter ! fakesink name=vsink<br>
><br>
> So I tried this instead<br>
><br>
> uridecodebin uri=... name=decoder ! queue !
audioconvert !<br>
> audioresample ! autoaudiosink sync=false decoder. !
queue ! glupload<br>
> name=glup ! glcolorconvert ! capsfilter name=filter !
fakesink<br>
> name=vsink sync=false<br>
><br>
> which just hang. (The particular mp4 file I was
testing this with had<br>
> not audio track if that matters.)<br>
><br>
><br>
> Should the second pipeline work in theory? Any other
things I could<br>
> try to get something like a playbin-like source
element that would<br>
> also play audio tracks, if the source has one? I
uploaded a dot file<br>
> of the second pipeline on OS X for you to look
at[1].<br>
<br>
</span>If the file didn't have an audio track that means
that the audio output<br>
part of the pipeline would not be linked to uridecodebin and
thus when<br>
prerolling would never get a buffer and would never complete
the state<br>
change to paused. A backtrace of all threads would probably
show that<br>
the audiosink is stuck on the preroll cond/lock.<br>
<br>
Your options are to either use playbin with the video-sink
property set<br>
to your custom video branch or if you're set on using
uridecodebin, you<br>
will have to selectively add the audio part of the pipeline
if there is<br>
an audio pad exposed by uridecodebin. See the following
example which<br>
uses decodebin but the same idea is valid for uridecodebin:<br>
<a href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-components-decodebin.html" rel="noreferrer" target="_blank">https://gstreamer.freedesktop.<wbr>org/data/doc/gstreamer/head/ma<wbr>nual/html/section-components-d<wbr>ecodebin.html</a>.<br>
<br>
Cheers<br>
-Matt<br>
<div>
<div><br>
> (If the pipeline looks right it might just be that
the audio decoding<br>
> hits this bug [2] on OS X.)<br>
><br>
><br>
> Thanks in advance<br>
> Gottfried<br>
><br>
><br>
> [1] <a href="https://bugzilla.gnome.org/show_bug.cgi?id=768630" rel="noreferrer" target="_blank">https://bugzilla.gnome.org/sho<wbr>w_bug.cgi?id=768630</a><br>
> [2] <a href="https://sukzessiv.net/%7Egohai/gstreamer/uridecode-audio.png" rel="noreferrer" target="_blank">https://sukzessiv.net/~gohai/g<wbr>streamer/uridecode-audio.png</a><br>
><br>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>