Causes of pipeline non-transitivity?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Causes of pipeline non-transitivity?

GStreamer-devel mailing list
I frequently find myself confused and not knowing where to look when I'm able to build a pipeline from A->B, and a pipeline from B->C, but not from A->B->C.

For example, I can go from v4l2src->glupload:

    $ gst-launch-1.0 v4l2src ! glupload ! glimagesink

And I can go from glupload->glshader:

    $ gst-launch-1.0 videotestsrc ! glupload ! glshader fragment="\"`cat myshader.frag`\"" ! glimagesink

But when I try and combine the two, I get an error:

    $ gst-launch-1.0 v4l2src ! glupload ! glshader fragment="\"`cat myshader.frag`\"" ! glimagesink

    WARNING: erroneous pipeline: could not link gluploadelement0 to glfiltershader0

Where should I look when I hit issues like this? Is it always the case, for example, that A and B have negotiated a format that's incompatible with C? Or does it mean I need to provide more specific properties to A (or B, or C)? I don't see anything in gst-inspect that indicates they wouldn't all work together.

Thanks,
Tom

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Causes of pipeline non-transitivity?

GStreamer-devel mailing list


On 25/4/21 1:39 am, amindfv--- via gstreamer-devel wrote:

> I frequently find myself confused and not knowing where to look when I'm able to build a pipeline from A->B, and a pipeline from B->C, but not from A->B->C.
>
> For example, I can go from v4l2src->glupload:
>
>      $ gst-launch-1.0 v4l2src ! glupload ! glimagesink
>
> And I can go from glupload->glshader:
>
>      $ gst-launch-1.0 videotestsrc ! glupload ! glshader fragment="\"`cat myshader.frag`\"" ! glimagesink
>
> But when I try and combine the two, I get an error:
>
>      $ gst-launch-1.0 v4l2src ! glupload ! glshader fragment="\"`cat myshader.frag`\"" ! glimagesink
>
>      WARNING: erroneous pipeline: could not link gluploadelement0 to glfiltershader0
>
> Where should I look when I hit issues like this? Is it always the case, for example, that A and B have negotiated a format that's incompatible with C? Or does it mean I need to provide more specific properties to A (or B, or C)? I don't see anything in gst-inspect that indicates they wouldn't all work together.
Add -v to gst-launch-1.0 to see the negotiated caps for successful cases.

In this case, you are probably missing a glcolorconvert element
(automatically contained within glimagesink) or a videoconvert element
as OpenGL only deals with RGBA buffers byt v4l2src likely produces some
YUV format..

Cheers
-Matt

> Thanks,
> Tom
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

OpenPGP_signature (505 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Causes of pipeline non-transitivity?

GStreamer-devel mailing list
In reply to this post by GStreamer-devel mailing list


Le sam. 24 avr. 2021 12 h 45, amindfv--- via gstreamer-devel <[hidden email]> a écrit :
I frequently find myself confused and not knowing where to look when I'm able to build a pipeline from A->B, and a pipeline from B->C, but not from A->B->C.

For example, I can go from v4l2src->glupload:

    $ gst-launch-1.0 v4l2src ! glupload ! glimagesink

And I can go from glupload->glshader:

glimagesink is a bin, the key missing element is glcolorconvert which transforms yuv pixel into rgba in GL space.


    $ gst-launch-1.0 videotestsrc ! glupload ! glshader fragment="\"`cat myshader.frag`\"" ! glimagesink

But when I try and combine the two, I get an error:

    $ gst-launch-1.0 v4l2src ! glupload ! glshader fragment="\"`cat myshader.frag`\"" ! glimagesink

    WARNING: erroneous pipeline: could not link gluploadelement0 to

So add glcolorconvert after glupload.

 glfiltershader0



Where should I look when I hit issues like this? Is it always the case, for example, that A and B have negotiated a format that's incompatible with C? Or does it mean I need to provide more specific properties to A (or B, or C)? I don't see anything in gst-inspect that indicates they wouldn't all work together.

Thanks,
Tom

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Causes of pipeline non-transitivity?

GStreamer-devel mailing list
In reply to this post by GStreamer-devel mailing list
Thank you, this both solves my immediate problem (missing `glcolorconvert`) as well as helps me find future issues (with -v I do see lines like "/GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLColorConvertElement").

Tom

On Sun, Apr 25, 2021 at 02:35:50PM +1000, Matthew Waters wrote:

>
>
> On 25/4/21 1:39 am, amindfv--- via gstreamer-devel wrote:
> > I frequently find myself confused and not knowing where to look when I'm able to build a pipeline from A->B, and a pipeline from B->C, but not from A->B->C.
> >
> > For example, I can go from v4l2src->glupload:
> >
> >      $ gst-launch-1.0 v4l2src ! glupload ! glimagesink
> >
> > And I can go from glupload->glshader:
> >
> >      $ gst-launch-1.0 videotestsrc ! glupload ! glshader fragment="\"`cat myshader.frag`\"" ! glimagesink
> >
> > But when I try and combine the two, I get an error:
> >
> >      $ gst-launch-1.0 v4l2src ! glupload ! glshader fragment="\"`cat myshader.frag`\"" ! glimagesink
> >
> >      WARNING: erroneous pipeline: could not link gluploadelement0 to glfiltershader0
> >
> > Where should I look when I hit issues like this? Is it always the case, for example, that A and B have negotiated a format that's incompatible with C? Or does it mean I need to provide more specific properties to A (or B, or C)? I don't see anything in gst-inspect that indicates they wouldn't all work together.
>
> Add -v to gst-launch-1.0 to see the negotiated caps for successful cases.
>
> In this case, you are probably missing a glcolorconvert element
> (automatically contained within glimagesink) or a videoconvert element as
> OpenGL only deals with RGBA buffers byt v4l2src likely produces some YUV
> format..
>
> Cheers
> -Matt
>
> > Thanks,
> > Tom
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > [hidden email]
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel