[gst-devel] glupload, glimagesink openGL question

Julien Isorce julien.isorce at gmail.com
Wed Aug 26 18:36:52 CEST 2009


Hello Miquel,

First, the fact to be able to use the texture from gstgl and use them into
your own opengl scene (through your favorite GL framework: clutter, SDL, Qt
etc..) is possible (see cluttershare example), interesting and a need for a
lot of people.

Actually, I was waitting for someone that uses SDL. I would like to have an
example like (cluttershare.c example that uses the framework clutter) but I
want one example with SDL.
So this is you [?]

We will try to make it works

2009/8/26 Miquel Àngel Farré <miquel.farre at gmail.com>

> Julien,
>
> I am managing my openGL scene under linux, using SDL.
>
> I have tryed xoverlay: glimagesink sending video to my openGL context
> through his windowID.
>
> I was able to see the video on my openGL context screen, the problem is
> flickering, in my application I am doing something like:

Flickering is often due to background redraw.
You have to desactivate it trough SDL API.

>
>
> while(true)
> {
>
>   glClear();
>   for (all textures)
>   {
>     draw();
>   }
>   glSwapBuffers();
>  }
>
>  Another (secundary) problem is that sometimes I need the video in a little
> quad instead of fullscreen..
>

In this case you have to do the same thing as cluttershare example, but
using SDL.


>
> What do you think is the best way to implement it?
>
>
> Thanks,
>
>
> Miquel
>
>
> 2009/8/26 Julien Isorce <julien.isorce at gmail.com>
>
>>
>>
>> 2009/8/26 Miquel Àngel Farré <miquel.farre at gmail.com>
>>
>>> Bug is submitted!
>>>
>>> Putting the bug apart, if I do something like mpegtsdemux ! queue !
>>> glupload ! appsink, what I have at the output are opengl textures right? So
>>> I can draw it directly into a quad ?
>>
>>
>> This is not exact.
>>
>> If you are making an OpenGL scene, and you want to put gstgl textures into
>> this scene.
>> (then it means that you are managing your opengl context and your are also
>> familiar with OpenGL API)
>> Then gst-plugins-gl/tests/examples/clutter/cluttershare.c is the example
>> you need.
>> (But it's not so easy. you have to share your OpenGL context with the one
>> inside gl elements)
>>
>> If you are not familiar with opengl and you just want to display the video
>> on a quad, then you should consider to look into
>> gst-plugins-gl/tests/examples/generic/cube and
>> gst-plugins-gl/tests/examples/qt/qglwidgetxoverlay
>>
>>
>>>
>>> The bigger reason of use glupload is avoid the raw-yuv to rgb
>>> conversion..
>>
>>
>> So if your are not managing your own opengl scene, then just look into
>> gst-plugins-gl/tests/examples/gtk/gtkxoverlay
>> This example shows how to use the xoverlay interface.
>>
>>
>> Just a question in case your are familiar with OpenGL and if you are
>> already managing your own OpenGL scene,  which framework are you using ? on
>> which OS ?
>>
>> Regards
>> Julien
>>
>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>> Miquel
>>>
>>> 2009/8/26 Julien Isorce <julien.isorce at gmail.com>
>>>
>>>>
>>>>
>>>> 2009/8/26 Florent <fthiery at gmail.com>
>>>>
>>>>> Hi
>>>>>
>>>>> >  * Question: what glupload ! glimagesink do?
>>>>>
>>>>> glimagesink uses glupload internally, so you don't need it for using
>>>>> glimagesink. You need glupload only if you want to filter the frames
>>>>> using opengl (ex: glupload ! gleffects effect=2 ! glimagesink)
>>>>>
>>>>> Florent
>>>>>
>>>>>
>>>>
>>>>>  Doesen't work:
>>>>>
>>>>>    gst-launch -v -m filesrc location=../dumps/itv.ts !  mpegtsdemux
>>>>> program-number="8442" ! queue ! mpeg2dec ! glupload ! glimagesink
>>>>>
>>>>>    gst-launch -v -m filesrc location=../dumps/itv.ts !  mpegtsdemux
>>>>> program-number="8442" ! queue ! mpeg2dec ! glupload ! gldownload !
>>>>> glimagesink
>>>>>
>>>>>  * Question: what glupload ! glimagesink do?
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>>
>>>>>  Miquel
>>>>
>>>>
>>>> Hi,
>>>>
>>>> Both should work,
>>>> Please file a bug and attach the console log of:
>>>>
>>>> GST_DEBUG=gldisplay:3 gst-launch -v -m filesrc location=../dumps/itv.ts
>>>> !  mpegtsdemux program-number="8442" ! queue ! mpeg2dec ! glupload !
>>>> glimagesink
>>>>
>>>> and:
>>>>
>>>> GST_DEBUG=gldisplay:3 videotestsrc ! "video/x-raw-yuv,
>>>> format=(fourcc)I420" ! glupload ! glimagesink
>>>>
>>>> Julien
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>>>> 30-Day
>>>> trial. Simplify your report design, integration and deployment - and
>>>> focus on
>>>> what you do best, core application coding. Discover what's new with
>>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>>> _______________________________________________
>>>> gstreamer-devel mailing list
>>>> gstreamer-devel at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>>>
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>>> 30-Day
>>> trial. Simplify your report design, integration and deployment - and
>>> focus on
>>> what you do best, core application coding. Discover what's new with
>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and focus
>> on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090826/60bf01f2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 569 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090826/60bf01f2/attachment.png>


More information about the gstreamer-devel mailing list