Commit graph

1346 commits

Author SHA1 Message Date
Julien Isorce
b0352753d4 [432/906] GstGLDisplay: this is GL_DEPTH24_STENCIL8_EXT, not GL_DEPTH24_STENCIL8_EXT 2014-03-15 18:36:40 +01:00
Pierre Pouzol
2beb8aa729 [431/906] GstGLDisplay: enable stencil buffer when using framebuffer objects.
Fixes Bug #612159
2014-03-15 18:36:40 +01:00
Nicholas Panayis
e6195bf5a3 [415/906] gstglwindow_win32: share opengl context in correct order
Allow to use the opengl context sharing feature if the original
context has been used already.
This is only possible on win32 with wglShareLists because on other
backends, the sharing is made when a context is created.
This new feature is only usefull when using external context
because gst-gl internally makes sure that the orginal context is not
already used when sharing it.

Fix bug #611067
2014-03-15 18:36:39 +01:00
Julien Isorce
8937128d62 [412/906] Cocoa backend: improve support on GNUStep 2014-03-15 18:36:38 +01:00
Julien Isorce
1ae95c42de [411/906] gstglmixer: copy/past recent changes from gstvideomixer 2014-03-15 18:36:38 +01:00
Julien Isorce
e356b7d1ed [410/906] gstglmixer: inactivate shared gl context before to release ours
First, inactivate shared gl contexts known by each sink pad.
Then, destroy the gl context known by the glmixer.
Finally, re-activate shared gl contexts.
This is to satisfy the fact that no shared gl context must be current
when an opengl context is destroyed.
Moreover the application may hang or crash without those steps.
2014-03-15 18:36:38 +01:00
Julien Isorce
9e22a5e0e6 [407/906] winCE backend: fix build 2014-03-15 18:36:38 +01:00
Julien Isorce
3e1bffc802 [406/906] glimagesink: add a client-data property
Also add it to glfilterapp.

Fixes #559131
2014-03-15 18:36:38 +01:00
Julien Isorce
a6a5ee2839 [405/906] glfilter: add external-opengl-context property
It repairs the cluttershare and sdlshare example
2014-03-15 18:36:38 +01:00
Jan Schmidt
d9c6eaf72f [403/906] gstglmixer: Initialise the debug category
Initialise the gstglmixer debug category before using it.
2014-03-15 18:36:38 +01:00
Julien Isorce
32e401427f [400/906] gstgldisplay: no need the I420 work around if ATI Mobility
fix #588653
2014-03-15 18:36:38 +01:00
Julien Isorce
48575c93ec [399/906] glmixer: fix when no more gl elements after it
For example:
videotestsrc ! glupload ! ... ! glfiter ! ... ! glmosaic ! fakesink
Usefull when using glmixer inside cluttershare or sdlshare cases.
2014-03-15 18:36:38 +01:00
Pratheesh Gangadhar
34c5e17187 [394/906] gstgldisplay: use of GL_DEPTH_COMPONENT16 if OpenGL ES 2.0
glRenderbufferStorage does not accept GL_DEPTH_COMPONENT in
OpenGL ES 2.0.

Fix bug #593786
2014-03-15 18:36:37 +01:00
Julien Isorce
aeb793497d [393/906] glmosaic: for now it's a cube mosaic
Also use GPtrArray instead of GArray in glmixer.
And add a pipeline to tests/pieplines
2014-03-15 18:36:37 +01:00
Julien Isorce
954b3a52c8 [391/906] Cocoa: fix backend since recent changes
Before, the window size was given at its creation. Now, it's done at
the drawing step because it's only relevant when there is a glimagesink
element in the pipeline.
2014-03-15 18:36:37 +01:00
Julien Isorce
62f961a28e [389/906] fix codeblocks build on win32 2014-03-15 18:36:37 +01:00
Julien Isorce
42720ef3ff [388/906] just fix builds and indent 2014-03-15 18:36:37 +01:00
Julien Isorce
db7d436bd8 [387/906] glmixer: add a glmixer base element
glmixer can be seen as a glfilter except it handles N requested
sink pads.
Each sink pad and the src pad are video/x-raw-gl.
glmixer is responsible for managing different framerates from inputs.
It uses OpenGL context sharing. It means that each input is in its
own OpenGL context shared together and shared with the OpenGL context
of the ouput gl chain.
Also add a glmosaic which is an example of implementation of glmixer.
For now glmosaic is a cube but it will be fixed in the next commits.
For now the glmixer has some weird behaviours in some configurations
but it will be improved in the next commits.
The autotools builds is temporarly broken since those changes
have been made on win32.
2014-03-15 18:36:37 +01:00
Julien Isorce
65f4d40e6d [385/906] rewrite the way a gstgldisplay is transmited to the gl elements
Before, a gstgldisplay was instancied by the gl src in terms of gl chain.
And then the next element got it through the first gstglbuffer.
Now, this is done though queries.
All glelements get their ref on a gstgldisplay in READY state.
This rewrite is mainly a first step to be able to share OpenGL context hold
by the gstgldisplay using more complex glelements.
For example, with a glvideomixer. The associated gstgldisplay of each gl chain
of the sink pads will share their OpenGL context.
2014-03-15 18:36:37 +01:00
Stefan Kost
3b0a88850d [384/906] build: use <stdio.h> / "stdio.h" 2014-03-15 18:36:37 +01:00
Stefan Kost
252b406547 [383/906] build: include <stdio.h> when using printf & co. 2014-03-15 18:36:37 +01:00
Julien Isorce
3700180345 [382/906] ES2.0: remove warnings
Partially fix #593786
2014-03-15 18:36:37 +01:00
Julien Isorce
c2c15214a8 [381/906] EGL and GLX:: set a minimum depth size 2014-03-15 18:36:37 +01:00
Julien Isorce
30631c4626 [378/906] gldisplay: avoid to request gl thread when deleting a texture
A texture is not destroyed when when we are done with it.
This texture is just added to the texture pool in order to be
re-used. In this case no OpenGL code is executed so we do not need to
request gl thread.
2014-03-15 18:36:36 +01:00
Julien Isorce
192bf749ea [377/906] gldisplay: avoid to request gl thread when generating a texture
Thanks to the texture pool the gl textures are re-used.
When re-using one, no opengl code is executed so do not need
to request gl thread.
2014-03-15 18:36:36 +01:00
Stefan Kost
1cb459d4d5 [376/906] build: support openGLES on linux via autofoo. Partialy fixes #593786
Add a pkg-config check for opengl and if not found assume opengl-es. If user has
none of both one still get build error later on (there is no pkg-config for
opengl-es).
Add more files to EXTRA dist and build the opengles variant if selected.
Simmilar changes could be done for the winCE backend.
2014-03-15 18:36:36 +01:00
Julien Isorce
d9c055246f [369/906] define missing glew macro on older versions 2014-03-15 18:36:36 +01:00
Julien Isorce
3107266d81 [368/906] Cocoa backend: fix crash when resizing
Default implementation of NSOpenglView::update is not safe because it
just calls update on the opengl context whereas we are not in the gl thread.
Also fix the white flickering when resizing, because now we need to call
the draw callback manually when resizing.
2014-03-15 18:36:36 +01:00
Julien Isorce
ca891db2a6 [365/906] Cocoa backend: make sure that nsapp is initialized
gst-launch-0.10 videotestsrc ! tee name=t ! queue ! glimagesink t. ! queue ! glimagesink
now works properly on MacOSX
2014-03-15 18:36:36 +01:00
Julien Isorce
579b74d845 [364/906] make the cmake build work on MacOSX
We can now generate a Xcode project (or Unix Makfiles),
see INSTALL file
2014-03-15 18:36:36 +01:00
Julien Isorce
89fe233c52 [363/906] Cocoa backend: fix crash when closing
- All gstglwindow members are now modified only in the gl thread
to avoid thread concurrency
- OpenGL context is now properly clean
- fix a couple of things in implementation of xoverlay interface
2014-03-15 18:36:36 +01:00
Julien Isorce
a9ab2abea4 [362/906] make cocoa backend work on MacOSX
It works with both gst-launch and a cocoa app (non-embedded and embedded)
But there is still some problems:
  - sometimes crash when closing
  - flickering when resizing
  - embedded mode not perfect

I will first make the CMake build work with cocoa backend
in order to generate a XCode project.
Then it should be easier to fix those issues.
2014-03-15 18:36:36 +01:00
Jan Schmidt
1a070f378b [358/906] gstgldisplay: Close a small race starting the display thread
Take the display lock before signalling the create-context cond
to ensure the caller has dropped the lock and is therefore listening
for the signal.
2014-03-15 18:36:35 +01:00
Jan Schmidt
b1dccdb13c [357/906] x11: Don't crash when the X11 display is not available.
Error out cleanly instead of crashing when the X11 display can't
be contacted.
2014-03-15 18:36:35 +01:00
Jan Schmidt
f5ac0a784d [352/906] fix typo
Change GST_GL_DISPLAY_PROJECTION_PERSPECIVE to
GST_GL_DISPLAY_PROJECTION_PERSPECTIVE.

Re-indent a couple of files that needed it.
2014-03-15 18:36:35 +01:00
Julien Isorce
ae4f96ec93 [350/906] fix window position when using xoverlay
x, y are the coordinates of the position inside
the new parent window.

Fixes #584877
2014-03-15 18:36:35 +01:00
Julien Isorce
6292d5af16 [349/906] can switch xoverlays while playing
Fixes bug #584877

Before this commit calling "gst_x_overlay_set_xwindow_id" more
than one time, had no effect.
It mainly affects the glimagesink implementation.
But on win32 (and CE), some stuff has to be done to
release the old parent.

And add a switchxoverlay example where the user
can click on left/right part of the main window to
switch the xoverlay.
2014-03-15 18:36:35 +01:00
LRN
d1893e0e7e [347/906] fix miscast of a pointer in SetWindowLongPtr
GCC 4.4.0 complains error: cast from pointer to integer of different size
Fixes #584678.
2014-03-15 18:36:35 +01:00
Sebastian Dröge
64e59060e2 [346/906] Fix linking by providing libtool the correct --tag parameter 2014-03-15 18:36:35 +01:00
Julien Isorce
58e392f129 [337/906] Improve cluttershare example
Use clutter_threads_API.
When just using glupload from rgb, we have to be sure that
the upload texture is not in use in our gst gl context.
2014-03-15 18:36:34 +01:00
Julien Isorce
d0d5eb1f22 [336/906] [x11/x11ES] fix some pointer cast warnings 2014-03-15 18:36:34 +01:00
Julien Isorce
fe24b86d8a [335/906] [cocoa] update since interface changed 2014-03-15 18:36:34 +01:00
Julien Isorce
911cf141c4 [334/906] [win32/winCE] fix some pointer cast warnings with mingw
And turn off deprecated Wp64 msvc compiler option.
2014-03-15 18:36:34 +01:00
Julien Isorce
bcc33ab716 [333/906] add force-aspect-ratio support 2014-03-15 18:36:34 +01:00
Julien Isorce
f735c06c4a [331/906] indent and fix some compiler warnings 2014-03-15 18:36:34 +01:00
Julien Isorce
87a1652216 [330/906] Can now share textures with an external gl context
The external opengl context must be specify when creating
our OpenGL context (glx) or just after (wgl).
When calling glXCreateContext or wglShareLists, the
external opengl context must not be current.
Then our gl context can be current in the gl thread while
the external gl context is current in an other thread.
See tests/examples/clutter/cluttershare.c
2014-03-15 18:36:34 +01:00
David Schleef
b47fc234ef [329/906] Build for Cocoa on darwin, with various fixes 2014-03-15 18:36:34 +01:00
Julien
bf0b1fa1ab [327/906] fix init FBO's texture attachment on ES 2.0 2014-03-15 18:36:34 +01:00
Julien
bb0781a389 [326/906] add X backend for OpenGL ES 2.0 2014-03-15 18:36:34 +01:00
Julien Isorce
1385371e6c [322/906] [download YUY2/UYVY] fix a regression
The call to glLoadIdentity was removed by mistake during
OpenGL ES 2.0 integration.
2014-03-15 18:36:33 +01:00