getting closer?

parent e9717529
......@@ -30,11 +30,10 @@ pad_added_cb (GstElement *rtpbin, GstPad *srcpad, GstElement *depayloader)
{
GstPad *sinkpad;
sinkpad = gst_element_get_static_pad (depayloader, "src");
sinkpad = gst_element_get_static_pad (depayloader, "sink");
if (!gst_pad_link (srcpad, sinkpad))
g_error ("Failed to link rtpbin to depayloader");
gst_object_unref (srcpad);
gst_object_unref (sinkpad);
}
......@@ -105,20 +104,20 @@ main (int argc, char **argv)
gst_object_unref (sinkpad);
srcpad = gst_element_get_static_pad (data.rtcp_src, "src");
sinkpad = gst_element_get_static_pad (data.rtpbin, "recv_rtcp_sink_0");
sinkpad = gst_element_get_request_pad (data.rtpbin, "recv_rtcp_sink_0");
if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK)
g_error ("Failed to link rtcpsrc to rtpbin");
gst_object_unref (srcpad);
gst_object_unref (sinkpad);
srcpad = gst_element_get_static_pad (data.rtpbin, "recv_rtcp_src_0");
srcpad = gst_element_get_request_pad (data.rtpbin, "send_rtcp_src_0");
sinkpad = gst_element_get_static_pad (data.rtcp_sink, "sink");
if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK)
g_error ("Failed to link rtpbin to rtcpsink");
gst_object_unref (srcpad);
gst_object_unref (sinkpad);
/* need to link RTP pad to the payloader */
/* need to link RTP pad to the depayloader */
g_signal_connect (data.rtpbin, "pad-added", G_CALLBACK (pad_added_cb), data.depayloader);
/* start the pipeline */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment