Vaapidecode Format and OpenGL

Zelnes mehdi.ghesh at hotmail.fr
Mon Jul 3 14:08:04 UTC 2017


Victor Jaquez wrote
> On 06/19/17 at 01:23am, Zelnes wrote:
>> Now I am able to create GstCaps, it's okay, but I can't set it between
>> vaapidecodebin and appsink, or I could not link them.
>> 
>> Do you have a piece of code showing how to draw a frame on GPU with
>> OpenGL,
>> with a frame coming directly from GPU (with vaapidecodebin) and which did
>> not go to the CPU ? 
>> I have found so many different ways, none of them worked, may be because
>> they are out of date. I just want an access to the GPU data, in order to
>> process it with OpenGL and the draw it on screen with SDL and OpenGL
>> (textures).
>> 
>> I know it is possible, but I can't figure out why my attempts all fails.
> 
> These examples might help you
> 
> https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/tests/examples/gl/sdl
> 
> vmjl
> _______________________________________________
> gstreamer-devel mailing list

> gstreamer-devel at .freedesktop

> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

Hi,

Thanks for your examples, I had already seen them but this time I tried
myself step by step.
I have a working window, in which I displayed a red texture created with
OpenGL.

I built my pipeline step by step, to be sure that it works, and I think it
is correct.
To make it work, I create an empty new pipeline, to which I add my real
pipeline, held in a 'GstElement* /content/' (otherwise it didn't work).
Now, I encounter two issues :
    - If I unref /content/, I got "Trying to dispose object 'pipeline0', but
it still has a parent 'gstreamer_pipeline'" and the program runs but does
nothing
    - If I do not unref /content/, the program segfaults.

What I've seen is that in both cases, my sync_bus_callback() function is
called for STATE_CHANGED messages, but it asks for context only in the
second situation (3 times : gst.vaapi.Display, then gst.gl.GLDisplay and
then gst.gl.app_context).
Is that normal that it calls three times for the context ?

In the first case, it runs but nothing happens. My new_sample_callback() is
never called.

You can find the code source here : https://codeshare.io/2WeLNE 



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Vaapidecode-Format-and-OpenGL-tp4683302p4683657.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list