gstreamer/tests/examples/gl/qt/qglwtextureshare
Wang Xin-yu (王昕宇) 8d6f745b78 gl: qglwtextureshare demo fixes and cleanup
1. glcontextid function is replaced by gstreamer gst_gl_context_new_wrapped .
2. call gst_init before gst_gl_display_new , seems gst_gl_display_new depends
   on gst_allocator_register , which only worked after gst_init called
3. flush gstreamer OpenGL context before using shared texture, fix
   flicker problem.

https://bugzilla.gnome.org/show_bug.cgi?id=735566
2014-08-28 10:06:00 +03:00
..
.gitignore gl/examples: gitignore generated files 2014-07-02 17:38:13 +10:00
AsyncQueue.h gl/examples: move to -bad 2014-04-29 16:40:08 +10:00
cocoa_utils.mm gl/examples: move to -bad 2014-04-29 16:40:08 +10:00
gstthread.cpp gl/examples: move to -bad 2014-04-29 16:40:08 +10:00
gstthread.h gl: qglwtextureshare demo fixes and cleanup 2014-08-28 10:06:00 +03:00
main.cpp gl: qglwtextureshare demo fixes and cleanup 2014-08-28 10:06:00 +03:00
pipeline.cpp gl: qglwtextureshare demo fixes and cleanup 2014-08-28 10:06:00 +03:00
pipeline.h gl: qglwtextureshare demo fixes and cleanup 2014-08-28 10:06:00 +03:00
qglrenderer.cpp gl: qglwtextureshare demo fixes and cleanup 2014-08-28 10:06:00 +03:00
qglrenderer.h gl/examples: move to -bad 2014-04-29 16:40:08 +10:00
qglwtextureshare.pro gl: qglwtextureshare demo fixes and cleanup 2014-08-28 10:06:00 +03:00
README gl/examples: move to -bad 2014-04-29 16:40:08 +10:00

This example illustrates how to integrate Gstreamer GL plugin with
Qt. In particular it uses glupload with fakesink elements to create
texture with decoded video frame. This texture is shared with
QGLWidget derived class, which paints a cube with video texture on
each face.

To compile the example, include and library paths might be adjusted in
.pro file according to your installation of the gstreamer and
corresponding development files. Most probably, the adjustments will
be necessary on Windows.

To run the example simply start executable file after compilation. If
there is no command line arguments provided, then videotestsrc element
will be used to generate video. The following pipeline will be created
in this case:

videotestsrc ! video/x-raw, width=640, height=480, framerate=(fraction)30/1 ! glupload ! fakesink sync=1

It is also possible to provide the video file name as a first command
line parameter, i.e. ./qglwtextureshare myvideo.ogv . In this case,
the following pipeline will be executed:

filesrc location=myvideo.ogv ! decodebin2 ! glupload ! fakesink sync=1

I would appreciate any feedback and improvement suggestions for this
example.

Have fun :-)
Andrey Nechypurenko (andreynech@gmail.com)