[gst-devel] glupload, glimagesink openGL question

Julien Isorce julien.isorce at gmail.com
Mon Aug 31 13:42:25 CEST 2009


Hi,

As I told you I am not surprised.
Send me your code I think I know where is the problem but hard to explain.
Julien


2009/8/*26* Julien Isorce <julien.isorce at gmail.com>

> Hi Miquel,
>
> I think your use case is a little bit more complex because you was talking
> about threads,
> maybe because of sdl main loop and glib main loop.
> So if you succeed then I would like to put your example in gst gl git.
>
> Regards
> Julien



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

> Good Morning Julien,
>
> Definitely it seems that the problem is on my code, I have modified a bit
> your example, specifically the pipeline:
>
>  GST_PIPELINE (gst_parse_launch
>     ("filesrc location =../../gstreamer/dumps/bbc.ts ! mpegtsparse !
> mpegtsdemux program-number=4229 ! queue ! mpeg2dec ! videoscale !
> video/x-raw-yuv,pixel-aspect-ratio=1/1 ! glupload ! fakesink sync=true",
> NULL));
>
> This is what I do on my test application and doesen't work (it seems sthat
> there is no sync.. nevertheless on your test example works fine)
>
> Biggest difference between my code and your example is that I have a thread
> with a bucle and a drawglscene() function inside (very similar to yours).
>
> Parameters to drawglscene are texture, width and height which I actualize
> through update_sdl_scene...
>
> I don't know if this could cause the async playing... nevertheless I wanted
> to share with you this difference between your code and mine..
>









>
>
> 2009/8/26 Julien Isorce <julien.isorce at gmail.com>
>
>> 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/20090831/da07550f/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/20090831/da07550f/attachment.png>


More information about the gstreamer-devel mailing list