[gst-devel] How to specify type of sink or src pad in gstrtpbin
Thomas Winkler
wi-tom at gmx.de
Wed Jun 25 18:21:22 CEST 2008
Hi,
is there any way to specify the type of the sink or src pad in gstrtpbin?
I'm trying to specify the rtp and rtcp pads while linking.
My code below:
gst_init(0, 0);
GMainLoop* m_mainLoop = g_main_loop_new(NULL,FALSE);
GstElement* m_bin = gst_pipeline_new("pipe");
GstElement* m_gstrtpbin = gst_element_factory_make("gstrtpbin", "rtpbin");
GstElement* m_video_pipe = createVideoPipe();
// the createVideoPipe()-method creates a separate pipeline
[videosource]->[capsfilter]->[ffmpegcolorspace]->[videoencoder]->[videopaylo
ader]
// adds and link all elements to the pipeline and returns the created
pipeline
gst_bin_add(GST_BIN(m_gstrtpbin), m_video_pipe);
// here I add the created video-pipeline to my gstrtpbin
GstElement* m_udp_rtp_sink = createUdpRtpSink();
// the createUdpRtpSink()-method creates a pipeline within a
UdpSink-Element, adds + link all elements and returns the pipe
GstElement* m_udp_rtcp_sink = createUdpRtcpSink();
// the createUdpRtcpSink()-method creates a pipeline within a
UdpSink-Element, adds + link all elements and returns the pipe
GstElement* m_udp_rtcp_src = createUdpRtcpSrc();
// the createUdpRtcpSrc()-method creates a pipeline within a
UdpSrc-Element, adds + link all elements and returns the pipe
// finally I add the the 3 Upd-Elements to my gstrtpbin
gst_bin_add(GST_BIN(m_gstrtpbin), m_udp_rtp_sink);
gst_bin_add(GST_BIN(m_gstrtpbin), m_udp_rtcp_sink);
gst_bin_add(GST_BIN(m_gstrtpbin), m_udp_rtcp_src);
// now comes my problem with linking the pipes to the gstrtpbin sinks and
pads
// if I try following the links does not work:
gst_element_link_pads(m_udp_rtp_sink, "src", m_gstrtpbin,
"send_rtp_src_%d");
// the problem is that gstrtpbin has no "send_rtp_src_%d" pad.
My Question is how to specify the type and number of the sink or src pads in
gstrtpbin.
I will exclusive specify, that my payloader should connect the
"send_rtp_sink_0" and the UdpSink for this should connect to
"send_rtp_src_0".
Also my RtcpSender UdpSink should connect to "send_rtcp_src_0" and the
RtcpReceiver UdpSrc should connect to "send_rtcp_sink_0"
Is there a way to specify this?
Greetings,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20080625/3cd8f7c1/attachment.htm>
More information about the gstreamer-devel
mailing list