I’d like to get EGLImage programatically via Gstreamer pipeline.
I assume that I connect some pipeline as follows.
app->pipeline = gst_pipeline_new (“pipeline”);
app->source = gst_element_factory_make (“filesrc”, “source”);
app->demux = gst_element_factory_make (“qtdemux”, “qtdemux”);
app->parser = gst_element_factory_make (“h264parse”, “parser”);
app->decode = gst_element_factory_make (“omxh264dec”, “decode”);
app->filter = gst_element_factory_make (“capsfilter”, “filter”);
app->csp = gst_element_factory_make (“nvegltransform”, “csp”);
app->sink = gst_element_factory_make (“fakesink”, “sink”);
Is there anything way to get EGLImage with callback and so on ?
And you can get EGLImage by calling the following APIs defined in nvbuf_utils.h
/**
* This method must be used for getting `EGLImage` from `dmabuf-fd`.
*
* @param[in] display `EGLDisplay` object used during the creation of `EGLImage`.
* @param[in] dmabuf_fd `DMABUF FD` of buffer from which `EGLImage` to be created.
*
* @returns `EGLImageKHR` for success, `NULL` for failure
*/
EGLImageKHR NvEGLImageFromFd (EGLDisplay display, int dmabuf_fd);
/**
* This method must be used for destroying `EGLImage` object.
* @param[in] display `EGLDisplay` object used for destroying `EGLImage`.
* @param[in] eglImage `EGLImageKHR` object to be destroyed.
*
* @returns 0 for success, -1 for failure
*/
int NvDestroyEGLImage (EGLDisplay display, EGLImageKHR eglImage);
Thank you for your support.
The test3 sample at that link is useful for me.
I have another question.
I’d like to use a glsl shader as post processing.
Is it possible to combine test3 sample with glsl shader ?
Is there something sample code related to this ?
Hi nsugi,
I don’t have much experience in glsi shader. Other users may share their experience and suggestion.
I could render the decoded frame to window with opengl es.
But I’d like to use opengl, not opengl es.
Is it possible to render the decoded frame with opengl ?
How do I pass the data on nvmm to opengl directly ?
We have the implementation based on X11 and egl. It may not work in pure open gl.
Here is another renderer:
tegra_multimedia_api\argus\samples\utils\PreviewConsumer.cpp
Please check if it helps your case.