videofilter-derived plugin returning NULL caps

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

videofilter-derived plugin returning NULL caps

GStreamer-devel mailing list
Hi,

I used gst-element-maker to create a simple videofilter-derived plugin and
got one with my custom transform code, but it doesn't link into pipelines.
gst-inspect shows correctly src and sink caps:

Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-raw
                 format: { (string)GRAY16_BE }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]

  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw
                 format: { (string)GRAY8 }
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]

but gst-launch fails to link with errors like

could not link videoconvert0 to testplugin-0

with PAD debugging indicating:

GST_CAPS gstutils.c:3110:gst_pad_query_caps:<testplugin-0:src> query returned EMPTY

I also tried to modify the capability registration code to static one like
in gstdodge.c from plugins-bad, that didn't help either. And comparing my
plugin to gstdodge there doesn't seem to be anything missing in mine. Can
it be something that I'm not doing correctly for compiling / linking? I'm
using command-line like

gcc -shared -o gsttestplugin.so gsttestplugin.o -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0

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

Re: videofilter-derived plugin returning NULL caps

GStreamer-devel mailing list
An update:

On Sat, 19 Jun 2021, Guennadi Liakhovetski via gstreamer-devel wrote:

> Hi,
>
> I used gst-element-maker to create a simple videofilter-derived plugin and
> got one with my custom transform code, but it doesn't link into pipelines.
> gst-inspect shows correctly src and sink caps:
>
> Pad Templates:
>   SINK template: 'sink'
>     Availability: Always
>     Capabilities:
>       video/x-raw
>                  format: { (string)GRAY16_BE }
>                   width: [ 1, 2147483647 ]
>                  height: [ 1, 2147483647 ]
>               framerate: [ 0/1, 2147483647/1 ]
>
>   SRC template: 'src'
>     Availability: Always
>     Capabilities:
>       video/x-raw
>                  format: { (string)GRAY8 }
>                   width: [ 1, 2147483647 ]
>                  height: [ 1, 2147483647 ]
>               framerate: [ 0/1, 2147483647/1 ]
>
> but gst-launch fails to link with errors like
>
> could not link videoconvert0 to testplugin-0
>
> with PAD debugging indicating:
>
> GST_CAPS gstutils.c:3110:gst_pad_query_caps:<testplugin-0:src> query returned EMPTY

It seems the query returns empty capabilities because the pad isn't
connected:

GST_PADS gstpad.c:4351:gst_pad_peer_query:<mlx90640-0:src> pad has no peer

So, have to figure out why it isn't connecting - still no clue.

Thanks
Guennadi

> I also tried to modify the capability registration code to static one like
> in gstdodge.c from plugins-bad, that didn't help either. And comparing my
> plugin to gstdodge there doesn't seem to be anything missing in mine. Can
> it be something that I'm not doing correctly for compiling / linking? I'm
> using command-line like
>
> gcc -shared -o gsttestplugin.so gsttestplugin.o -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: videofilter-derived plugin returning NULL caps

GStreamer-devel mailing list
Update #2: I know what the problem was: you cannot use the videofilter
class to generate format-converting plugins. Input and output formats must
be equal with it. Understood and problem solved!

Thanks
Guennadi

On Sun, 20 Jun 2021, Guennadi Liakhovetski via gstreamer-devel wrote:

> An update:
>
> On Sat, 19 Jun 2021, Guennadi Liakhovetski via gstreamer-devel wrote:
>
> > Hi,
> >
> > I used gst-element-maker to create a simple videofilter-derived plugin and
> > got one with my custom transform code, but it doesn't link into pipelines.
> > gst-inspect shows correctly src and sink caps:
> >
> > Pad Templates:
> >   SINK template: 'sink'
> >     Availability: Always
> >     Capabilities:
> >       video/x-raw
> >                  format: { (string)GRAY16_BE }
> >                   width: [ 1, 2147483647 ]
> >                  height: [ 1, 2147483647 ]
> >               framerate: [ 0/1, 2147483647/1 ]
> >
> >   SRC template: 'src'
> >     Availability: Always
> >     Capabilities:
> >       video/x-raw
> >                  format: { (string)GRAY8 }
> >                   width: [ 1, 2147483647 ]
> >                  height: [ 1, 2147483647 ]
> >               framerate: [ 0/1, 2147483647/1 ]
> >
> > but gst-launch fails to link with errors like
> >
> > could not link videoconvert0 to testplugin-0
> >
> > with PAD debugging indicating:
> >
> > GST_CAPS gstutils.c:3110:gst_pad_query_caps:<testplugin-0:src> query returned EMPTY
>
> It seems the query returns empty capabilities because the pad isn't
> connected:
>
> GST_PADS gstpad.c:4351:gst_pad_peer_query:<mlx90640-0:src> pad has no peer
>
> So, have to figure out why it isn't connecting - still no clue.
>
> Thanks
> Guennadi
>
> > I also tried to modify the capability registration code to static one like
> > in gstdodge.c from plugins-bad, that didn't help either. And comparing my
> > plugin to gstdodge there doesn't seem to be anything missing in mine. Can
> > it be something that I'm not doing correctly for compiling / linking? I'm
> > using command-line like
> >
> > gcc -shared -o gsttestplugin.so gsttestplugin.o -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0
> _______________________________________________
> 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