splitmuxsink muxing AV data

Thiago Santos thiagoss at osg.samsung.com
Wed Aug 5 08:24:25 PDT 2015


On 08/05/2015 12:12 PM, Ssagarr Patil wrote:
> Hi Thiago,
>
> ------------------------------------------------------------------------
> On 08/05/2015 06:21 AM, Ssagarr Patil wrote:
>
>     Hi,
>
>     I have following pipeline:
>
>       gst_bin_add_many (GST_BIN (pipeline), splitmuxsink, vsrc,
>                         vparse, queue1, asrc, aparse,
>                         queue2, queue3, queue4, NULL);
>
>       gst_element_link_many (vsrc, queue1, vparse, queue3,
>     splitmuxsink, NULL);
>       gst_element_link_many (asrc, queue2, aparse, queue4,
>     splitmuxsink, NULL);
>
>     But it fails with following error:
>
>     (graphics:294): GStreamer-CRITICAL **: Padname video is not unique
>     in element splitmuxsink, not adding
>
>     Any pointers on what is missing ?
>
> 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.
>
> You can work around this by explicitly requesting video and audio pads 
> and linking manually.
>
> 1) get the pad templates for video and audio from splitmuxsink
> should I use  gst_pad_template_new() to get the template ?
Use gst_element_class_get_pad_template (), use G_OBJECT_GET_CLASS() to 
get the class.

>
> 2) gst_element_request_pad on splitmuxsink for video and audio pads
> should I use request_new_pad ?
gst_element_request_pad is what the doc says
>
> 3) Use get the pad of your queue3 and queue4 elements
> 4) use gst_pad_link to link the queues with splitmuxsink pads you have 
> requested.
>
>
> Is there any sample app which does it will be much helpful.
Not really, I have a python example that uses it here: 
https://github.com/thiagoss/splitencoder/blob/master/splitter.py#L77

If you can translate that piece to C it should help.
>
> Thanks,
> Sagar
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


-- 
Thiago Sousa Santos
Senior Multimedia Engineer, Open Source Group
Samsung Research America - Silicon Valley

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150805/492d311f/attachment.html>


More information about the gstreamer-devel mailing list