platform/upstream/gstreamer.git
6 years agoglcontext: add public swap_buffers function
Matthew Waters [Sun, 21 May 2017 10:03:01 +0000 (12:03 +0200)]
glcontext: add public swap_buffers function

That simply calls the implementation

6 years agoexamples: gl: remove ancient bitrotten .vcproj files
Tim-Philipp Müller [Sun, 21 May 2017 09:57:18 +0000 (10:57 +0100)]
examples: gl: remove ancient bitrotten .vcproj files

6 years agoaggregator: add simple support for caps handling
Matthew Waters [Sat, 20 May 2017 12:24:57 +0000 (14:24 +0200)]
aggregator: add simple support for caps handling

Modelled off the videoaggregator caps handling as that seems the most
mature aggregtor-using implementation that has caps handling there is.

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

6 years agoglcontext: keep a ref to the active thread
fvanzile [Thu, 23 Feb 2017 23:42:08 +0000 (15:42 -0800)]
glcontext: keep a ref to the active thread

With the macOS/iOS implementations, the active thread can change
multiple times over the life of a pipeline which would expose a race in
the thread tracking.

Fix by taking a ref on the active thread while the context is active.

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

6 years agoexamples: fix macOS 9.12 deprecation warnings
Josep Torra [Sat, 20 May 2017 10:34:27 +0000 (12:34 +0200)]
examples: fix macOS 9.12 deprecation warnings

Add #defines to allow older versions of macOS to use the new constant names.

6 years agococoa: fix a recently introduced typo
Josep Torra [Sat, 20 May 2017 10:19:08 +0000 (12:19 +0200)]
cocoa: fix a recently introduced typo

Fixes gstgldisplay_cocoa.m:175:26: error: use of undeclared identifier 'singletone'.

6 years agococoa: fix macOS 10.12 deprecation warnings
Josep Torra [Sat, 20 May 2017 10:16:50 +0000 (12:16 +0200)]
cocoa: fix macOS 10.12 deprecation warnings

Add #defines to allow older versions of macOS to use the new constant names.

6 years agoglformat: Add missing GST_GL_RGB565 in some switch statement
Haihua Hu [Wed, 17 May 2017 08:26:38 +0000 (16:26 +0800)]
glformat: Add missing GST_GL_RGB565 in some switch statement

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

6 years agococoa: Install gstgldisplay_cocoa.h
Sebastian Dröge [Wed, 17 May 2017 14:38:01 +0000 (17:38 +0300)]
cocoa: Install gstgldisplay_cocoa.h

It's needed by e.g. qmlglsink.

6 years agogst: Clear floating flag in constructor of all GstObject subclasses that are not...
Sebastian Dröge [Mon, 15 May 2017 17:31:31 +0000 (20:31 +0300)]
gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent

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

6 years agoRemove plugin specific static build option
Nicolas Dufresne [Tue, 16 May 2017 18:05:52 +0000 (14:05 -0400)]
Remove plugin specific static build option

Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.

6 years agoglshader: Make reference counting of attach() consistent
Sebastian Dröge [Mon, 15 May 2017 09:00:50 +0000 (12:00 +0300)]
glshader: Make reference counting of attach() consistent

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

6 years agobuild/gl/meson: check for GLES3/gl3ext.h existence
Matthew Waters [Thu, 11 May 2017 10:05:24 +0000 (20:05 +1000)]
build/gl/meson: check for GLES3/gl3ext.h existence

791e7522ebcb75beb31fcace271dee1342d3505d for meson

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

6 years agobuild: Check for GLES3/gl3ext.h existence
Jens Georg [Thu, 11 May 2017 08:29:58 +0000 (10:29 +0200)]
build: Check for GLES3/gl3ext.h existence

Some OpenGL drivers do not ship this but use GLES2/gl2ext.h instead.
This is also in line with Khronos's recommendations

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

6 years agoglmemory: Only use glDrawBuffer if available
Sebastian Dröge [Tue, 9 May 2017 09:25:20 +0000 (11:25 +0200)]
glmemory: Only use glDrawBuffer if available

Otherwise fall back to glDrawBuffers. Also check if glReadBuffer exists
before using it.

glDrawBuffer does not exist for GLES, only glDrawBuffers does.

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

6 years agoglvideomixer: fix whole example launch line actually
Tim-Philipp Müller [Sun, 7 May 2017 10:47:40 +0000 (11:47 +0100)]
glvideomixer: fix whole example launch line actually

6 years agoglvideomixer: remove extraneous \ from example launch line in docs
Tim-Philipp Müller [Sun, 7 May 2017 10:41:06 +0000 (11:41 +0100)]
glvideomixer: remove extraneous \ from example launch line in docs

6 years agoglupload: passthrough composition caps features in directviv upload
Haihua Hu [Tue, 2 May 2017 05:24:30 +0000 (13:24 +0800)]
glupload: passthrough composition caps features in directviv upload

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

6 years agodocs: Port all docstring to gtk-doc markdown
Thibault Saunier [Wed, 8 Mar 2017 18:01:13 +0000 (15:01 -0300)]
docs: Port all docstring to gtk-doc markdown

6 years agodocs: Stop linking to inexistant symbols
Thibault Saunier [Wed, 12 Apr 2017 12:35:16 +0000 (09:35 -0300)]
docs: Stop linking to inexistant symbols

6 years agomeson: add missing gstglrenderbuffer.h header
Claudio Saavedra [Tue, 11 Apr 2017 12:46:19 +0000 (15:46 +0300)]
meson: add missing gstglrenderbuffer.h header

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

6 years agomeson: gl: set default value of 0 for glconf vars
Scott D Phillips [Fri, 7 Apr 2017 19:19:27 +0000 (12:19 -0700)]
meson: gl: set default value of 0 for glconf vars

meson's configure_file emits only a comment like /* #undef ... */
for values which are unset in the configuration_data. For
gstglconfig.h, this differs from the autotools build where the
preprocessor definitions are always either 0 or 1. So loop over a
list of variables to set to zero as default.

Also sync up the gstglconfig.h.meson file with the additional
macros defined by the autotools build.

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

6 years agoglcontext: fix display leak
Vincent Penquerc'h [Fri, 7 Apr 2017 09:30:09 +0000 (10:30 +0100)]
glcontext: fix display leak

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

6 years agogldisplay: fix list leak
Vincent Penquerc'h [Fri, 7 Apr 2017 09:24:19 +0000 (10:24 +0100)]
gldisplay: fix list leak

Windows aren't always removed in time, and it turns out to be
very, very hard to remove a window in a way that's not racy and
not deadlocky. Since the window itself doesn't leak, freeing
the list on object destruction is enough.

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

6 years agogl: Remove duplicate typedef of GstGLFramebufferClass
Jan Schmidt [Sat, 8 Apr 2017 11:28:58 +0000 (21:28 +1000)]
gl: Remove duplicate typedef of GstGLFramebufferClass

The GstGLFramebufferClass struct is typedeffed in
gstgl_fwd.h, and having a duplicate elsewhere is
breaking the cerbero build on my OSX machine,
even though it seems to be working in CI.

6 years agoglwindow/cocoa: fix warnings reported by XCode 8.1.0
Josep Torra [Sat, 1 Apr 2017 14:49:15 +0000 (16:49 +0200)]
glwindow/cocoa: fix warnings reported by XCode 8.1.0

gstglwindow_cocoa.m:345:16: error: unused variable 'window' [-Werror,-Wunused-variable]
  GstGLWindow *window = GST_GL_WINDOW (window_cocoa);
               ^
gstglwindow_cocoa.m:445:11: error: unused variable 'external_view' [-Werror,-Wunused-variable]
  NSView *external_view = (__bridge NSView *)priv->external_view;
          ^

6 years agogldisplay: Fix assert caused by missing debug category
Nicolas Dufresne [Thu, 30 Mar 2017 03:45:21 +0000 (23:45 -0400)]
gldisplay: Fix assert caused by missing debug category

6 years agogl/format: correct return enums in gst_gl_format_from_video_info
Scott D Phillips [Tue, 14 Mar 2017 21:18:17 +0000 (14:18 -0700)]
gl/format: correct return enums in gst_gl_format_from_video_info

In commit

> 956c4d0 gl/format: use our own GL format enum's instead of gstvideo's

the name and return type of gst_gl_format_from_video_info changed,
but some returns of the old type were missed. Here they are
updated to the correct type.

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

6 years agoglupload: adjust memory offset calculation for dmabuf buffers
George Kiagiadakis [Mon, 13 Mar 2017 13:48:33 +0000 (15:48 +0200)]
glupload: adjust memory offset calculation for dmabuf buffers

The data in the dmabuf fd may not start from byte 0, therefore
we need to inform EGL about this additional offset.

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

6 years agogl: GL_ARRAY_BUFFER is not a part of VAO state
Matthew Waters [Tue, 14 Mar 2017 03:15:00 +0000 (14:15 +1100)]
gl: GL_ARRAY_BUFFER is not a part of VAO state

As a result we need to bind it on every draw in order to have the
correct state in the GL state machine.

6 years agogl/format: use our own GL format enum's instead of gstvideo's
Matthew Waters [Mon, 13 Mar 2017 03:28:47 +0000 (14:28 +1100)]
gl/format: use our own GL format enum's instead of gstvideo's

They can describe in more detail (such as component sizes) the requested format.

6 years agoglupload: fix GValue leak
Vincent Penquerc'h [Fri, 10 Mar 2017 16:57:51 +0000 (16:57 +0000)]
glupload: fix GValue leak

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

6 years agoapplemedia/gl: Fix compile issues for OSX
Nick Kallen [Wed, 8 Mar 2017 13:16:43 +0000 (14:16 +0100)]
applemedia/gl: Fix compile issues for OSX

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

6 years agogl/eagl: It's -fobjc-arc not -fobj-arc
Sebastian Dröge [Wed, 8 Mar 2017 13:13:45 +0000 (15:13 +0200)]
gl/eagl: It's -fobjc-arc not -fobj-arc

6 years agoapplemedia/gl: Update code to use ARC
Nick Kallen [Fri, 3 Feb 2017 13:46:39 +0000 (14:46 +0100)]
applemedia/gl: Update code to use ARC

All code interacting with Objective-C objects should now use Automated
Reference Counting rather than manual memory management or Garbage
Collection. Because ARC prohibits C-structs from containing
references to Objective-C objects, all such fields are now typed
'gpointer'. Setting and gettings Objective-C fields on such a
struct now uses explicit __bridge_* calls to tell ARC about
object lifetimes.

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

6 years agogl: Missed one backwards compat define in GST_GL_TYPE_CONTEXT
Arun Raghavan [Mon, 6 Mar 2017 12:21:32 +0000 (17:51 +0530)]
gl: Missed one backwards compat define in GST_GL_TYPE_CONTEXT

Continued from 296b4251e3042fe95a9cce1ad7674b708ba92599

6 years agogl: Fixup for last commit
Sebastian Dröge [Sat, 4 Mar 2017 09:47:04 +0000 (11:47 +0200)]
gl: Fixup for last commit

6 years agogl: Fix backwards compat GST_GL_TYPE_* functions/macros
Sebastian Dröge [Sat, 4 Mar 2017 09:15:58 +0000 (11:15 +0200)]
gl: Fix backwards compat GST_GL_TYPE_* functions/macros

These have to be macros instead of inline function as they must behave
more or less like an integer literal, i.e. include the function call.

6 years agogl/viv-fb: Don't use deprecated symbols and make macros more consistent
Sebastian Dröge [Sat, 4 Mar 2017 09:09:39 +0000 (11:09 +0200)]
gl/viv-fb: Don't use deprecated symbols and make macros more consistent

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

6 years agogltestsrc: Fix potential NULL pointer dereference if we fail without GError
Sebastian Dröge [Tue, 28 Feb 2017 13:22:43 +0000 (15:22 +0200)]
gltestsrc: Fix potential NULL pointer dereference if we fail without GError

Which can happen here if we just propagate an error that happened
elsewhere, e.g. FBO failed.

CID 1364604

6 years agoglvideomixer/compositor: Correctly error out if calculating DAR fails
Sebastian Dröge [Tue, 28 Feb 2017 11:06:41 +0000 (13:06 +0200)]
glvideomixer/compositor: Correctly error out if calculating DAR fails

CID 1320700

6 years agoglcolorconvert: Check return value of gst_gl_context_check_framebuffer_status()
Sebastian Dröge [Tue, 28 Feb 2017 10:34:30 +0000 (12:34 +0200)]
glcolorconvert: Check return value of gst_gl_context_check_framebuffer_status()

CID 1401588

6 years agogl: Add viv-fb to DIST_SUBDIRS to fix "make distcheck"
Sebastian Dröge [Tue, 28 Feb 2017 10:31:54 +0000 (12:31 +0200)]
gl: Add viv-fb to DIST_SUBDIRS to fix "make distcheck"

6 years agogl: Rename gst_gl_get_affine_transformation_meta_as_ndc_ext() to prevent symbol conflict
Sebastian Dröge [Tue, 28 Feb 2017 08:53:04 +0000 (10:53 +0200)]
gl: Rename gst_gl_get_affine_transformation_meta_as_ndc_ext() to prevent symbol conflict

The same symbol also exists in libgstgl, although marked as private and
internal. This has no effect when doing static linking and there's a
symbol conflict.

6 years agoglutils: Mark private functions as G_GNUC_INTERNAL
Sebastian Dröge [Tue, 28 Feb 2017 08:50:23 +0000 (10:50 +0200)]
glutils: Mark private functions as G_GNUC_INTERNAL

6 years agoglupload: Add support for Vivante DirectTexture uploads
Sebastian Dröge [Wed, 22 Feb 2017 12:55:58 +0000 (14:55 +0200)]
glupload: Add support for Vivante DirectTexture uploads

Together with the upcoming gstreamer-imx patch, this allows zerocopy
between imxvpudec and other elements and glimagesink.

This is losely based on a patch by Haihua Hu <b55597@freescale.com>
from https://github.com/Freescale/meta-freescale/blob/master/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/

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

6 years agogl: Add support for Vivante EGL FB windowing system
Sebastian Dröge [Fri, 17 Feb 2017 10:24:58 +0000 (12:24 +0200)]
gl: Add support for Vivante EGL FB windowing system

This is very similar to how dispmanx on the Raspberry Pi works.

Based on a patch by Haihua Hu <b55597@freescale.com> from
https://github.com/Freescale/meta-freescale/tree/master/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad

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

6 years agoglmemory: Use glBlitFramebuffer() instead of glCopyTexImage2D() if available
Sebastian Dröge [Wed, 22 Feb 2017 12:09:45 +0000 (14:09 +0200)]
glmemory: Use glBlitFramebuffer() instead of glCopyTexImage2D() if available

glBlitFramebuffer() is new GLES3/GL3 API. They are probably often
implemented in terms of each other, and glBlitFramebuffer() can
potentially be implemented more flexible. Let's use it if available.

Also it actually works on imx6 with DirectVIV textures.

Based on a patch by Haihua Hu <jared.hu@nxp.com> from
https://github.com/Freescale/meta-freescale/blob/master/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/

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

6 years agoconfigure: Remove unused Mali EGL/fbdev_window support
Sebastian Dröge [Thu, 16 Feb 2017 18:08:35 +0000 (20:08 +0200)]
configure: Remove unused Mali EGL/fbdev_window support

This existed a long time ago but there's no actual code for this
anymore.

6 years agoGstGLSinkBin: fixed sink property leak
Juan Pablo Ugarte [Fri, 10 Feb 2017 13:29:49 +0000 (10:29 -0300)]
GstGLSinkBin: fixed sink property leak

No need to keep an extra reference to sink since an indirect one is added by gst_bin_add()

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

6 years agomeson: Build GIR files
Thibault Saunier [Mon, 23 Jan 2017 15:12:06 +0000 (12:12 -0300)]
meson: Build GIR files

6 years agoglmixer: ensure caps are writable after intersection
Matthew Waters [Wed, 18 Jan 2017 04:03:48 +0000 (15:03 +1100)]
glmixer: ensure caps are writable after intersection

gst_caps_intersect () may return an increased reference of one of the
input caps.

Fixes critical in the simple-launch-lines test:

Unexpected critical/warning: gst_caps_set_features: assertion 'IS_WRITABLE (caps)' failed

6 years agogl: update sys dependants for function removals
Matthew Waters [Fri, 13 Jan 2017 01:49:37 +0000 (12:49 +1100)]
gl: update sys dependants for function removals

4315a4b54d9 forgot to change the androidmedia/videotoolbox/caopengllayer
sources as required.

6 years agoglslstage: define GL constants if needed instead of using #ifdef
Juan Pablo Ugarte [Wed, 11 Jan 2017 13:37:34 +0000 (10:37 -0300)]
glslstage: define GL constants if needed instead of using #ifdef

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

6 years agoglutils: document functions
Matthew Waters [Fri, 13 Jan 2017 00:08:10 +0000 (11:08 +1100)]
glutils: document functions

6 years agoglutils: privatise matrix multiplication/videoaffinetransformation retrieval
Matthew Waters [Fri, 13 Jan 2017 00:06:39 +0000 (11:06 +1100)]
glutils: privatise matrix multiplication/videoaffinetransformation retrieval

6 years agogl/utils: also take care of the local GL context in query functions
Matthew Waters [Thu, 12 Jan 2017 10:35:25 +0000 (21:35 +1100)]
gl/utils: also take care of the local GL context in query functions

Simplifies a deduplicates a lot of code in elements retrieving/setting
the local OpenGL context.

6 years agoglutils: remove trivial helper function
Matthew Waters [Wed, 11 Jan 2017 14:57:29 +0000 (01:57 +1100)]
glutils: remove trivial helper function

gst_gl_caps_replace_all_caps_features() is only used in two places and can
be trivially reproduced.

6 years agogl/docs: add symbols from -unused.txt
Matthew Waters [Wed, 11 Jan 2017 05:09:31 +0000 (16:09 +1100)]
gl/docs: add symbols from -unused.txt

6 years agogl/docs: some type fixes of type names
Matthew Waters [Wed, 11 Jan 2017 05:09:03 +0000 (16:09 +1100)]
gl/docs: some type fixes of type names

6 years agoglwindow: use the same parameter names between vfuncs and functions of the same name
Matthew Waters [Tue, 10 Jan 2017 09:07:09 +0000 (20:07 +1100)]
glwindow: use the same parameter names between vfuncs and functions of the same name

Silences GI warnings about symbol's not being used from source code
comment block

6 years agoglbasememory: type fix for GstGLBaseMemoryAllocatorAllocFunction
Matthew Waters [Tue, 10 Jan 2017 09:06:07 +0000 (20:06 +1100)]
glbasememory: type fix for GstGLBaseMemoryAllocatorAllocFunction

6 years agogldisplay: add missing transfer annotations
Matthew Waters [Tue, 10 Jan 2017 09:05:42 +0000 (20:05 +1100)]
gldisplay: add missing transfer annotations

6 years agogl: add skip annotations to non-GI possible struct constructors
Matthew Waters [Tue, 10 Jan 2017 09:04:30 +0000 (20:04 +1100)]
gl: add skip annotations to non-GI possible struct constructors

6 years agoglbasememory: remove unused and #if 0'ed function definitions
Matthew Waters [Tue, 10 Jan 2017 09:03:09 +0000 (20:03 +1100)]
glbasememory: remove unused and #if 0'ed function definitions

6 years agogl: add necessary get_type() functions for allocation params structures
Matthew Waters [Tue, 10 Jan 2017 08:58:48 +0000 (19:58 +1100)]
gl: add necessary get_type() functions for allocation params structures

All using the existing GstGLAllocationParams infrastructure

6 years agogldisplay: some annotation updates/typo fixes
Matthew Waters [Tue, 10 Jan 2017 04:35:52 +0000 (15:35 +1100)]
gldisplay: some annotation updates/typo fixes

6 years agogl: remove reference to non-existant header
Matthew Waters [Tue, 10 Jan 2017 03:29:46 +0000 (14:29 +1100)]
gl: remove reference to non-existant header

../../../../gst-libs/gst/gl/gl.h:57:45: fatal error: gst/gl/gstglcontrolbindingproxy.h: No such file or directory
 #include <gst/gl/gstglcontrolbindingproxy.h>
                                             ^

6 years agogl: remove custom control binding proxy
Matthew Waters [Tue, 10 Jan 2017 01:51:51 +0000 (12:51 +1100)]
gl: remove custom control binding proxy

Use the existing GstProxyControlBinding instead.

6 years agogl/pkg-config: add the configured platform/api/winsys
Matthew Waters [Thu, 17 Nov 2016 06:15:55 +0000 (17:15 +1100)]
gl/pkg-config: add the configured platform/api/winsys

Allows users to query this from pkg-config instead of requiring them to
compile mini programs checking defines in gstglconfig.h

6 years agogl: remove unneeded gst_gl_buffer_alloc from header file
Matthew Waters [Thu, 17 Nov 2016 14:06:51 +0000 (01:06 +1100)]
gl: remove unneeded gst_gl_buffer_alloc from header file

There's no implementation anymore!

6 years agogl/egl: remove use of texture orientation
Matthew Waters [Thu, 17 Nov 2016 07:00:39 +0000 (18:00 +1100)]
gl/egl: remove use of texture orientation

6 years agogl/pkg-config: don't advertise all our dependent libraries as deps
Matthew Waters [Thu, 17 Nov 2016 06:51:54 +0000 (17:51 +1100)]
gl/pkg-config: don't advertise all our dependent libraries as deps

If an application/library explicitly needs a library, it needs to link
against it itself.

6 years agoglcontext/egl: don't overwrite set GError
Matthew Waters [Mon, 9 Jan 2017 14:00:12 +0000 (01:00 +1100)]
glcontext/egl: don't overwrite set GError

Doing so is an error and will cause a glib warning to be printed.

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

6 years agomeson: generate pkg-config -uninstalled pc files
Guillaume Desmottes [Wed, 4 Jan 2017 15:51:10 +0000 (16:51 +0100)]
meson: generate pkg-config -uninstalled pc files

Generating those files is useful for users building the GStreamer stack
using meson and having to link it to another project which is still
using the autotools.

While doing so, fix some -uninstalled pc files which were using a
suspicious 'pcfiledir' which was never replaced or defined.

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

6 years agogl/format: use the unsized format for RGB on GLES2
Matthew Waters [Fri, 16 Dec 2016 14:00:00 +0000 (01:00 +1100)]
gl/format: use the unsized format for RGB on GLES2

In GLES2 GL_RGB8 doesn't exist so we cannot use it, use GL_RGB
instead.

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

6 years agogl/window: remove unused priv variable
Matthew Waters [Thu, 15 Dec 2016 13:22:41 +0000 (00:22 +1100)]
gl/window: remove unused priv variable

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

6 years agogl/window: remove use of main_context_push/pop_thread_default()
Matthew Waters [Wed, 14 Dec 2016 13:59:45 +0000 (00:59 +1100)]
gl/window: remove use of main_context_push/pop_thread_default()

No-one's using/depending on it (it would have criticalled and not worked)
and it's causing more problems than it's solving.  Store the GMainContext
in the public struct instead for subclasses to optionally use instead of
relying on the push/pop state to be correct.

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

6 years agogl/effects: use non-PBO GLMemory for internal textures
Haihua Hu [Wed, 7 Dec 2016 08:51:27 +0000 (16:51 +0800)]
gl/effects: use non-PBO GLMemory for internal textures

middle textures in gleffects do not need to use GstGLMemoryPBO as they
aren't transfering data to/from the GPU. This will cost too much DMA
memory and cause performance issue. Change the allocator to use non-PBO
GstGLMemory.

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

6 years agoglvideomixer: Reject multiview video
Sebastian Dröge [Wed, 14 Dec 2016 13:53:41 +0000 (15:53 +0200)]
glvideomixer: Reject multiview video

glvideomixer does not support it currently and it needs special support
for handling this correctly, and is rather non-trivial to implement for
all formats.

6 years agogst: Don't declare variables inside the for loop header
Sebastian Dröge [Tue, 13 Dec 2016 20:39:01 +0000 (22:39 +0200)]
gst: Don't declare variables inside the for loop header

This is a C99 feature.

6 years agogstglupload: relax EGL context check
Julien Isorce [Thu, 1 Dec 2016 09:24:18 +0000 (09:24 +0000)]
gstglupload: relax EGL context check

Check for GST_GL_PLATFORM_EGL enum instead of type GstGLContextEGL.

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

6 years agogstglcontext: is_shared should return FALSE if no group
Julien Isorce [Wed, 30 Nov 2016 09:22:17 +0000 (09:22 +0000)]
gstglcontext: is_shared should return FALSE if no group

If a sub class of GstGLContext does not create a group
then it currently crashes:

0 g_atomic_int_get (&share->refcount)
1 _context_share_group_is_shared (context->priv->sharegroup)
2 gst_gl_context_is_shared
3 _default_set_sync_gl

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

6 years agoglmemoryegl: remove spurious #if GST_GL_HAVE_DMABUF conditions
Matthew Waters [Wed, 30 Nov 2016 08:26:51 +0000 (19:26 +1100)]
glmemoryegl: remove spurious #if GST_GL_HAVE_DMABUF conditions

8c2118823b3d42840cc6f48cbdc0e1b342f90b80 had some incorrect preprocessor
conditions that aren't actually needed.  Remove them.

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

6 years agoglwindow: move g_main_context_push/pop_thread_default() to run()
Matthew Waters [Mon, 28 Nov 2016 03:22:05 +0000 (14:22 +1100)]
glwindow: move g_main_context_push/pop_thread_default() to run()

Calling g_main_context_push_thread and then g_main_context_invoke()
(used by gst_gl_window_send_message_async()) in the same thread will
cause the invoked function to run immediately instead of being delayed.

This had implications for the creation of the OpenGL context not waiting
until the main loop had completely started up and as a result would
sometimes deadlock in short create/destroy scenarios.

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

6 years agoglcontext: fix race between creation/shutdown
Matthew Waters [Mon, 28 Nov 2016 03:19:18 +0000 (14:19 +1100)]
glcontext: fix race between creation/shutdown

626bcccff96f624f59c5212b3e21e472240171fd removed some locks that
allowed the main loop quit to occur before the context was fully
created.

2776cef25d2a98668b73272aecfe77e684e6627e attempted to readd them but
missed the scop of the quit() call.

Also remove the use of g_thread_join() as that's not safe to use when
it's possible to lose the last reference from the GL thread.

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

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