How to consume VAAPI VASurface in appsink

ShilVin vinodkesti at yahoo.com
Thu Aug 9 04:30:02 UTC 2018


buffer data can type casted to VASurface.
static void appSinkNewSample(GstElement *psAppSink, gpointer pvUserData) {
	 GstMapInfo sInfo;
	 
         //Pull the sample 
         GstSample *psSample = gst_app_sink_pull_sample
(GST_APP_SINK(psAppSink));
	 GstBuffer *psBuffer = gst_sample_get_buffer (psSample);
	 gst_buffer_map (psBuffer, &sInfo, GST_MAP_READ);
	 
         // You can safely type cast sInfo->data to VASurface.

         gst_buffer_unmap (psBuffer, &sInfo);
	 gst_buffer_unref (psBuffer);
	 return;
}



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list