Problems defining application specific caps

Sebastian Dröge sebastian at centricular.com
Sun Jun 1 01:14:08 PDT 2014


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.

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.

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140601/57a8fcac/attachment.sig>


More information about the gstreamer-devel mailing list