RTP & RTCP restream using rtpbin.

stproj smpalasis at gmail.com
Wed Oct 19 12:15:35 UTC 2016


Greetings,

I'm trying to built a streaming application that involves streaming and
restreaming to different machines the same source and daisy chain them.

What i want to do for starters, is to make rtpbin both a receiver and a
transmitter of an rtp stream, and its respective rtcp streams. Below, im
providing the part where I'm trying to link rtpsrc to rtpbin and rtpbin to
rtpsink, but it doesn't work (can't link rtpbin to rtpsink). If u have any
suggestion on how should i move pls share the knowledge!! 

Thank you in advance,
S.



  /* the rtpbin element */
  rtpbin = gst_element_factory_make ("rtpbin", "rtpbin");
  g_assert (rtpbin);
  
  gst_bin_add (GST_BIN (pipeline), rtpbin);
  
  /* now link all to the rtpbin, start by getting an RTP sinkpad for session
0 */
  srcpad = gst_element_get_static_pad (rtpsrc, "src");
  sinkpad = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_0");
  lres = gst_pad_link (srcpad, sinkpad);
  g_assert (lres == GST_PAD_LINK_OK);
  gst_object_unref (srcpad);

  /* get the RTP srcpad that was created when we requested the sinkpad above
and
   * link it to the rtpsink sinkpad*/
  srcpad = gst_element_get_request_pad (rtpbin, "send_rtp_src_0");
  sinkpad = gst_element_get_static_pad (rtpsink, "sink");
  if (gst_pad_link (srcpad,sinkpad) != GST_PAD_LINK_OK)
    g_error ("Failed to link rtpbin to rtpsink");
  gst_object_unref (srcpad);
  gst_object_unref (sinkpad);





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/RTP-RTCP-restream-using-rtpbin-tp4680123.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list