<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>This should help shed some light</div><div><br></div><div><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-pads.html#section-pads-request">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-pads.html#section-pads-request</a><br><br>Cheers </div><div><br>Sent from my Phone</div><div><br>On 05 Aug 2015, at 17:24, Thiago Santos <<a href="mailto:thiagoss@osg.samsung.com">thiagoss@osg.samsung.com</a>> wrote:<br><br></div><blockquote type="cite"><div>
  
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  
  
    <div class="moz-cite-prefix">On 08/05/2015 12:12 PM, Ssagarr Patil
      wrote:<br>
    </div>
    <blockquote cite="mid:BAY176-W13B92F31BC662C1F564F04D3750@phx.gbl" type="cite">
      <style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
      <div dir="ltr">Hi Thiago,<br>
        <br>
        <div>
          <hr id="stopSpelling">On 08/05/2015 06:21 AM, Ssagarr Patil
          wrote:<br>
          <blockquote cite="mid:BAY176-W3373B2307826E66CF86E7ED3750@phx.gbl">
            <style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

--></style>
            <div dir="ltr">Hi,<br>
              <br>
              I have following pipeline:<br>
              <br>
                gst_bin_add_many (GST_BIN (pipeline), splitmuxsink,
              vsrc,<br>
                                  vparse, queue1, asrc, aparse,<br>
                                  queue2, queue3, queue4, NULL);<br>
              <br>
                gst_element_link_many (vsrc, queue1, vparse, queue3,
              splitmuxsink, NULL);<br>
                gst_element_link_many (asrc, queue2, aparse, queue4,
              splitmuxsink, NULL);<br>
              <br>
              But it fails with following error:<br>
              <br>
              (graphics:294): GStreamer-CRITICAL **: Padname video is
              not unique in element splitmuxsink, not adding<br>
              <br>
              Any pointers on what is missing ?<br>
            </div>
          </blockquote>
          This is because of the way link_many will work. It will
          request a pad from splitmuxsink without much information on
          the type of the pad so you are trying to create a video pad
          twice and splitmuxsink will reject it.<br>
          <br>
          You can work around this by explicitly requesting video and
          audio pads and linking manually.<br>
          <br>
          1) get the pad templates for video and audio from splitmuxsink<br>
          should I use  gst_pad_template_new() to get the template ?<br>
        </div>
      </div>
    </blockquote>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    Use gst_element_class_get_pad_template (), use G_OBJECT_GET_CLASS()
    to get the class.<br>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <br>
    <blockquote cite="mid:BAY176-W13B92F31BC662C1F564F04D3750@phx.gbl" type="cite">
      <div dir="ltr">
        <div><br>
          2) gst_element_request_pad on splitmuxsink for video and audio
          pads<br>
          should I use request_new_pad ?<br>
        </div>
      </div>
    </blockquote>
    gst_element_request_pad is what the doc says<br>
    <blockquote cite="mid:BAY176-W13B92F31BC662C1F564F04D3750@phx.gbl" type="cite">
      <div dir="ltr">
        <div><br>
          3) Use get the pad of your queue3 and queue4 elements<br>
          4) use gst_pad_link to link the queues with splitmuxsink pads
          you have requested.<br>
          <br>
          <br>
          Is there any sample app which does it will be much helpful.<br>
        </div>
      </div>
    </blockquote>
    Not really, I have a python example that uses it here:
    <a class="moz-txt-link-freetext" href="https://github.com/thiagoss/splitencoder/blob/master/splitter.py#L77">https://github.com/thiagoss/splitencoder/blob/master/splitter.py#L77</a><br>
    <br>
    If you can translate that piece to C it should help.<br>
    <blockquote cite="mid:BAY176-W13B92F31BC662C1F564F04D3750@phx.gbl" type="cite">
      <div dir="ltr">
        <div><br>
          Thanks,<br>
          Sagar<br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Thiago Sousa Santos
Senior Multimedia Engineer, Open Source Group
Samsung Research America - Silicon Valley</pre>
  

</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>gstreamer-devel mailing list</span><br><span><a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a></span><br><span><a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></span><br></div></blockquote></body></html>