Hi,
I would like to obtain video from a stream and send it to my openGL based application, and draw the frames there. My idea is use glupload to obtain openGL textures and then load these into the application through appsink. * Question: there is a better way to pass the textures to my app instead of appsink ? I have been trying some pipes before start coding: This one works correctly: gst-launch -v -m filesrc location=../dumps/itv.ts ! mpegtsdemux program-number="8442" ! queue ! mpeg2dec ! glimagesink 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 ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi
> I would like to obtain video from a stream and send it to my openGL based > application, and draw the frames there. > My idea is use glupload to obtain openGL textures and then load these into > the application through appsink. You won't need any gl-based stuff if you use appsink, because it will pass raw buffers in memory. > * Question: there is a better way to pass the textures to my app instead of > appsink ? You can, however share the openGL context between glimagesink and your application so that you don't need to upload frames manually. See tests/examples/clutter/cluttershare as example. > * 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 ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
2009/8/26 Florent <[hidden email]>
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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
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 ? The bigger reason of use glupload is avoid the raw-yuv to rgb conversion.. Thanks, Miquel 2009/8/26 Julien Isorce <[hidden email]>
------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
2009/8/26 Miquel Àngel Farré <[hidden email]> Bug is submitted! 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
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
------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
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: 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.. What do you think is the best way to implement it? Thanks, Miquel 2009/8/26 Julien Isorce <[hidden email]>
------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Miquel Àngel Farré
------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Florent THIERY-2
Hi,
Florent wrote: >> I would like to obtain video from a stream and send it to my openGL based >> application, and draw the frames there. >> Would your application be in the same process as your gstreamer pipeline? If not, you won't be able to share gl contexts if you're using direct rendering. From http://www.opengl.org/sdk/docs/man/xhtml/glXCreateNewContext.xml: .... direct-rendering contexts cannot be shared outside a single process, and they may be unable to render to GLX pixmaps. If you don't want it in the same process, you could use appsink, pass the buffers to some shared memory and in your GL process upload these buffers to GL textures. Sorry if this is an aside, I've been working on something similar so I thought I would pass the information along. Best, Tristan >> My idea is use glupload to obtain openGL textures and then load these into >> the application through appsink. >> > > You won't need any gl-based stuff if you use appsink, because it will > pass raw buffers in memory. > > >> * Question: there is a better way to pass the textures to my app instead of >> appsink ? >> > > You can, however share the openGL context between glimagesink and your > application so that you don't need to upload frames manually. See > tests/examples/clutter/cluttershare as example. > > >> * 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 > > ------------------------------------------------------------------------------ > 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 > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > > -- Tristan Matthews Société des arts technologiques [SAT] email: [hidden email] web: http://www.music.mcgill.ca/~tmatthews ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Miquel Àngel Farré
2009/8/26 Miquel Àngel Farré <[hidden email]>:
> I would like to obtain video from a stream and send it to my openGL based > application, and draw the frames there. Seven messages into this thread, and it still seems to be resisting getting the message through to Miquel. Miquel, some image sinks will *display* your images/video for you. Some sinks will *not* display anything. glupload is an image sink that will only update the contents of an OpenGL texture, and it will *not* display *anything*. Displaying the image/video sent to an OpenGL texture by glupload is your prerogative and your responsibility. -- http://codebad.com/ ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Thanks Donny
2009/8/26 Donny Viszneki <[hidden email]> 2009/8/26 Miquel Àngel Farré <[hidden email]>: ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Tristan Matthews-2
Hi Tristan,
It is not in the same thread, so I will use the appsink as you said. The problem is that I want to draw the ouput of mpeg2dec, it is yuv-raw, I wonder if it is possible to convert it to rgb to make it easier generate a texture. Thanks for your contribution, Miquel 2009/8/26 Tristan Matthews <[hidden email]> Hi, ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Miquel Àngel Farré
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é <[hidden email]> Julien, Flickering is often due to background redraw. You have to desactivate it trough SDL API.
In this case you have to do the same thing as cluttershare example, but using SDL.
------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Miquel Àngel Farré
2009/8/26 Miquel Àngel Farré <[hidden email]> Hi Tristan, But this is the same process right ?
------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Yes, the same process
2009/8/26 Julien Isorce <[hidden email]>
------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
It's it's in separate threads but still in the same process than you're
probably better off just sharing the opengl context (i.e. not using appsink) as per the cluttershare example. I just wanted to mention the alternative in case you were using separate processes. Sorry for the confusion. -Tristan Miquel Àngel Farré wrote: > Yes, the same process > > 2009/8/26 Julien Isorce <[hidden email] > <mailto:[hidden email]>> > > > > 2009/8/26 Miquel Àngel Farré <[hidden email] > <mailto:[hidden email]>> > > Hi Tristan, > > > It is not in the same thread, so I will use the appsink as you > said. > > But this is the same process right ? > > > > The problem is that I want to draw the ouput of mpeg2dec, it > is yuv-raw, I wonder if it is possible to convert it to rgb to > make it easier generate a texture. > > Thanks for your contribution, > > Miquel > > 2009/8/26 Tristan Matthews <[hidden email] > <mailto:[hidden email]>> > > Hi, > > Florent wrote: > >> I would like to obtain video from a stream and send it > to my openGL based > >> application, and draw the frames there. > >> > Would your application be in the same process as your > gstreamer > pipeline? If not, you won't be able to share gl contexts > if you're using > direct rendering. From > http://www.opengl.org/sdk/docs/man/xhtml/glXCreateNewContext.xml: > > .... direct-rendering contexts cannot be shared > outside a > single process, > and they may be unable to render to GLX pixmaps. > > If you don't want it in the same process, you could use > appsink, pass > the buffers to some shared memory and in your GL process > upload these > buffers to GL textures. > > Sorry if this is an aside, I've been working on something > similar so I > thought I would pass the information along. > > Best, > > Tristan > > >> My idea is use glupload to obtain openGL textures and > then load these into > >> the application through appsink. > >> > > > > You won't need any gl-based stuff if you use appsink, > because it will > > pass raw buffers in memory. > > > > > >> * Question: there is a better way to pass the textures > to my app instead of > >> appsink ? > >> > > > > You can, however share the openGL context between > glimagesink and your > > application so that you don't need to upload frames > manually. See > > tests/examples/clutter/cluttershare as example. > > > > > >> * 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 > > > > > ------------------------------------------------------------------------------ > > 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 > > [hidden email] > <mailto:[hidden email]> > > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > > > > > > > -- > Tristan Matthews > Société des arts technologiques [SAT] > email: [hidden email] <mailto:[hidden email]> > web: http://www.music.mcgill.ca/~tmatthews > <http://www.music.mcgill.ca/%7Etmatthews> > > > ------------------------------------------------------------------------------ > 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 > [hidden email] > <mailto:[hidden email]> > 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 > [hidden email] > <mailto:[hidden email]> > 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 > [hidden email] > <mailto:[hidden email]> > 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 > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > -- Tristan Matthews Société des arts technologiques [SAT] email: [hidden email] web: http://www.music.mcgill.ca/~tmatthews ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Julien Isorce
Hi Miquel,
Take a look at gst-plugins-gl/tests/examples/sdl/sdlshare.c example. (note that I have currently only tested it on win32, but I did the stuffs for GLX, so it should work on linux too) 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/26 Julien Isorce <[hidden email]> Hello Miquel, ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Julien,
Thanks a lot for your sdl example, I have changed some things related with sdl_syswm and some casts and finally it works fine on linux :) Atached you can find the modified example and his makefile Thanks, Miquel 2009/8/26 Julien Isorce <[hidden email]> Hi Miquel, ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi Miquel,
Could you review your changes and make a patch that I would be able to commit ? -> remove unused line at the begnning -> use gpointer instead of void* -> let the #ifdef WIN32 you removed -> replace the last g_print ("no yet implemented if not win32\n"); return -1; by glXMakeCurrent (sdl_display, None, 0); -> remove APPLE and mach stuffs at the beginning -> put #include <GL/glx.h> in a #ifndef WIN32 Then open a bug and attach your patch using git-format Julien 2009/8/27 Miquel Àngel Farré <[hidden email]> 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Bug opened and patch uploaded 2009/8/28 Julien Isorce <[hidden email]> Hi Miquel, ------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi,
Thx for the patch but it seems that it's not attached to the bug: http://bugzilla.gnome.org/show_bug.cgi?id=593486 Julien
2009/8/29 Miquel Àngel Farré <[hidden email]>
------------------------------------------------------------------------------ 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |