platform/upstream/gstreamer.git
6 years agogl/display: avoid opening the X11 display on systems with Cocoa (OS X)
Matthew Waters [Tue, 6 May 2014 07:08:18 +0000 (17:08 +1000)]
gl/display: avoid opening the X11 display on systems with Cocoa (OS X)

https://bugzilla.gnome.org/show_bug.cgi?id=729551

6 years agogl/window: fix string length check for eagl
Matthew Waters [Tue, 6 May 2014 06:39:55 +0000 (16:39 +1000)]
gl/window: fix string length check for eagl

6 years agogl/display: check the correct env variable for choosing an egl display
Matthew Waters [Tue, 6 May 2014 06:31:28 +0000 (16:31 +1000)]
gl/display: check the correct env variable for choosing an egl display

GST_GL_WINDOW is used for window system specific choices.
An EGLDisplay can be created from window systems with egl support by using
eglGetDisplay().

https://bugzilla.gnome.org/show_bug.cgi?id=729551

6 years agogl/cocoa: Use OBJCFLAGS where needed
Edward Hervey [Tue, 6 May 2014 10:56:25 +0000 (12:56 +0200)]
gl/cocoa: Use OBJCFLAGS where needed

Should fix usage of c-compiler-only flags with an objective-c compiler

6 years agogl/clutter: safer check for cogl version
Luis de Bethencourt [Sun, 4 May 2014 01:38:42 +0000 (21:38 -0400)]
gl/clutter: safer check for cogl version

Use COGL_VERSION_ENCODE to check for the minimum required and maximum allowed
cogl version. In certain situations just using the COGL_VERSION_* macro name can
give you the following error:

error "COGL_VERSION_MAX_ALLOWED must be >= COGL_VERSION_MIN_REQUIRED"

6 years agogl/examples/generic: remove trailing whitespaces
Luis de Bethencourt [Sun, 4 May 2014 01:05:19 +0000 (21:05 -0400)]
gl/examples/generic: remove trailing whitespaces

6 years agoexamples: Fix CFLAGS in clutter GL examples
Sebastian Dröge [Sat, 3 May 2014 17:45:37 +0000 (19:45 +0200)]
examples: Fix CFLAGS in clutter GL examples

6 years agoexamples: Add all gl subdirs to DIST_SUBDIRS to fix the build
Sebastian Dröge [Sat, 3 May 2014 17:42:37 +0000 (19:42 +0200)]
examples: Add all gl subdirs to DIST_SUBDIRS to fix the build

6 years agogl: use the bufferpool's upload when available
Matthew Waters [Fri, 2 May 2014 05:56:59 +0000 (15:56 +1000)]
gl: use the bufferpool's upload when available

Avoids duplicating GL resources

https://bugzilla.gnome.org/show_bug.cgi?id=728872

6 years agogl: show internal cocoa window on top of others
Julien Isorce [Fri, 2 May 2014 04:57:00 +0000 (05:57 +0100)]
gl: show internal cocoa window on top of others

Useful when your OSX terminal is fullscreen

https://bugzilla.gnome.org/show_bug.cgi?id=728127

6 years agogl: pass NSView instead of NSWindow in cocoa-videooverlay example
Julien Isorce [Fri, 2 May 2014 04:51:36 +0000 (05:51 +0100)]
gl: pass NSView instead of NSWindow in cocoa-videooverlay example

https://bugzilla.gnome.org/show_bug.cgi?id=728451

6 years agogl: add copyright to cocoa example
Julien Isorce [Fri, 2 May 2014 04:50:18 +0000 (05:50 +0100)]
gl: add copyright to cocoa example

6 years agogl: rename cocoa example and move it to its parent directory
Julien Isorce [Fri, 2 May 2014 04:46:18 +0000 (05:46 +0100)]
gl: rename cocoa example and move it to its parent directory

6 years agogl: remove unuseful README for cocoa example
Julien Isorce [Fri, 2 May 2014 04:29:41 +0000 (05:29 +0100)]
gl: remove unuseful README for cocoa example

6 years agogl/pool: init the upload object on start
Matthew Waters [Thu, 1 May 2014 06:07:05 +0000 (16:07 +1000)]
gl/pool: init the upload object on start

Theoretically, set_config could be called multiple times

6 years agogl: Try harder to load symbols from the correct place
Sebastian Dröge [Thu, 1 May 2014 12:36:54 +0000 (14:36 +0200)]
gl: Try harder to load symbols from the correct place

This commit makes the loading of the GModules threadsafe, and
always first tries to load the symbol for the GL library that
is selected for the current context. Only then it falls back
to looking into the current module (NULL), and only as a last
resort the context specific function (e.g. eglGetProcAddress())
is called.

Also add configure parameters to select the names of the library
modules instead of using the defaults, and let the defaults be
independent of the G_MODULE_SUFFIX.

https://bugzilla.gnome.org/show_bug.cgi?id=728753

6 years agoglcolorscale: fix operation with dual GL, GLES2 libgstgl
Matthew Waters [Thu, 1 May 2014 04:11:00 +0000 (14:11 +1000)]
glcolorscale: fix operation with dual GL, GLES2 libgstgl

6 years agogl/mem: implement texture copying between formats with strides properly
Matthew Waters [Thu, 1 May 2014 03:57:16 +0000 (13:57 +1000)]
gl/mem: implement texture copying between formats with strides properly

Previously, we used the width to determine the amount of data to be
copied using pbos.  This, makes it allocate enough data for the
the strides as well.

6 years agogl/mem: pad the public struct
Matthew Waters [Thu, 1 May 2014 02:51:06 +0000 (12:51 +1000)]
gl/mem: pad the public struct

6 years agogl: no need to provide full lib path to load symbols
Nicolas Dufresne [Wed, 30 Apr 2014 17:37:27 +0000 (18:37 +0100)]
gl: no need to provide full lib path to load symbols

- Make gstgl work on Mali
- Keep it work on RPI
- fallback to NULL name module if fails with usual lib name

https://bugzilla.gnome.org/show_bug.cgi?id=728753

6 years agoglcolorscale: use a shader on GLESv2
Julien Isorce [Wed, 30 Apr 2014 16:30:06 +0000 (17:30 +0100)]
glcolorscale: use a shader on GLESv2

Otherwise you only see black frames

Fix https://bugzilla.gnome.org/show_bug.cgi?id=728947

6 years agoglimagesink: use new helper function to avoid duplicating default shader text
Julien Isorce [Wed, 30 Apr 2014 14:30:53 +0000 (15:30 +0100)]
glimagesink: use new helper function to avoid duplicating default shader text

6 years agogleffects: use new helper functions to avoid duplicating the same vertex shader text
Julien Isorce [Wed, 30 Apr 2014 14:28:35 +0000 (15:28 +0100)]
gleffects: use new helper functions to avoid duplicating the same vertex shader text

And also use the default fragment shader text for the identity effect

6 years agogl: add convenient functions to setup default vertex and fragment shaders
Julien Isorce [Wed, 30 Apr 2014 14:20:23 +0000 (15:20 +0100)]
gl: add convenient functions to setup default vertex and fragment shaders

Most of our 2D filters use the same simple vertex shader.
Also define the default fragment shader as the identity.

Avoid duplicating the same vertex and fragment shader text.

6 years agogl: add missing G_BEGIN/END_DECLS in utils header
Philippe Normand [Tue, 29 Apr 2014 18:24:08 +0000 (19:24 +0100)]
gl: add missing G_BEGIN/END_DECLS in utils header

6 years agoexamples: gl: add missing entry to cflags to find gst/gl/gl.h
Thiago Santos [Tue, 29 Apr 2014 16:21:27 +0000 (13:21 -0300)]
examples: gl: add missing entry to cflags to find gst/gl/gl.h

Otherwise build fails

6 years agotests: drop direct include
Stefan Sauer [Tue, 29 Apr 2014 14:44:59 +0000 (16:44 +0200)]
tests: drop direct include

It is only allowed to include gdk/gdkx.h and that will bring all the x11 things.

6 years agogl/sdl example: Fix uninstalled build
Jan Schmidt [Tue, 29 Apr 2014 12:18:14 +0000 (22:18 +1000)]
gl/sdl example: Fix uninstalled build

6 years agogl: Reduce noisy Info level output to LOG
Jan Schmidt [Wed, 23 Apr 2014 10:29:47 +0000 (20:29 +1000)]
gl: Reduce noisy Info level output to LOG

6 years agogl/examples/sdl: update for the latest gstgl changes
Matthew Waters [Tue, 29 Apr 2014 08:32:22 +0000 (18:32 +1000)]
gl/examples/sdl: update for the latest gstgl changes

6 years agogl/examples: move to -bad
Matthew Waters [Tue, 29 Apr 2014 06:38:55 +0000 (16:38 +1000)]
gl/examples: move to -bad

- fix all the compiler errors
- give them their own gl directory

6 years agogl: append GL_LIB and GL_CFLAGS in pc files
Julien Isorce [Mon, 28 Apr 2014 14:52:41 +0000 (15:52 +0100)]
gl: append GL_LIB and GL_CFLAGS in pc files

6 years agogl: use gst_gl_platform_from_string because we support gl shareList on all platforms
Julien Isorce [Mon, 28 Apr 2014 14:15:20 +0000 (15:15 +0100)]
gl: use gst_gl_platform_from_string because we support gl shareList on all platforms

6 years agoglfilter: only warn when other_context attribute is set
Julien Isorce [Mon, 28 Apr 2014 14:07:34 +0000 (15:07 +0100)]
glfilter: only warn when other_context attribute is set

Fix false positive

6 years agogl: fix string literal warning
Julien Isorce [Mon, 28 Apr 2014 13:54:21 +0000 (14:54 +0100)]
gl: fix string literal warning

warning: format not a string literal, argument types not checked [-Wformat-nonliteral]

6 years agogl: check the correct GstGLMemory in basic_test
Luis de Bethencourt [Fri, 25 Apr 2014 20:18:07 +0000 (16:18 -0400)]
gl: check the correct GstGLMemory in basic_test

6 years agogl/x11: Removed unused variable
Nicolas Dufresne [Thu, 24 Apr 2014 17:59:35 +0000 (13:59 -0400)]
gl/x11: Removed unused variable

6 years agogl/x11: Get rid of unneeded second display connection and do everything from the...
Sebastian Dröge [Thu, 24 Apr 2014 16:33:03 +0000 (18:33 +0200)]
gl/x11: Get rid of unneeded second display connection and do everything from the main loop

6 years agogl/x11: Block rendering until swapbuffers is called and don't go via X11 events as...
Sebastian Dröge [Thu, 24 Apr 2014 16:28:34 +0000 (18:28 +0200)]
gl/x11: Block rendering until swapbuffers is called and don't go via X11 events as unneeded indirection

This should fix QoS problems, where basesink believed it was rendering with
20FPS but actually we were just queueing up X11 Expose events and only once
in a while something was rendered.

6 years agogl: fails glimagesink when shader compilation went wrong
Julien Isorce [Thu, 24 Apr 2014 15:05:32 +0000 (16:05 +0100)]
gl: fails glimagesink when shader compilation went wrong

Those shaders are fixed and very simple so it should not fail
but it's worth to handle a such case.

6 years agogl: call glClearColor before glClear
Julien Isorce [Thu, 24 Apr 2014 14:36:47 +0000 (15:36 +0100)]
gl: call glClearColor before glClear

6 years agopkgconfig: fix gstreamer-gl uninstalled
Josep Torra [Thu, 24 Apr 2014 14:33:56 +0000 (16:33 +0200)]
pkgconfig: fix gstreamer-gl uninstalled

Ensure to provide libgstgl also in the uninstalled setup.
Fixes build of gst-omx for RPI in uninstalled setup.

6 years agogl/rpi: do not scale to full screen
Julien Isorce [Thu, 24 Apr 2014 14:17:41 +0000 (15:17 +0100)]
gl/rpi: do not scale to full screen

Having a 640x360 movie being scaled to 1900x1200 does not look nice

6 years agogl/rpi: change dispmanx attributes of existing element instead of creating a new one
Julien Isorce [Thu, 24 Apr 2014 13:50:57 +0000 (14:50 +0100)]
gl/rpi: change dispmanx attributes of existing element instead of creating a new one

I was lucky that:
e1 = vc_dispmanx_element_add ()
eglCreateWindowSurface (e1)
vc_dispmanx_element_remove (e1)
e2 = vc_dispmanx_element_add ()

resulted in having e2 equal to e1. And also having the egl surface
that does not allocate its buffers before the first draw.

6 years agogl/rpi: ensure the dispmanx element to be opaque
Julien Isorce [Thu, 24 Apr 2014 13:38:40 +0000 (14:38 +0100)]
gl/rpi: ensure the dispmanx element to be opaque

So that we ensure it does not get alpha composited with other
dispmanx elements like the desktop.

6 years agogl/cocoa: pass a NSView to set_window_handle instead of a NSWindow
Julien Isorce [Thu, 24 Apr 2014 09:37:00 +0000 (10:37 +0100)]
gl/cocoa: pass a NSView to set_window_handle instead of a NSWindow

Fix backwards compatibility

https://bugzilla.gnome.org/show_bug.cgi?id=728451

6 years agogl/cocoa: only draw once the window has been resized
Julien Isorce [Thu, 24 Apr 2014 08:03:32 +0000 (09:03 +0100)]
gl/cocoa: only draw once the window has been resized

It avoids to draw the first frame with an incorrect view port.

6 years agogl/cocoa: set the view to use for drawing by the context
Julien Isorce [Thu, 24 Apr 2014 07:49:54 +0000 (08:49 +0100)]
gl/cocoa: set the view to use for drawing by the context

It avoids to draw to an invalid buffer.
Withtout this the default frame buffer is undefined:
glBindFramebuffer (GL_FRAMEBUFFER, 0)

Visually you could see some white frames at the beginning
when lunching videotestsrc ! glimagesink

With OpenGL Profiler from XCode you could see some
GL_INVALID_FRAMEBUFFER_OPERATION for the first frames

6 years agogl: fix declaration-definition mismatch for _init_upload
Julien Isorce [Wed, 23 Apr 2014 13:41:21 +0000 (14:41 +0100)]
gl: fix declaration-definition mismatch for _init_upload

6 years agogl/bufferpool: do not reset upload when set_config does not change the caps
Julien Isorce [Wed, 23 Apr 2014 12:34:12 +0000 (13:34 +0100)]
gl/bufferpool: do not reset upload when set_config does not change the caps

With videotestsrc ! glimagesink it was reset 3 times

6 years agogl: use #ifdef instead of #if for __APPLE__
Julien Isorce [Wed, 23 Apr 2014 12:30:27 +0000 (13:30 +0100)]
gl: use #ifdef instead of #if for __APPLE__

warning: "__APPLE__" is not defined [-Wundef]

with gcc version 4.7.2 20120731 (prerelease)
    (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08)

6 years agoglmemory: User g_slice_new0 to ensure fully initilized structure
Nicolas Dufresne [Wed, 23 Apr 2014 16:42:32 +0000 (12:42 -0400)]
glmemory: User g_slice_new0 to ensure fully initilized structure

The pbo pointer not being initialized would trigger a use of unitilialized variable
in valgrind.

6 years agoglimagesink: Use the pixel-aspect-ratio adjusted width/height when centering the...
Sebastian Dröge [Wed, 23 Apr 2014 09:10:28 +0000 (11:10 +0200)]
glimagesink: Use the pixel-aspect-ratio adjusted width/height when centering the frame in the display area

Makes sure we actually keep the display aspect ratio

6 years agoglimagesink: By default keep the display aspect ratio
Sebastian Dröge [Wed, 23 Apr 2014 08:55:38 +0000 (10:55 +0200)]
glimagesink: By default keep the display aspect ratio

Also the default for the pixel-aspect-ratio should be 1/1, not 0/1.

6 years agogltestsrc: Unref context when creation failed and guard against that in fill()
Sebastian Dröge [Wed, 23 Apr 2014 08:27:23 +0000 (10:27 +0200)]
gltestsrc: Unref context when creation failed and guard against that in fill()

6 years agoglimagesink: Call gst_object_unref() on the GstGL GObjects again
Sebastian Dröge [Wed, 23 Apr 2014 08:24:55 +0000 (10:24 +0200)]
glimagesink: Call gst_object_unref() on the GstGL GObjects again

While they're plain GObjects it does not hurt to call gst_object_unref()
on them and potentially allows to debug reference leaks a bit easier.

6 years agoglimagesink: If creating a context or upload failed, destroy it
Sebastian Dröge [Wed, 23 Apr 2014 08:00:48 +0000 (10:00 +0200)]
glimagesink: If creating a context or upload failed, destroy it

Fixes deadlocks in error cases when later code assumes the broken
context is actually usable.

https://bugzilla.gnome.org/show_bug.cgi?id=728761

6 years agogl: a couple spelling/grammar fixes
Vincent Penquerc'h [Mon, 21 Apr 2014 08:51:19 +0000 (09:51 +0100)]
gl: a couple spelling/grammar fixes

6 years agogl: guard against using a NULL window pointer
Vincent Penquerc'h [Mon, 21 Apr 2014 08:50:19 +0000 (09:50 +0100)]
gl: guard against using a NULL window pointer

Coverity 1195145

6 years agogl: prevent division by 0 on unsupported texture type
Vincent Penquerc'h [Mon, 21 Apr 2014 08:47:08 +0000 (09:47 +0100)]
gl: prevent division by 0 on unsupported texture type

Coverity 1199697

6 years agoglcolorconvert: Fix bt709 conversion matrices.
Jan Schmidt [Mon, 21 Apr 2014 12:01:47 +0000 (22:01 +1000)]
glcolorconvert: Fix bt709 conversion matrices.

Fix the sign on one entry in the bt.709 YUV->RGB conversion
matrix, and the corresponding inverse matrix. Fixes really
wrong colouring of some videos.

6 years agogl: allow to include GLES/gl.h
Julien Isorce [Mon, 24 Mar 2014 12:08:43 +0000 (12:08 +0000)]
gl: allow to include GLES/gl.h

https://bugzilla.gnome.org/show_bug.cgi?id=703343

6 years agogl/eagl: Fix compilation
Sebastian Dröge [Sun, 13 Apr 2014 17:20:32 +0000 (19:20 +0200)]
gl/eagl: Fix compilation

6 years agogl/eagl: Notify the window's resize callback about surface dimension changes
Sebastian Dröge [Sun, 13 Apr 2014 14:53:58 +0000 (16:53 +0200)]
gl/eagl: Notify the window's resize callback about surface dimension changes

https://bugzilla.gnome.org/show_bug.cgi?id=728107

6 years agogl/eagl: Remove spurious private struct pointer
Sebastian Dröge [Sun, 13 Apr 2014 14:46:11 +0000 (16:46 +0200)]
gl/eagl: Remove spurious private struct pointer

6 years agogl/android: Notify the window's resize callback about surface dimension changes
Sebastian Dröge [Sun, 13 Apr 2014 14:40:58 +0000 (16:40 +0200)]
gl/android: Notify the window's resize callback about surface dimension changes

https://bugzilla.gnome.org/show_bug.cgi?id=728107

6 years agoglimagesink: remove unused texture
Matthew Waters [Sun, 13 Apr 2014 12:16:45 +0000 (22:16 +1000)]
glimagesink: remove unused texture

6 years agoglimagesink: move upload into _prepare()
Matthew Waters [Sun, 13 Apr 2014 12:14:52 +0000 (22:14 +1000)]
glimagesink: move upload into _prepare()

6 years agogl/context: output available extensions
Matthew Waters [Sun, 13 Apr 2014 03:49:22 +0000 (13:49 +1000)]
gl/context: output available extensions

6 years agogl/context: provide get_gl_version
Matthew Waters [Sun, 13 Apr 2014 03:39:14 +0000 (13:39 +1000)]
gl/context: provide get_gl_version

6 years agogl/color: restore viewport dimensions when fbo done
Julien Isorce [Sat, 12 Apr 2014 23:21:00 +0000 (00:21 +0100)]
gl/color: restore viewport dimensions when fbo done

Regression introduced by 95abfda1399bcddbee345d4542e857d743965477.
It caused to display the wrong frame size when resizing the window.

6 years agogl: Import QuartzCore/QuartzCore.h for CAEAGLLayer on older iOS versions
Sebastian Dröge [Sat, 12 Apr 2014 20:45:30 +0000 (22:45 +0200)]
gl: Import QuartzCore/QuartzCore.h for CAEAGLLayer on older iOS versions

6 years agogl: Set glimagesink rank to SECONDARY
Sebastian Dröge [Sat, 12 Apr 2014 20:15:35 +0000 (22:15 +0200)]
gl: Set glimagesink rank to SECONDARY

This is a full-featured video sink now and especially should be
used instead of osxvideosink on OSX if available.

6 years agogl: Add support for iOS EAGL platform
Sebastian Dröge [Sat, 12 Apr 2014 19:43:50 +0000 (21:43 +0200)]
gl: Add support for iOS EAGL platform

https://bugzilla.gnome.org/show_bug.cgi?id=703341

6 years agogl/cocoa: make gst_gl_window_cocoa_send_message_async re-entrant
Julien Isorce [Sat, 12 Apr 2014 16:33:44 +0000 (17:33 +0100)]
gl/cocoa: make gst_gl_window_cocoa_send_message_async re-entrant

Backends that use g_main_context_invoke are re-entrant.

Il allows to call two nested gst_gl_context_thread_add.
ex: init_upload / init_colorconvert

6 years agoglimagesink: First handle GL window setup, then create the context and its thread
Sebastian Dröge [Sat, 12 Apr 2014 15:01:09 +0000 (17:01 +0200)]
glimagesink: First handle GL window setup, then create the context and its thread

6 years agogl/cocoa: fix NSAutoreleasePool initialization
Julien Isorce [Sat, 12 Apr 2014 14:51:47 +0000 (15:51 +0100)]
gl/cocoa: fix NSAutoreleasePool initialization

6 years agogl/cocoa: ensure to call NSApplication:sharedApplication in the main thread
Julien Isorce [Sat, 12 Apr 2014 11:42:40 +0000 (12:42 +0100)]
gl/cocoa: ensure to call NSApplication:sharedApplication in the main thread

"(NSApplication *)sharedApplication This method also makes a connection
to the window server and completes other initialization"
The implicit thing which is not mentioned is that it required
to be called in the main thread.

Fix a regression introduces by 82b7c915bb02a9790d256d599452e5a54afda633
When using with gst-launch, it was not possible to click on the close
cross of the window anymore which is a bit anoying and also because
it's was possible before.

Prior to this commit the GstGLContextCocoaClass was initialized
in the main thread because gst_gl_context_new was called in the
state change function from going from ready to paused.

From this commit this call is done from the streaming thread.
So that the call to [NSApplication sharedApplication];
was not done in the main thread anymore.

We now ensure that by assuming there is a GMainLoop running.
It's for debugging purpose so that's ok to do that. Also
note we already do this assumtion to run app itereations.

The regression had no consequence on the cocoa/videooverlay example
(that should be moved from gst-plugins-gl to -bad) because the
application is responsible for that necessary call.

6 years agogl/color: fix warning type qualifiers ignored
Julien Isorce [Sat, 12 Apr 2014 13:40:40 +0000 (14:40 +0100)]
gl/color: fix warning type qualifiers ignored

i686-apple-darwin11-llvm-gcc-4.2
"warning: type qualifiers ignored on function return type"

6 years agogl/color: remove if statement with no effect
Matthew Waters [Sat, 12 Apr 2014 08:24:43 +0000 (18:24 +1000)]
gl/color: remove if statement with no effect

Coverity 1199698

6 years agogl/color: pass large value by reference
Matthew Waters [Sat, 12 Apr 2014 08:16:29 +0000 (18:16 +1000)]
gl/color: pass large value by reference

Coverity 1199700

6 years agogl/mem: cache the stride/unpack length for upload
Matthew Waters [Fri, 11 Apr 2014 07:24:39 +0000 (17:24 +1000)]
gl/mem: cache the stride/unpack length for upload

6 years agogl/color: explicitly map the buffers we are copying into
Matthew Waters [Fri, 11 Apr 2014 07:23:32 +0000 (17:23 +1000)]
gl/color: explicitly map the buffers we are copying into

Otherwise it may not be downloaded at all.

6 years agogl/color: cache the temporary textures
Matthew Waters [Fri, 11 Apr 2014 06:09:09 +0000 (16:09 +1000)]
gl/color: cache the temporary textures

6 years agogl/mem: provide defines for tokens not defined in GLES2/ancient platforms
Matthew Waters [Fri, 11 Apr 2014 01:04:43 +0000 (11:04 +1000)]
gl/mem: provide defines for tokens not defined in GLES2/ancient platforms

6 years agogl: fixup incorrect number of arguments
Matthew Waters [Fri, 11 Apr 2014 01:03:19 +0000 (11:03 +1000)]
gl: fixup incorrect number of arguments

6 years agogl: fix incorrect usage of g_return_if_fail
Matthew Waters [Fri, 11 Apr 2014 00:55:21 +0000 (10:55 +1000)]
gl: fix incorrect usage of g_return_if_fail

6 years agogl/mem: allocate the memory per plane
Matthew Waters [Wed, 2 Apr 2014 06:43:52 +0000 (17:43 +1100)]
gl/mem: allocate the memory per plane

This patch provides the basic infrastructure required for this.
Upload and Download has been ported to this.

Has the nice effect of allowing GstGLMemory to be our
refcounted texture object for any texture type (not just RGBA).

Should not lose any features/video formats.

6 years agogl/eglimage: #if 0 unused code
Matthew Waters [Tue, 1 Apr 2014 04:10:05 +0000 (15:10 +1100)]
gl/eglimage: #if 0 unused code

6 years agogl: add colorconvert object that converts between color spaces/formats
Matthew Waters [Tue, 1 Apr 2014 02:30:51 +0000 (13:30 +1100)]
gl: add colorconvert object that converts between color spaces/formats

Currently used by both upload and download objects separately.

6 years agogl: pass large structure by const pointer, not value
Vincent Penquerc'h [Wed, 9 Apr 2014 09:28:46 +0000 (10:28 +0100)]
gl: pass large structure by const pointer, not value

Avoids large pointless memcpy.

Coverity 206236, 206237

6 years agogl: test for frame NULLness before dereferencing it
Vincent Penquerc'h [Tue, 8 Apr 2014 15:23:50 +0000 (16:23 +0100)]
gl: test for frame NULLness before dereferencing it

Coverity 1195172, 1195171

6 years agogl: fix leaks
Vincent Penquerc'h [Tue, 8 Apr 2014 14:54:01 +0000 (15:54 +0100)]
gl: fix leaks

As the relevant variables are initialized to 0/NULL, we can loop
over the full range and make sure we free partial allocations
when an error happens partway through initialization.

6 years agoglimagesink: Create GL context and set up window from the streaming thread
Sebastian Dröge [Sun, 6 Apr 2014 09:57:12 +0000 (11:57 +0200)]
glimagesink: Create GL context and set up window from the streaming thread

gst_gl_context_create() might need to dispatch some operations to the
application's main thread, and calling this in the change_state function
can cause deadlocks.

6 years agotests: fix gl unit tests for recent API changes
Tim-Philipp Müller [Wed, 2 Apr 2014 12:48:02 +0000 (13:48 +0100)]
tests: fix gl unit tests for recent API changes

6 years agogl: pass video info's by reference
Matthew Waters [Wed, 2 Apr 2014 12:05:47 +0000 (23:05 +1100)]
gl: pass video info's by reference

6 years agogl: fix array initialization
Matthew Waters [Wed, 2 Apr 2014 12:05:11 +0000 (23:05 +1100)]
gl: fix array initialization

6 years agoglbumper: remove redundant check
Matthew Waters [Wed, 2 Apr 2014 11:54:55 +0000 (22:54 +1100)]
glbumper: remove redundant check

6 years agogl/glx: use the context's display rather than asking for the window's
Matthew Waters [Wed, 2 Apr 2014 11:53:10 +0000 (22:53 +1100)]
gl/glx: use the context's display rather than asking for the window's

6 years agogl: fix assignment of temporary variables
Matthew Waters [Wed, 2 Apr 2014 11:43:41 +0000 (22:43 +1100)]
gl: fix assignment of temporary variables