dynamic videomixing

Bernhard Graaf bernhard.graaf at gmx.de
Sat Dec 13 07:17:39 PST 2014


Hi,

 

I have a well running pipeline (coded in C) like this:

 

tcpclientsrc ! queue2 ! decodebin name=dec !  // <- Sourcepart

queue ! videoconvert ! deinterlace ! xvimagesink !  // <- Videopart

.dec queue ! audioconvert ! audioresample ! pulsesink // <- Audiopart

 

What I try to do is, to put a videomixer between the videopart (e.g. after
videoconvert) to generate a second dynamic videopart for picture in picture
function.

But if I try to do that, a get a 'link failed'. The regarding code snipes
are:

 

------

gst_bin_add_many (GST_BIN (tv_pipe), tv_source, tv_queue2, tv_dec,
tv_v_queue, tv_v_conv, tv_v_mixer, tv_v_deint, tv_v_sink, tv_a_queue,
tv_a_conv, tv_a_res, tv_a_sink, NULL);

 

if(!gst_element_link_many (tv_source, tv_queue2, tv_dec, NULL)) printf("Link
1 fail\n");

if(!gst_element_link_many (tv_v_queue, tv_v_conv, NULL)) printf("Link 2
fail\n");

if(!gst_element_link_many (tv_v_mixer, tv_v_deint, tv_v_sink, NULL))
printf("Link 3 fail\n");

if(!gst_element_link_many (tv_a_queue, tv_a_conv, tv_a_res, tv_a_sink,
NULL)) printf("Link 4 fail\n");

 

pad1 = gst_element_get_request_pad (tv_v_mixer, "sink_%u");

pad2 = gst_element_get_static_pad (tv_v_conv, "src");

gst_pad_link (pad2,pad1);

if (!GST_PAD_IS_LINKED (pad1)) printf("conv/mixer link failed!\n");

 

g_signal_connect (tv_dec, "pad-added", G_CALLBACK (tv_mux_pad_added),
tv_v_queue);

--------

All Links are without any failure. 

 

But If I try to link the link the decoder pad to the tv_v_queue in the
regarding function:

 

<snipe>

if(strncmp("v",caps_string,1) == 0) 

{

  printf("Video Pad found\n");

  if (!GST_PAD_IS_LINKED (pad))

  {

    sinkpad = gst_element_get_static_pad (tv_v_queue, "sink");

    g_print ("Dynamic pad created, linking TS-Demuxer/Video-Queue\n");

    gst_pad_link (pad, sinkpad); 

    if (!GST_PAD_IS_LINKED (pad)) printf("link failed!\n");

    gst_object_unref (sinkpad);

 

} 

 

I get a link failed.

 

Without the videomixer, the pipeline runs well.

 

My questions are:

-          Is it possible to have only one sink in use for the videomixer,
or should I have two in minimum?

-          If yes, is there something I have forgot?

 

Thanks a lot for helping. I try to run this change for a long time, but
without any luck!

 

Bernhard

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20141213/739db5bb/attachment.html>


More information about the gstreamer-devel mailing list