<div dir="ltr">Is there any interest on fixing the tutorial to use gst-plugins-bad element maker ? Or should i fix the gst-template (i already have a fix to the template pending, and it seems to be abandoned :-).<div><br></div>
<div>Best regards,</div><div>Tiago Katcipis</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 3, 2014 at 1:50 PM, Tiago Katcipis <span dir="ltr"><<a href="mailto:katcipis@inf.ufsc.br" target="_blank">katcipis@inf.ufsc.br</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Tue, Jun 3, 2014 at 4:09 AM, Sebastian <span>Dröge</span> <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank"><span>sebastian</span>@<span>centricular</span>.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On Mo, 2014-06-02 at 18:23 -0300, Tiago Katcipis wrote:<br>
> On Sun, Jun 1, 2014 at 5:14 AM, Sebastian Dröge <<a href="mailto:sebastian@centricular.com" target="_blank">sebastian@centricular.com</a>><br>
> wrote:<br>
><br>
> > 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,<br>
> > 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>
> > 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>
> ><br>
><br>
</div></div><div>> I tested a little further and i got this:<br>
><br>
> gst-launch-1.0 audiotestsrc ! appspecificcaps ! fakesink<br>
> WARNING: erroneous pipeline: could not link appspecificcaps0 to fakesink0<br>
><br>
> gst-launch-1.0 fakesrc ! appspecificcaps ! fakesink<br>
> works fine.<br>
><br>
> It seems that changing the source causes the problem, which seems odd since<br>
> a intersection between the source pad and the sink pad is only required<br>
> (and automatically done/checked) on plugins that inherits from<br>
> GstBaseTransform. But my plugin inherits from GstElement (actually i have<br>
> an empty template that reproduces the problem).<br>
><br>
><br>
> ><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>
> ><br>
><br>
> I attached the log. From what i can see it seems that a intersection<br>
> between the sink pad and the src pad of my element is being made, is this<br>
> the default behaviour ?<br>
<br>
</div>It's only the default behaviour if you set the GST_PAD_FLAG_PROXY_CAPS<br>
flag on the sinkpad, or of course if your query handler on the sinkpad<br>
does that.<br>
<br>
Your debug log suggests that you have the PROXY_CAPS flag set on both<br>
pads.<br></blockquote><div><br></div></div></div><div>Yeah, the docs make it very clear, since the query is being <span>proxied</span> down, when the sink pad has a audio caps it will fail to negotiate, when the caps is ANY (the <span>fakesrc</span>) it will work. </div>
<div><br></div><div>Maybe it would be cool to add a /* <span>TODO</span>: MESSAGE */ on the <span>gst</span>-template to help future developers see that they need to change this if they are writing a <span>plugin</span> like a decode/encoder. </div>
<div><br></div><div>I'm starting to rewrite some <span>plugins</span> from <span>gstreamer</span> 0.10 to 1.0 and i don't remember to have any problems with this proxy caps stuff.</div><div><br></div>
<div>But I'm also a little confused if i should invest on <span>gst</span>-template since the tutorials talk about it and then redirects you to a project on <span>gst</span>-<span>plugins</span>-bad (an element maker).</div>
<div><br></div><div>Thanks for the help Sebastian.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
<div><div><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>
</div></div><br></div><div class="">_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">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></div></blockquote></div><br></div></div>
</blockquote></div><br></div>