videotee linking to muxer queue Q

mattes effemm at mykmk.com
Thu Jun 5 21:48:44 PDT 2014


Try to link a capture queue via a videotee to streamer and  muxer queue.
But having some trouble get the correct sink pad from the muxer queue.

It actually fails because it can't negotiate the caps. the video tee
src pad carries video caps but for some reason the muxer queue sink shows audio
caps.

How do I get the correct video sink from the muxer queue?

here my example:

-----
   // linkup pipeline
   gst_element_link_many( sourcvE, capsvE, vrateE, encodervE, identvE,
videotee, NULL );
   gst_element_link_many( squeuvE, rtmpvE, udpvE, NULL );
   gst_element_link_many( mqueuE, identmE, muxerE, sinkE, NULL );
   
   GstPadTemplate *tee_src_pad_template;
   GstPad *tee_q1_pad, *tee_q2_pad;
   GstPad *qS_pad, *qM_pad;

   tee_src_pad_template = gst_element_class_get_pad_template
(GST_ELEMENT_GET_CLASS (videotee), "src%d"))) {
   tee_q1_pad = gst_element_request_pad( videotee, tee_src_pad_template, NULL,
NULL );
   qS_pad = gst_element_get_static_pad( squeuvE, "sink" );
   gst_pad_link (tee_q1_pad, qS_pad) != GST_PAD_LINK_OK ){

   tee_q2_pad = gst_element_request_pad( videotee, tee_src_pad_template, NULL,
NULL );
   qM_pad = gst_element_get_static_pad( mqueuE, "sink" );
   if (gst_pad_link (tee_q2_pad, qM_pad) != GST_PAD_LINK_OK) {
      g_critical ("Tee for q2 could not be linked.\n");   /* it fails here */
      gst_object_unref (pipeline);
      return 0;
   }
--------

I already did the exact same thing successfully for audio streaming
and it works fine there.

I stepped thru the video example with GST_DEBUG=5 and it complains about caps
mismatch. I think it just get the wrong sink (audio instead video) and that's
why it fails.

Any suggestions what I am doing wrong?

Mat




More information about the gstreamer-devel mailing list