appsink with new-sample gstreamer 1.6

killerrats koreysjunkmail at
Mon Apr 4 22:41:21 UTC 2016

I have written the following to get the appsink from the pipeline to then get
the buffer from the appsink. I was able to successfully make a grab seems
like since no errors. I put the cout in the beginning to see if I got a
signal but the cout in the first line of the function doesn't event show.
It's like there is nothing that i coming in or what. Any Ideas? If need more
code, I can provide.

rtspsrc location=videoURI name=rtspsrc "\
			"! rtph264depay ! h264parse "\
			"! mpegpsmux name=mux ! appsink blocksize=100 sync=false max-buffers=1
name=EOfSinkName rtspsrc. "\
			"! rtpmp4gdepay ! decodebin ! mux.

_videoD.sink =
	g_signal_connect (_videoD.sink, "new-sample",  G_CALLBACK

GstFlowReturn PipelineClass::appsink_ToFile (GstElement* object,VideoData
	std::cout <<
<< std::endl;
	GstSample* sample = NULL;
	GstCaps* caps;
	GstBuffer* buffer;
	GstMapInfo map;

	if(sample != NULL)
		std::cout << "Got
Sample----------------------------------------------------" << std::endl;
		FILE* ufile = file;
	  //GstAppSink* app_sink = (GstAppSink*) object;
	  //GstSample * sample = gst_app_sink_pull_sample(app_sink);
	  buffer = gst_sample_get_buffer(sample);
	  caps = gst_sample_get_caps(sample);

	  if(gst_buffer_map (buffer, &map, GST_MAP_READ))
	  gst_util_dump_mem (, map.size); 
	  gst_buffer_unmap (buffer, &map);
		std::cout << "no sample" << std::endl;

	return GST_FLOW_OK;

View this message in context:
Sent from the GStreamer-devel mailing list archive at

More information about the gstreamer-devel mailing list