[gst-devel] Sending with rtpbin

Aaron Lindsey aaron at 8bh.com
Wed Feb 6 23:04:31 CET 2008


>> GstElement *source = gst_element_factory_make( "videotestsrc", "source"
>> );
>> GstElement *encode = gst_element_factory_make( "ffenc_mpeg4", "encode"
>> );
>> GstElement *pay = gst_element_factory_make( "rtpmp4vpay", "pay" );
>>
>> GstElement *rtpbin = gst_element_factory_make( "rtpbin", "rtpbin" );
>> g_object_set( G_OBJECT( rtpbin ), "localport", 9002, NULL );
>> g_object_set( G_OBJECT( rtpbin ), "destinations", "127.0.0.1:9000",
>> NULL);
>> g_object_set( G_OBJECT( rtpbin ), "default-pt", 96, NULL );
>>
>> pipeline = gst_pipeline_new( "Mp4RtpSenderPipeline" );
>> gst_bin_add_many( GST_BIN( pipeline ), source, encode, pay, rtpbin, NULL
>> );
>>
>> if( !gst_element_link_many( source, encode, pay, rtpbin, NULL ) ) {
>>     g_warning( "Failed to link elements" );
>> }

I just thought of another followup question.  Adding in send-config does
seemingly work, but I'm not specifying the clock rate anywhere here.  The
receiving side has the payload type 96 mapped to a clock rate of 90000. 
Nothing has jumped out at me as the obvious way to specify the clock rate
on the sending side, which I assume is necessary.  If anyone can shed some
light on this issue it would be greatly appreciated.

Aaron




More information about the gstreamer-devel mailing list