a not working 'tee' pipeline

ibrahim suliman iss_kh at yahoo.com
Fri Nov 11 07:06:18 PST 2011


Hello,

I've got this pipeline working as required:
gst-launch v4l2src ! video/x-raw-yuv,width=352,height=288,framerate=15/1 ! ffmpegcolorspace ! tee name=t ! queue ! ffenc_flv  ! udpsink host=127.0.0.1 port=8991 t. ! queue ! ffenc_mpeg4 ! udpsink host=127.0.0.1 port=8999

But when I implemented it in a c code I did not work and I got this error:

Error: Internal data flow error.

This is the relevant part

    gst_bin_add_many (GST_BIN (bin_1), source, vrate, filter, conv, tee , queue_1 , queue_2, NULL);
    gst_bin_add_many (GST_BIN (bin_2), flv_encoder, sink_1 , NULL);
    gst_bin_add_many (GST_BIN (bin_3), mpeg_encoder, sink_2 , NULL);

 /* add ghost pads */
   gpad_1 = gst_element_get_static_pad (queue_1, "src");
   gst_element_add_pad (bin_1, gst_ghost_pad_new ("src_1", gpad_1));
   gst_object_unref (GST_OBJECT (gpad_1));

   gpad_2 = gst_element_get_static_pad (queue_2, "src");
   gst_element_add_pad (bin_1, gst_ghost_pad_new ("src_2", gpad_2));
   gst_object_unref (GST_OBJECT (gpad_2));

   gpad_3 = gst_element_get_static_pad (flv_encoder, "sink");
   gst_element_add_pad (bin_2, gst_ghost_pad_new ("sink_1", gpad_3));
   gst_object_unref (GST_OBJECT (gpad_3));

   gpad_4 = gst_element_get_static_pad (mpeg_encoder, "sink");
   gst_element_add_pad (bin_3, gst_ghost_pad_new ("sink_2", gpad_4));
   gst_object_unref (GST_OBJECT (gpad_4));

         
      /* add the bins to the pipeline */
      gst_bin_add (GST_BIN (pipeline), bin_1);
      gst_bin_add (GST_BIN (pipeline), bin_2);
      gst_bin_add (GST_BIN (pipeline), bin_3);

      /* link the elements */
      gst_element_link_many (source, vrate, filter, conv, tee, queue_1 , NULL);
      gst_element_link (tee, queue_2 );
      gst_element_link (bin_1, bin_2 );
      gst_element_link (bin_1, bin_3 );
         
   /* Set the pipeline to "playing" state*/
   g_print ("Now playing: \n");
   gst_element_set_state (pipeline, GST_STATE_PLAYING);


any suggestion will be appreciated.....



Thank you

Ibra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20111111/1bdf1336/attachment.htm>


More information about the gstreamer-devel mailing list