Linking Pad Templates with rtpbin

Moiz moiz at
Fri Nov 6 22:23:30 UTC 2020

I am trying to build my pipeline using the python gst bindings for an h264
stream over rtp,I am trying to figure out how I can link the pad templates
such as rtpbin.send_rtp_sink etc

If I use the command line pipeline I have something like this

rtpbin name=rtpbin profile=avf dxgiscreencapsrc ....... !
rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 !

I believe I had the correct syntax for creating my rtpbin and pad templates,
however I am not sure how to link them correctly.

I am creating my rtpbin simply using Gst.ElementFactory.make('rtpbin'), then
setting properties

When I get to creating the pad templates

I am doing the following

name_template = 'send_rtp_sink_0'
pad_direction = 2
pad_presence = 0
caps = Gst.Caps.from_string('')
rtpbin_template =,pad_direction,pad_presence,caps)
# print(rtpbin_template)

How do I make sure that this pad template is added to the correct position?

Also how can I make sure the rtpbin is in the correct position? I am simply
doing pipeline.add(rtpbin) , then however I
don't know if this works

Sent from:

More information about the gstreamer-devel mailing list