platform/upstream/gst-plugins-base.git
6 years agogl/x11: Remove unused static function
Sebastian Dröge [Fri, 25 Nov 2016 21:44:25 +0000 (23:44 +0200)]
gl/x11: Remove unused static function

6 years agogldownload: fix element description (was "OpenGL uploader")
Florent Thiéry [Tue, 22 Nov 2016 17:06:52 +0000 (18:06 +0100)]
gldownload: fix element description (was "OpenGL uploader")

6 years agogl/contextglx: error out on more invalid display/window combinations
Matthew Waters [Wed, 23 Nov 2016 06:04:34 +0000 (17:04 +1100)]
gl/contextglx: error out on more invalid display/window combinations

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

6 years agogl: add necessary context_egl.h #includes to the source files
Matthew Waters [Wed, 23 Nov 2016 04:57:05 +0000 (15:57 +1100)]
gl: add necessary context_egl.h #includes to the source files

6 years agogl/memoryegl: remove access to private header gstglcontext_egl.h
Matthew Waters [Wed, 23 Nov 2016 02:32:38 +0000 (13:32 +1100)]
gl/memoryegl: remove access to private header gstglcontext_egl.h

It's been removed and thus compiling anything against GstGLMemoryEGL
would error with:

In file included from gstomxvideodec.c:41:0:
usr/include/gstreamer-1.0/gst/gl/egl/gstglmemoryegl.h:32:41: fatal error: gst/gl/egl/gstglcontext_egl.h: No such file or directory
 #include <gst/gl/egl/gstglcontext_egl.h>
                                         ^

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

6 years agogl: add gstreamer-video to pkg-config path
David Evans [Thu, 17 Nov 2016 15:41:00 +0000 (15:41 +0000)]
gl: add gstreamer-video to pkg-config path

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

6 years agogl/tests: fix glimagesink element test on OSX
Matthew Waters [Thu, 17 Nov 2016 03:35:26 +0000 (14:35 +1100)]
gl/tests: fix glimagesink element test on OSX

It was suffering a race starting up the thread that could cause the main
loop to quit before the main loop had started.

6 years agomeson: gl/egl: add missing source file
Matthew Waters [Thu, 17 Nov 2016 03:32:10 +0000 (14:32 +1100)]
meson: gl/egl: add missing source file

d42145e8c1ba3bc0445506b92bb7ac04ae98f4dd didn't add the necessary
meson build changes.

6 years agogl/egl: remove EGLImage functions from egl context
Matthew Waters [Wed, 16 Nov 2016 15:41:14 +0000 (02:41 +1100)]
gl/egl: remove EGLImage functions from egl context

By adding the necessary GstEGLImage entry points to create a GstEGLImage
from a GstGLMemory.

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

6 years agoglcontext: add vfunc to retrieve the OpenGL platform version
Matthew Waters [Wed, 16 Nov 2016 14:45:38 +0000 (01:45 +1100)]
glcontext: add vfunc to retrieve the OpenGL platform version

i.e. the version of EGL, GLX, etc implemented.

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

6 years agogl/egl: move get_error_string() into gstegl
Matthew Waters [Wed, 16 Nov 2016 14:38:32 +0000 (01:38 +1100)]
gl/egl: move get_error_string() into gstegl

So others can use it without #include-ing a private header

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

6 years agodisplay/egl: implement getting the EGLDisplay of a specific platform
Matthew Waters [Thu, 27 Nov 2014 04:50:04 +0000 (15:50 +1100)]
display/egl: implement getting the EGLDisplay of a specific platform

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

6 years agogl/egl: check the feature in the extensions list
Víctor Manuel Jáquez Leal [Wed, 16 Nov 2016 12:05:11 +0000 (13:05 +0100)]
gl/egl: check the feature in the extensions list

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

6 years agogl/tests: don't use the default framebuffer
Matthew Waters [Wed, 16 Nov 2016 06:30:54 +0000 (17:30 +1100)]
gl/tests: don't use the default framebuffer

Create our own instead as the default framebuffer may require special
fiddling (like having a visible window) to correctly display/be renderable.

Fixes the remaining GL library tests on OS X

6 years agoglcontext/cocoa: implement empty swap_buffers
Matthew Waters [Wed, 16 Nov 2016 02:39:32 +0000 (13:39 +1100)]
glcontext/cocoa: implement empty swap_buffers

Fixes some GL tests on OS X.

6 years agogl: remove empty BUGS file
Matthew Waters [Wed, 16 Nov 2016 05:41:59 +0000 (16:41 +1100)]
gl: remove empty BUGS file

We use bugzilla for bug tracking

6 years agoglwindow/cocoa: remove unneeded window code in NSWindow
Matthew Waters [Tue, 15 Nov 2016 13:01:00 +0000 (00:01 +1100)]
glwindow/cocoa: remove unneeded window code in NSWindow

This is all taken care of by GstGLWindowCocoa/GstGLNSView now.

6 years agoglwindow/cocoa: remove our view from the parent when closing
Matthew Waters [Tue, 15 Nov 2016 11:56:25 +0000 (22:56 +1100)]
glwindow/cocoa: remove our view from the parent when closing

Otherwise, when the application reuses the same UIView, we were getting
draw notifications on the previous view/layer's which weren't valid anymore
and were referencing pointers that had been freed.

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

6 years agogl/caopengllayer: add a debug category
Matthew Waters [Tue, 15 Nov 2016 10:43:59 +0000 (21:43 +1100)]
gl/caopengllayer: add a debug category

6 years agoglbufferpool: introduce check for GLMemory allocators
Matthew Waters [Tue, 15 Nov 2016 03:36:11 +0000 (14:36 +1100)]
glbufferpool: introduce check for GLMemory allocators

The last missing piece of EGLImage support has been pushed.

6 years agogl: x11-xcb is not a required dependency
Tim-Philipp Müller [Fri, 11 Nov 2016 01:05:55 +0000 (01:05 +0000)]
gl: x11-xcb is not a required dependency

Don't fail if it's not found..

6 years agogl/build: add missing build files
Matthew Waters [Thu, 10 Nov 2016 09:34:53 +0000 (20:34 +1100)]
gl/build: add missing build files

3f7b54988186de17ec4e5b5566074cfaa392819a was incomplete :(

6 years agogl/utils: move gen_shader() to the plugin and remove del_shader()
Matthew Waters [Thu, 10 Nov 2016 08:14:24 +0000 (19:14 +1100)]
gl/utils: move gen_shader() to the plugin and remove del_shader()

gst_gl_context_del_shader() can be replaced by a g_object_unref().
gst_gl_context_gen_shader() should be replaced by using GstGLSLStage.

6 years agoglwindow: remove unused field in public struct
Matthew Waters [Wed, 26 Oct 2016 05:53:27 +0000 (16:53 +1100)]
glwindow: remove unused field in public struct

6 years agoglwindow: remove is_running() function
Matthew Waters [Wed, 26 Oct 2016 05:30:43 +0000 (16:30 +1100)]
glwindow: remove is_running() function

It isn't necessary in correctly written programs.

6 years agomeson/gl: XCB changes also need x11-xcb as a dependency
Nirbheek Chauhan [Tue, 8 Nov 2016 12:20:51 +0000 (17:50 +0530)]
meson/gl: XCB changes also need x11-xcb as a dependency

https://ci.gstreamer.net/job/GStreamer-master-meson/380/console

[...]
gst-libs/gst/gl/x11/xcb_event_source.c:98: undefined reference to `xcb_get_file_descriptor'

6 years agogl/x11: fix meson build
Philippe Normand [Tue, 8 Nov 2016 08:52:48 +0000 (09:52 +0100)]
gl/x11: fix meson build

The x11_event_source.[ch] files were renamed in
4f6c226bd24ae3ef66bd8f4c17b001444c9b0bf1.

6 years agoexamples/gl/qt: fix the examples for the use of newer API
Matthew Waters [Tue, 8 Nov 2016 04:04:29 +0000 (15:04 +1100)]
examples/gl/qt: fix the examples for the use of newer API

gstgl doesn't undo/overwrite what GL state the examples are changing
anymore.  As such, the examples need to reset the GL state themselves
to be able to play nice with libgstgl

6 years agoglfiltershader: expand the docs slightly
Matthew Waters [Tue, 8 Nov 2016 02:35:33 +0000 (13:35 +1100)]
glfiltershader: expand the docs slightly

Add an example OpenGL shader

6 years agoglwindow: remove the navigation thread
Matthew Waters [Thu, 30 Jun 2016 14:31:07 +0000 (00:31 +1000)]
glwindow: remove the navigation thread

This functionality can now effectively be implemented with the display event
thread.

6 years agogl/x11: use xcb instead of libX11
Matthew Waters [Thu, 30 Jun 2016 14:07:23 +0000 (00:07 +1000)]
gl/x11: use xcb instead of libX11

- xcb is supposedly thread-safe!

videotestsrc ! glimagesink now doesn't spuriously result in a
'call XInitThreads()' error however if anybody else is using X11,
then XInitThreads() still needs to be called and multiple glimagesink's
still need XInitThreads().

Everything still takes libX11 handles as they are compatible with the xcb
variants.  Unfortunately we cannot move fully over to xcb due to GLX being
entirely based on Xlib.  It's also impossible to transform a xcb_connection
to a Display which means we require X11 handles.

6 years agogldisplay: add a list of glwindow's
Matthew Waters [Thu, 30 Jun 2016 13:12:33 +0000 (23:12 +1000)]
gldisplay: add a list of glwindow's

With the event thread on the display, for a particular winsys event
we need to be able to retreive the window that the event matches.

6 years agogldisplay: add a dedicated event thread
Matthew Waters [Thu, 30 Jun 2016 13:04:16 +0000 (23:04 +1000)]
gldisplay: add a dedicated event thread

Will take the place of the navigation event thread for dealing with
winsys events.

6 years agogl: don't expose OpenGL prototypes
Matthew Waters [Tue, 8 Nov 2016 01:44:45 +0000 (12:44 +1100)]
gl: don't expose OpenGL prototypes

We roll our own to avoid depending a certain OpenGL header version

6 years agogl/cocoa: don't install the gstglcontext_cocoa.h header
Matthew Waters [Mon, 7 Nov 2016 15:56:44 +0000 (02:56 +1100)]
gl/cocoa: don't install the gstglcontext_cocoa.h header

It's not needed to be exposed

6 years agogl/android: don't install the android window header
Matthew Waters [Mon, 7 Nov 2016 15:52:37 +0000 (02:52 +1100)]
gl/android: don't install the android window header

It's not needed

6 years agogl: add padding to all exposed winsys/platform-specific structs
Matthew Waters [Mon, 7 Nov 2016 15:50:41 +0000 (02:50 +1100)]
gl: add padding to all exposed winsys/platform-specific structs

6 years agogl/wayland: install the gstgldisplay_wayland.h header
Matthew Waters [Mon, 7 Nov 2016 15:47:36 +0000 (02:47 +1100)]
gl/wayland: install the gstgldisplay_wayland.h header

As it is used by other OpenGL sinks (gtkglsink, qmlglsink)

6 years agogl/egl: don't install the gstglcontext_egl.h header
Matthew Waters [Mon, 7 Nov 2016 15:44:30 +0000 (02:44 +1100)]
gl/egl: don't install the gstglcontext_egl.h header

It's not needed to be exposed and there are no users of the API.

6 years agoglfilter: remove display_init/reset
Matthew Waters [Mon, 7 Nov 2016 15:21:20 +0000 (02:21 +1100)]
glfilter: remove display_init/reset

They are mirrors of GstGLBaseFilter's gl_start() and gl_stop() virtual methods
so use them instead.

6 years agogldisplay: Fix inverted precondition
Matthew Waters [Thu, 3 Nov 2016 07:19:58 +0000 (18:19 +1100)]
gldisplay: Fix inverted precondition

A GError argument must either be null or point to a NULL GError.

https://developer.gnome.org/glib/stable/glib-Error-Reporting.html

6 years agogl/gi: some annotation updates for called functions
Matthew Waters [Thu, 3 Nov 2016 05:14:37 +0000 (16:14 +1100)]
gl/gi: some annotation updates for called functions

With scope, closure, destroy annotations

6 years agogl/gi: also include GstVideo
Matthew Waters [Thu, 3 Nov 2016 05:12:32 +0000 (16:12 +1100)]
gl/gi: also include GstVideo

Removes all the unknown type GstVideo* warnings while building the GIR
file.

6 years agoglfeature: move internal functions into a private header
Matthew Waters [Thu, 27 Oct 2016 05:19:04 +0000 (16:19 +1100)]
glfeature: move internal functions into a private header

Don't expose them to the outside world

6 years agogl: GST_GL_TYPE -> GST_TYPE_GL
Matthew Waters [Wed, 5 Oct 2016 01:19:12 +0000 (12:19 +1100)]
gl: GST_GL_TYPE -> GST_TYPE_GL

Some deprecated symbols are kept for backwards compatibility

6 years agogl/docs: massive update
Matthew Waters [Thu, 3 Nov 2016 01:03:24 +0000 (12:03 +1100)]
gl/docs: massive update

- add Since: markers where necessary.
- document structs
- add documentation headers for each module (short_description,
  see_also, etc)
- reduce the number of warnings gtk-doc outputs
- fix spelling mistakes

6 years agogl/docs: document new API added in 1.10
Matthew Waters [Wed, 2 Nov 2016 10:21:33 +0000 (21:21 +1100)]
gl/docs: document new API added in 1.10

GstGLRenderbuffer
GstGLFramebuffer
GstGLQuery
GstEGLImage
GstGLMemoryEGL

6 years agoglsl: fix #version 150 not working with profiles
Matthew Waters [Tue, 1 Nov 2016 06:30:03 +0000 (17:30 +1100)]
glsl: fix #version 150 not working with profiles

The spec allows the core/compatibility profiles to be used
with #version 150.

Also tighten up the tests to check for default profiles being chosen
correctly.

6 years agobuild: Also need to define GST_EXPORTS for Autotools
Nirbheek Chauhan [Fri, 28 Oct 2016 01:47:56 +0000 (07:17 +0530)]
build: Also need to define GST_EXPORTS for Autotools

The change to use GST_EXPORT for symbols under Windows requires
GST_EXPORTS for internal use, and that is also needed under Autotools.
The same thing is done for gstreamer-1.0.dll in -core.

6 years agogstgl: Re-enable WINAPI on _MSC_VER
Nirbheek Chauhan [Fri, 28 Oct 2016 00:53:02 +0000 (06:23 +0530)]
gstgl: Re-enable WINAPI on _MSC_VER

The calling convention may be deprecated, but we still need it for
OpenGL. The build issue was caused by an incorrect syntax being used for
the WINAPI (__stdcall) prototype in function pointers which was accepted
by GCC but is rejected by MSVC.

6 years agoplugins: Use explicit type conversion from enums
Nirbheek Chauhan [Thu, 27 Oct 2016 03:55:20 +0000 (09:25 +0530)]
plugins: Use explicit type conversion from enums

MSVC warns about this because it's a C++ compiler, and this actually
results in useful things such as the incorrect 'gboolean' return value
for functions that return GstFlowReturn, so let's do explicit
conversions to reduce the noise and increase its efficacy.

6 years agoExplicitly define float constants as float
Nirbheek Chauhan [Thu, 27 Oct 2016 03:41:26 +0000 (09:11 +0530)]
Explicitly define float constants as float

With MSVC, this gives the following warning:

warning C4305: 'function': truncation from 'double' to 'gfloat'

Apparently, MSVC does not figure out what type to use for constants
based on the assignment. This warning is very spammy, so let's try to
fix it.

6 years agoFix incorrect return type in several functions
Nirbheek Chauhan [Thu, 27 Oct 2016 03:38:41 +0000 (09:08 +0530)]
Fix incorrect return type in several functions

All these should return GstFlowReturn, not gboolean

6 years agogstgl: Add GST_EXPORT to all symbols used on Windows
Nirbheek Chauhan [Thu, 27 Oct 2016 02:47:58 +0000 (08:17 +0530)]
gstgl: Add GST_EXPORT to all symbols used on Windows

This is a requirement for those symbols to be exported in gstgl-1.0.dll
when building with the MSVC compiler

6 years agomeson: Add support for building WGL on Windows
Nirbheek Chauhan [Thu, 27 Oct 2016 01:59:36 +0000 (07:29 +0530)]
meson: Add support for building WGL on Windows

Currently only tested with MSVC.

6 years agoext/gl: Don't define boolean on Windows with MSVC
Nirbheek Chauhan [Thu, 27 Oct 2016 03:40:03 +0000 (09:10 +0530)]
ext/gl: Don't define boolean on Windows with MSVC

The headers we include already define boolean on Windows with MSVC, and
it leads to a typedef redefinition error with jpeglib.h which tries to
redefine it in jmorecfg.h

6 years agogstgl: Porting fixes for MSVC with Meson
Nirbheek Chauhan [Thu, 27 Oct 2016 02:00:19 +0000 (07:30 +0530)]
gstgl: Porting fixes for MSVC with Meson

GL/gl.h needs windows.h on MSVC

WINAPI should not be used with MSVC. It also causes a build error.

6 years agoglsyncmeta: don't glFinish() everytime a sync point is set
Matthew Waters [Fri, 21 Oct 2016 02:10:47 +0000 (13:10 +1100)]
glsyncmeta: don't glFinish() everytime a sync point is set

At minimum, we only need to glFlush() if we are in a shared GL context
environment.  Move the glFinish() to when the actual wait is requested
which may be never.  Improves the throughput on older GL systems without
GL3/GLES3 and/or fence sync objects.

6 years agomeson: gl: add support for building with dispmanx on the rpi
Matthew Waters [Wed, 19 Oct 2016 05:11:58 +0000 (16:11 +1100)]
meson: gl: add support for building with dispmanx on the rpi

6 years agogl/eglimage: Fix passing the destroy function to gst_egl_image_new_wrapped
Matthew Waters [Tue, 18 Oct 2016 11:29:19 +0000 (22:29 +1100)]
gl/eglimage: Fix passing the destroy function to gst_egl_image_new_wrapped

The function pointer and the user data arguments were swapped in both
uses.

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

6 years agoImplemented gst_video_overlay_set_window_handle()
Munez [Tue, 11 Oct 2016 11:36:23 +0000 (17:06 +0530)]
Implemented gst_video_overlay_set_window_handle()

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

6 years agomeson: gl: fix detection of glx without gl
Matthew Waters [Tue, 18 Oct 2016 03:11:26 +0000 (14:11 +1100)]
meson: gl: fix detection of glx without gl

We need to check for libGL if we may use desktop OpenGL *or* GLX.

6 years agomeson: gl: fix incorrect error string
Matthew Waters [Tue, 18 Oct 2016 03:10:32 +0000 (14:10 +1100)]
meson: gl: fix incorrect error string

Use the winsys variable for an incorrect winsys provided

6 years agogl/dispmanx: egl_show should resize the window only if there is no render rectangle set
Munez [Tue, 11 Oct 2016 11:28:48 +0000 (16:58 +0530)]
gl/dispmanx: egl_show should resize the window only if there is no render rectangle set

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

6 years agogl/dispmanx: Fix set_render_rectangle typo
Munez [Tue, 11 Oct 2016 11:25:17 +0000 (16:55 +0530)]
gl/dispmanx: Fix set_render_rectangle typo

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

6 years agoglwindow: don't use g_thread_join() to join the navigation thread
Matthew Waters [Wed, 5 Oct 2016 07:32:09 +0000 (18:32 +1100)]
glwindow: don't use g_thread_join() to join the navigation thread

Using g_thread_join() in _finalize() handlers may result in a deadlock
joining the current thread when the last reference is held by a signal
handler.

e.g.:

error 'Resource deadlock avoided' during 'pthread_join (pt->system_thread, NULL)'

The backtrace looks like this:
[...]
g_thread_join ()
gst_gl_window_finalize ()
gst_gl_window_x11_finalize ()
g_object_unref ()
g_value_unset ()
g_signal_emit_valist ()
g_signal_emit ()
gst_gl_window_send_mouse_event ()
gst_gl_window_mouse_event_cb ()
g_main_dispatch ()
[..]
g_main_loop_run ()
gst_gl_window_navigation_thread ()
g_thread_proxy ()
start_thread ()
clone ()

6 years agogluploadelement: fix leak of upload library object
Matthew Waters [Wed, 5 Oct 2016 07:28:48 +0000 (18:28 +1100)]
gluploadelement: fix leak of upload library object

When only linking the element, the upload object will be created from
_transform_caps() but will never be unreffed as the only case is in _stop().

Add an unref if non-NULL to a new finalize handler for this case.

6 years agotests/gl: make sure all GL commands are executed on the GL thread
Matthew Waters [Thu, 29 Sep 2016 01:45:57 +0000 (11:45 +1000)]
tests/gl: make sure all GL commands are executed on the GL thread

e.g. the final glGetError() must also be completed on the GL thread

6 years agogl/win32: remove egl implementation
Matthew Waters [Wed, 28 Sep 2016 08:04:21 +0000 (18:04 +1000)]
gl/win32: remove egl implementation

It hasn't been used in ages and is dead code.

6 years agogl/dispmanx: Implements set_render_rectangle to adjust the position of window
Gwang Yoon Hwang [Thu, 5 May 2016 06:53:57 +0000 (15:53 +0900)]
gl/dispmanx: Implements set_render_rectangle to adjust the position of window

We cannot set the x, y coordinate of the video frame at the dispmanx at
this point. We need to teach dispmanx backend to understand about
set_render_rectangle API to draw a video with other UI.

This patch keeps the current behavior which places video frame at the
center of the display if there is no set_render_rectangle call to the
dispmanx window.

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

6 years agogl: add necessary padding bytes to all public structs
Matthew Waters [Wed, 28 Sep 2016 05:20:25 +0000 (15:20 +1000)]
gl: add necessary padding bytes to all public structs

6 years agogldisplay: also free the GWeakRef when removing dead contexts
Matthew Waters [Thu, 22 Sep 2016 08:19:36 +0000 (18:19 +1000)]
gldisplay: also free the GWeakRef when removing dead contexts

Otherwise we leak GWeakRef's.

Found with make -C tests/check libs/gstglcontext.valgrind

6 years agoglcolorbalance: reconfigure on passthrough changes
Matthew Waters [Mon, 19 Sep 2016 06:54:43 +0000 (16:54 +1000)]
glcolorbalance: reconfigure on passthrough changes

Fixes an assertion when moving from passthrough to non-passthrough

Without an explicit reconfigure, glfiter won't have created the GL
resources such as the FBO, GL bufferpool, etc and basetransform will
allocate sysmem buffers instead.

6 years agomeson/gl: use separate deps for gl and glx
Matthew Waters [Fri, 9 Sep 2016 13:24:01 +0000 (23:24 +1000)]
meson/gl: use separate deps for gl and glx

e.g. passing with_gl_api=gles2 would still build the glx code but not be
linking against the libGL library which is where the glX* functions are
located and would result in a linker error.

Solved by checking for the libGL library if either opengl or glx may be
needed and then disabling the corresponding deps as requested.

6 years agomeson: add some starting build files for GL
Matthew Waters [Fri, 9 Sep 2016 01:08:53 +0000 (11:08 +1000)]
meson: add some starting build files for GL

Currently only works on linux with egl/glx + wayland/x11 but the general
principals have been layed out for adding the other GL platforms/winsys'.

6 years agogl/examples: Really remove references to $(GST_PLUGINS_GL_*).
Alistair Buxton [Wed, 7 Sep 2016 19:11:55 +0000 (20:11 +0100)]
gl/examples: Really remove references to $(GST_PLUGINS_GL_*).

These seem to have been missed in the previous commit to this file.

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

6 years agogl: Remove duplicate GL_CFLAGS in Makefile.am.
Alistair Buxton [Wed, 7 Sep 2016 19:07:26 +0000 (20:07 +0100)]
gl: Remove duplicate GL_CFLAGS in Makefile.am.

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

6 years agoglupload: create the GstGLUpload object in ::transform_caps
Alessandro Decina [Mon, 5 Sep 2016 04:44:24 +0000 (14:44 +1000)]
glupload: create the GstGLUpload object in ::transform_caps

Previously it was created in the init function and destroyed in ::stop, which
lead to segfaults when reusing the element.

Now the upload object is created in ::transform_caps if it is NULL, which is the
earliest we need it. The other vfuncs already bail out if the upload object is
NULL, which means that negotiation wasn't done.

6 years agogl: Remove extra duplicate typedef of GstGLFramebuffer
Jan Schmidt [Tue, 30 Aug 2016 18:26:43 +0000 (04:26 +1000)]
gl: Remove extra duplicate typedef of GstGLFramebuffer

It's triggering a warning building git master on OSX

6 years agotests/glupload: support opengl3 properly instead of spewing GL errors
Matthew Waters [Mon, 29 Aug 2016 06:57:42 +0000 (16:57 +1000)]
tests/glupload: support opengl3 properly instead of spewing GL errors

6 years agogl/pkgconfig: add the lib include dir to the list of includes
Matthew Waters [Mon, 29 Aug 2016 06:52:44 +0000 (16:52 +1000)]
gl/pkgconfig: add the lib include dir to the list of includes

714d8aa in core removed this include dir from it's pkgconfig file.

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

6 years agoglupload: fix tests and check for the new RECONFIGURE behaviour
Alessandro Decina [Mon, 29 Aug 2016 05:43:10 +0000 (15:43 +1000)]
glupload: fix tests and check for the new RECONFIGURE behaviour

The tests were broken since 91fea30, which changed glupload to return
GST_GL_UPLOAD_RECONFIGURE if the texture target in the input buffers doesn't
match the texture-target configured in the output caps.

This commit fixes that and adds more checks for the new behaviour.

6 years agogstglupload: make the GLMemoryUpload method output the correct texture-target
Alessandro Decina [Mon, 22 Aug 2016 07:18:27 +0000 (17:18 +1000)]
gstglupload: make the GLMemoryUpload method output the correct texture-target

Now when used with video/x-raw as input, the GLMemoryUpload method checks for
->tex_target in input GLMemory(es) and sets the output texture-target
accordingly.

Fixes video corruption with a pipeline like avfvideosrc ! video/x-raw !
glimagesink where on macos avfvideosrc pushes RECTANGLE textures but glupload
was configuring texture-target=2D as output.

6 years agogl: Update glvideomixer doc
Jan Schmidt [Thu, 25 Aug 2016 16:07:27 +0000 (02:07 +1000)]
gl: Update glvideomixer doc

6 years agogl: Add/update docs for glviewconvert, glstereomix
Jan Schmidt [Thu, 25 Aug 2016 16:06:00 +0000 (02:06 +1000)]
gl: Add/update docs for glviewconvert, glstereomix

Add some example pipelines for glstereomix, and fix up
the example pipelines for glviewconvert

6 years agoglstereomix: Fix caps negotiation
Jan Schmidt [Thu, 25 Aug 2016 14:29:34 +0000 (00:29 +1000)]
glstereomix: Fix caps negotiation

The videoaggregator negotiation sequence changed some time
back and broke glstereomix. Instead of doing nego incorrectly
in the find_best_format() vfunc, do it directly in the
update_caps() method.

6 years agoglviewconvert: Fix texture target fixation
Jan Schmidt [Thu, 25 Aug 2016 05:26:49 +0000 (15:26 +1000)]
glviewconvert: Fix texture target fixation

Don't set the chosen texture-target into the wrong structure.
The input caps may not be writable, and in any case - the
intention was to configure the othercaps. Also, remove an
extra unref - the othercaps ref is consumed by
gst_caps_make_writable already.

6 years agoglvideoflip: implement GstVideoDirection interface
Xabier Rodriguez Calvar [Tue, 26 Jul 2016 17:55:13 +0000 (19:55 +0200)]
glvideoflip: implement GstVideoDirection interface

It implements now this interface with its video-direction
property. Values are changed to GstVideoOrientationMethod but they have
the same value than the originals.

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

6 years agoAdd support for Meson as alternative/parallel build system
Nirbheek Chauhan [Fri, 12 Aug 2016 15:51:45 +0000 (21:21 +0530)]
Add support for Meson as alternative/parallel build system

https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Matej Knopp <matej.knopp@gmail.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.

6 years agogltransformation: rewrite the inverse transformation logic
Matthew Waters [Fri, 19 Aug 2016 05:35:49 +0000 (15:35 +1000)]
gltransformation: rewrite the inverse transformation logic

It now returns the correct values for both orthographic and perspective
projections and takes into account the aspect ratio of the video, handles
the Y-flipping in GL and by us and uses some more helpers from graphene.

6 years agoglwindow: marshal gst_gl_window_resize through the window loop
Matthew Waters [Fri, 1 Jul 2016 06:18:55 +0000 (16:18 +1000)]
glwindow: marshal gst_gl_window_resize through the window loop

saves having every caller do it themselves.

6 years agogl/wayland: use multi-threaded safe event wayland API
Matthew Waters [Thu, 30 Jun 2016 13:06:43 +0000 (23:06 +1000)]
gl/wayland: use multi-threaded safe event wayland API

Multiple threads may be accessing the wayland fd at the same time which
requires the use of special wayland API to deal with to ensure nobody
will steal reads and cause a stall for anyone else.

6 years agogl/examples/fxtest: fix up for wayland support
Matthew Waters [Thu, 30 Jun 2016 14:15:55 +0000 (00:15 +1000)]
gl/examples/fxtest: fix up for wayland support

- Pass the wayland display to gst
- Redrawing on resize is no longer needed.

6 years agogl/egl: fix inverted typedef
Matthew Waters [Tue, 16 Aug 2016 10:33:21 +0000 (20:33 +1000)]
gl/egl: fix inverted typedef

2b6841d had an inverted typedef defining ginptr and EGLAttrib.  Fix that.

6 years agogl/build: add configure check for possibly missing EGLAttrib
Matthew Waters [Tue, 16 Aug 2016 06:51:02 +0000 (16:51 +1000)]
gl/build: add configure check for possibly missing EGLAttrib

Fixes the build on older android targets.

6 years agogl/egl/dmabuf: Wrong attribute list type for EGL 1.5
Song Bing [Wed, 13 Jul 2016 09:15:44 +0000 (17:15 +0800)]
gl/egl/dmabuf: Wrong attribute list type for EGL 1.5

For EGL 1.5 spec, the attribute list type should be EGLAttrib.

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

6 years agoglcontext: fix race joining thread on finalize
Vincent Penquerc'h [Mon, 15 Aug 2016 15:14:25 +0000 (16:14 +0100)]
glcontext: fix race joining thread on finalize

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

6 years agoglcolorconvert: add missing rgb16 and bgr16 video formats in switch
Matthew Waters [Thu, 4 Aug 2016 13:14:41 +0000 (23:14 +1000)]
glcolorconvert: add missing rgb16 and bgr16 video formats in switch

Fixes an assertion that code should not be reached

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

6 years agoglwindow: Fix glimagesink cannot show frame when connect to qmlglsrc
Haihua Hu [Wed, 27 Jul 2016 02:55:01 +0000 (10:55 +0800)]
glwindow: Fix glimagesink cannot show frame when connect to qmlglsrc

When connect to qmlglsrc, x11 event loop will be replace by qt event loop
which will cause the window cannot receive event from xserver, such as resize

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

6 years agoglupload: Use bufferpool to allocate new buffer in GLTextureUploadMeta
Hyunjun Ko [Tue, 2 Aug 2016 08:21:20 +0000 (17:21 +0900)]
glupload: Use bufferpool to allocate new buffer in GLTextureUploadMeta

To improve performace of upload with GLTextureUploadMeta,
use bufferpool instead of allocating new buffer every time.

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