appsink's buffer to appsrc

Dudi.r dudi017 at gmail.com
Thu Apr 24 07:32:14 PDT 2014


Hi fellows,

I have question about appsrc and appsink.

I am trying to push the appsink's buffer to the appsrc and it seems like
nothing happen. I can't figure it out why.


pipeline A:
appsrc1 ! rtph264depay ! h264parse ! appsink

pipeline B:
appsrc2 ! avdec_h264 ! autovideosink


this is the callback of appsink:


static GstFlowReturn new_sample(GstElement *sink, gst_app_t *data)
{	
	g_print("new sample\n");
	GstSample *sample = gst_app_sink_pull_sample(GST_APP_SINK(sink));

	if (sample != NULL)
	{
		GstBuffer *buffer = gst_sample_get_buffer(sample);		
		GstMapInfo map;

		if (buffer != NULL) 
		{
			GstFlowReturn ret;
                        gst_buffer_map(buffer, &map, GST_MAP_READ);	
	
			ret= gst_app_src_push_buffer(data->src2, buffer);			
		}
	}

	return GST_FLOW_OK;
}



when I look at the memory (with visual studio) on map.data, I can see the
data that suppose to be transferred to appsrc2- so now I know that the
appsink part is o.k.

the "ret" variable returns GST_FLOW_OK, so it pushes "something" properly.

is it possible to push the same buffer of the appsink straight away to
appsink as I did?

I also use:
gst_debug_set_threshold_from_string("avdec_h264*:6", TRUE);
gst_debug_set_threshold_from_string("autovideosink*:6", TRUE);

but no single message is thrown out by avdec_h264 or autovideosink.



I will be happy for some help.

thanks, 
Dudi.




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/appsink-s-buffer-to-appsrc-tp4666602.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list