Problems defining application specific caps
Tiago Katcipis
katcipis at inf.ufsc.br
Mon Jun 2 14:23:08 PDT 2014
On Sun, Jun 1, 2014 at 5:14 AM, Sebastian Dröge <sebastian at centricular.com>
wrote:
> On Sa, 2014-05-31 at 17:51 -0300, Tiago Katcipis wrote:
> > Hi,
> >
> > Sorry if I'm asking something stupid, but i was unable to find anything
> > about this subject on the docs (about caps it always explaining how the
> > different negotiation scenarios happens, but not this).
> >
> > I want to use a application specific caps on a plugin that I'm writing,
> it
> > will basically receive audio and produce a proprietary binary format
> > (neither audio or video).
> >
> > So i create my caps like:
> >
> > static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
> > GST_PAD_SRC,
> > GST_PAD_ALWAYS,
> > GST_STATIC_CAPS ("application/vnd.mydata+octet-stream")
> > );
> >
> > And i run a pipeline with fakesink or filesink (both accepts "any" caps),
> > but it fails to link it:
> >
> > WARNING: erroneous pipeline: could not link myplugin to fakesink0
> >
> > if i just change the caps to:
> >
> > static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
> > GST_PAD_SRC,
> > GST_PAD_ALWAYS,
> > GST_STATIC_CAPS ("audio/x-raw")
> > );
> >
> > It works perfectly fine. It makes no sense to me since fakesink/filesink
> > should accept any type of data.
> >
> > Is Gstreamer limited to a fixed set of caps ? I cant define a new
> > application specific caps ?
>
> GStreamer does not limits itself to a fixed set of caps. The only reason
> why custom caps might not be accepted by another element is if that
> element does not accept these custom caps.
>
I tested a little further and i got this:
gst-launch-1.0 audiotestsrc ! appspecificcaps ! fakesink
WARNING: erroneous pipeline: could not link appspecificcaps0 to fakesink0
gst-launch-1.0 fakesrc ! appspecificcaps ! fakesink
works fine.
It seems that changing the source causes the problem, which seems odd since
a intersection between the source pad and the sink pad is only required
(and automatically done/checked) on plugins that inherits from
GstBaseTransform. But my plugin inherits from GstElement (actually i have
an empty template that reproduces the problem).
>
> But you say you directly link your element to a fakesink? That should
> work just fine, and if it doesn't please provide a debug log with
> GST_DEBUG=6. It will contain the reason why it doesn't work.
> If changing the caps to audio/x-raw makes it work in exactly the same
> pipeline, then this suggests that you have an element between your
> element and fakesink that only supports raw audio.
>
I attached the log. From what i can see it seems that a intersection
between the sink pad and the src pad of my element is being made, is this
the default behaviour ?
>
> --
> Sebastian Dröge, Centricular Ltd - http://www.centricular.com
> Expertise, Straight from the Source
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140602/8724791c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log.tgz
Type: application/x-gzip
Size: 168305 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140602/8724791c/attachment-0001.bin>
More information about the gstreamer-devel
mailing list