<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jun 1, 2014 at 5:14 AM, Sebastian <span style class="">Dröge</span> <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank"><span style class="">sebastian</span>@<span style class="">centricular</span>.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">On Sa, 2014-05-31 at 17:51 -0300, Tiago Katcipis wrote:<br>
> Hi,<br>
><br>
> Sorry if I'm asking something stupid, but i was unable to find anything<br>
> about this subject on the docs (about caps it always explaining how the<br>
> different negotiation scenarios happens, but not this).<br>
><br>
> I want to use a application specific caps on a plugin that I'm writing, it<br>
> will basically receive audio and produce a proprietary binary format<br>
> (neither audio or video).<br>
><br>
> So i create my caps like:<br>
><br>
> static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",<br>
> GST_PAD_SRC,<br>
> GST_PAD_ALWAYS,<br>
> GST_STATIC_CAPS ("application/vnd.mydata+octet-stream")<br>
> );<br>
><br>
> And i run a pipeline with fakesink or filesink (both accepts "any" caps),<br>
> but it fails to link it:<br>
><br>
> WARNING: erroneous pipeline: could not link myplugin to fakesink0<br>
><br>
> if i just change the caps to:<br>
><br>
> static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",<br>
> GST_PAD_SRC,<br>
> GST_PAD_ALWAYS,<br>
> GST_STATIC_CAPS ("audio/x-raw")<br>
> );<br>
><br>
> It works perfectly fine. It makes no sense to me since fakesink/filesink<br>
> should accept any type of data.<br>
><br>
> Is Gstreamer limited to a fixed set of caps ? I cant define a new<br>
> application specific caps ?<br>
<br>
</div></div>GStreamer does not limits itself to a fixed set of caps. The only reason<br>
why custom caps might not be accepted by another element is if that<br>
element does not accept these custom caps.<br></blockquote><div><br><div class="" id=":222" tabindex="-1"><div id=":2kw" class="" tabindex="0"><img class="" src="https://mail.google.com/mail/u/0/images/cleardot.gif"></div>
</div><div>I tested a little further and i got this:<br><br><span style class="">gst</span>-launch-1.0 <span style class="">audiotestsrc</span> ! <span style class="">appspecificcaps</span> ! <span style class="">fakesink</span><br>
WARNING: erroneous pipeline: could not link appspecificcaps0 to fakesink0<br>
<br><span style class="">gst</span>-launch-1.0 <span style class="">fakesrc</span> ! <span style class="">appspecificcaps</span> ! <span style class="">fakesink</span><br></div><div>works fine.<br><br></div>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 <span style class="">plugins</span> that inherits from
<span style class="">GstBaseTransform</span>. But my <span style class="">plugin</span> inherits from <span style class="">GstElement</span> (actually i
have an empty template that reproduces the problem).<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
But you say you directly link your element to a fakesink? That should<br>
work just fine, and if it doesn't please provide a debug log with<br>
GST_DEBUG=6. It will contain the reason why it doesn't work.<br>
If changing the caps to audio/x-raw makes it work in exactly the same<br>
pipeline, then this suggests that you have an element between your<br>
element and fakesink that only supports raw audio.<br></blockquote><div><br>I attached the log. From what i can see it seems that a intersection
between the sink pad and the <span style class="">src</span> pad of my element is being made, is
this the default behaviour ?<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><font color="#888888"><br>
--<br>
Sebastian Dröge, Centricular Ltd - <a href="http://www.centricular.com" target="_blank">http://www.centricular.com</a><br>
Expertise, Straight from the Source<br>
</font></span><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div></div>