Vaapidecode Format and OpenGL

Zelnes mehdi.ghesh at hotmail.fr
Mon Jun 12 13:37:34 UTC 2017


Zelnes wrote
> 
> Arjen Veenhuizen wrote
>> Your code was probably scrubbed from the mailinglist. 
> Yes, it's also what I think. Could I post it here ?
> Arjen Veenhuizen wrote
>> You can run 

>> to get an idea of the caps in use. In code, you could use the
>> notify::caps signal on a GstPad to figure out which caps are in use.
> Thanks, I now have an idea about the format used whith autovideosink. Do
> you know how I can set the caps ? Whenever I try to create a caps :
> GstCaps * caps = gst_caps_new_simple("video/x-raw", "format,
> G_TYPE_STRING, "RGBA", "width", G_TYPE_INT, 1920, "height", G_TYPE_INT,
> 1080, NULL);
> I get a Segfault. I wanted to set this either by linking vaapidecode to
> appsink using this filter, or by setting the caps on the vaapidecode src
> pad.
> Arjen Veenhuizen wrote
>> W.r.t. 
>> GstSample
>> <https://developer.gnome.org/gstreamer/stable/gstreamer-GstSample.html>  
>>  vs 
>> GstBuffer
>> <https://developer.gnome.org/gstreamer/stable/gstreamer-GstBuffer.html>  
>> , you should find everything you need in the linked docs.
> I'm still confused. Let me explain.
> I understand that when appsink has a new frame, it sends "new-sample"
> signal. In the callback used for this signal, I'm able to retrieve this
> sample, but then I don't know what to do with it. As i said, some uses the
> sample as the data to paint, but I'm not sure this is the right to do. I
> know that I can get the buffer from this sample, but I can't find where I
> can then get the pointer to the data, as GstBuffer is a container for
> GStreamer.

I have added glupload between vaapidecode and appsink, but the CPU usage is
increasing up to 60%, so it sounds like it converts YV12 format to RGB on
CPU. Isn't there anyway to use the RGB format provided by vaapidecode as
GstVideoGLTextureUploadMeta directly in order to stay on the GPU and never
copy any frame to CPU ?
And if I follow the idea of using gstvideometa, can someone provide me a
little example on how to set the current frame as a texture for OpenGL ? I
have to say that the documentation about it introduces a lot of new types,
and I'm a bit confused



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


More information about the gstreamer-devel mailing list