How get rtcp packet using gstrtcpbuffer.h?

Jek_point lazarev at tcobdd.ru
Fri May 6 17:39:22 UTC 2016


im try this code

static gboolean cb_print_position(GstElement *pipeline)
{
	gint64 pos, len;
	gint64 time;
	guint8 pay;
	bool status;  
	GstBuffer *buf;
	GstRTCPBuffer *rtcp;
	GstRTCPPacket *rtcppacket;
	
	if (gst_element_query_position(pipeline, GST_FORMAT_TIME, &pos) &&
gst_element_query_duration(pipeline, GST_FORMAT_TIME, &len)) 
	{																										   
		g_print("Time: %" GST_TIME_FORMAT " / %" GST_TIME_FORMAT  "\r",
GST_TIME_ARGS(pos), GST_TIME_ARGS(len));			
	}

	buf = gst_rtcp_buffer_new_copy_data(pipeline, 500);
	gst_rtcp_buffer_map(buf, GstMapFlags::GST_MAP_FLAG_LAST, rtcp);	
	return TRUE;
}
but return 

** (rtsp:19117): CRITICAL **: gst_rtcp_buffer_map: assertion 'rtcp->buffer
== NULL' failed
Time: 0:00:14.135300363 / 99:99:99.999999999

gst_bin_add_many(GST_BIN(data.pipeline), data.source, data.queue,
data.rtpbin, data.depayer, data.muxer, data.sink, NULL);
like all I have, but the buffer is empty ....




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-get-rtcp-packet-using-gstrtcpbuffer-h-tp4677384p4677391.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list