How to pull meta:GstVideoGLTextureUploadMeta buffer in system memory?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to pull meta:GstVideoGLTextureUploadMeta buffer in system memory?

jeyp4
This post was updated on .

gst-launch-1.0 -v v4l2src device=/dev/video0 ! image/jpeg,format=I420 ! jpegdec ! vaapih265enc ! vaapidecode ! 'video/x-raw(meta:GstVideoGLTextureUploadMeta), format=BGRA' ! fakesink

Above pipeline works fine.

Can I replace fakesink with appsink to extract BGRA buffer data in system memory?

Currently my appsink callback looks like:

static GstFlowReturn onNewBuffer (GstAppSink *appsink, gpointer userdata)
{

    GstMapInfo map;
    GstSample *sample;
    g_signal_emit_by_name(appsink, "pull-sample", &sample);
    if (sample){
        GstBuffer *buffer = gst_sample_get_buffer(sample);
        gst_buffer_map(buffer, &map, GST_MAP_READ);

        // Do Something //

        gst_buffer_unmap(buffer, &map);
        gst_sample_unref(sample);
        return GST_FLOW_OK;
    }
    return GST_FLOW_ERROR;
}



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel