platform/upstream/gst-plugins-base.git
6 years agogl/meson: detect valid configuration from enabled apis/platform/winsys
Matthew Waters [Wed, 23 Aug 2017 06:32:57 +0000 (16:32 +1000)]
gl/meson: detect valid configuration from enabled apis/platform/winsys

6 years agogl/build: also check for the GL/gl.h header
Matthew Waters [Wed, 23 Aug 2017 06:23:07 +0000 (16:23 +1000)]
gl/build: also check for the GL/gl.h header

In order to successfully build against a detected libGL library we also need headers

6 years agoglutils: fix matrix operations everywhere
Matthew Waters [Thu, 17 Aug 2017 03:46:04 +0000 (13:46 +1000)]
glutils: fix matrix operations everywhere

- correct the matrix multiplication
- Use column-major matrices
  - reverse order of matrix multiplications

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

6 years agogltransformation: draw with GL_TRIANGLES
Matthew Waters [Thu, 17 Aug 2017 03:42:21 +0000 (13:42 +1000)]
gltransformation: draw with GL_TRIANGLES

Drawing 5 vertices with GL_TRIANGLE_STRIP will draw an extra unneeded
triangle.

6 years agogl/cocoa: fix build after commit 2fd84a6c
Philippe Normand [Tue, 22 Aug 2017 15:16:24 +0000 (16:16 +0100)]
gl/cocoa: fix build after commit 2fd84a6c

6 years agogl: fix broken build due to previous commit 2fd84a6c
Julien Isorce [Tue, 22 Aug 2017 11:39:43 +0000 (12:39 +0100)]
gl: fix broken build due to previous commit 2fd84a6c

Can reproduce after installing libgraphene-dev

Also fixes caopengllayersink.h to anticipate build error on osx.

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

6 years agogl: do not include GL headers in public gstgl headers
Julien Isorce [Fri, 7 Jul 2017 15:15:12 +0000 (16:15 +0100)]
gl: do not include GL headers in public gstgl headers

Except for gst/gl/gstglfuncs.h

It is up to the client app to include these headers.
It is coherent with the fact that gstreamer-gl.pc does not
require any egl.pc/gles.pc. I.e. it is the responsability
of the app to search these headers within its build setup.

For example gstreamer-vaapi includes explicitly EGL/egl.h
and search for it in its configure.ac.

For example with this patch, if an app includes the headers
  gst/gl/egl/gstglcontext_egl.h
  gst/gl/egl/gstgldisplay_egl.h
  gst/gl/egl/gstglmemoryegl.h
it will *no longer* automatically include EGL/egl.h and GLES2/gl2.h.
Which is good because the app might want to use the gstgl api only
without the need to bother about gl headers.

Also added a test: cd tests/check && make libs/gstglheaders.check

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

6 years agogldownload: Micro-optimisation. Don't check output caps on every buffer
Jan Schmidt [Mon, 21 Aug 2017 13:49:02 +0000 (06:49 -0700)]
gldownload: Micro-optimisation. Don't check output caps on every buffer

The output caps will only change on a set_caps() call, so check if
they contain the SystemMemory feature then and save some
per-buffer CPU.

6 years agogl: fix build
Tim-Philipp Müller [Mon, 14 Aug 2017 11:12:34 +0000 (12:12 +0100)]
gl: fix build

Include private headers for parent class debug categories.

6 years agogl: add missing new header files
Tim-Philipp Müller [Mon, 14 Aug 2017 09:11:00 +0000 (10:11 +0100)]
gl: add missing new header files

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

6 years agogl: make some debug categories private
Tim-Philipp Müller [Mon, 14 Aug 2017 08:33:38 +0000 (09:33 +0100)]
gl: make some debug categories private

They weren't supposed to be public.

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

6 years agogl: don't export symbols that are not supposed to be public
Tim-Philipp Müller [Fri, 11 Aug 2017 17:38:41 +0000 (18:38 +0100)]
gl: don't export symbols that are not supposed to be public

Make a bunch of symbols private that are currently leaked
accidentally because they have a gst_* prefix and are used
internally. We mark those we can't make static with
G_GNUC_INTERNAL so that they get hidden with the autotools
build as well (although we could just pass -fvisibility=hidden
there too).

6 years agogl: sprinkle more GST_EXPORT
Tim-Philipp Müller [Fri, 11 Aug 2017 13:55:48 +0000 (14:55 +0100)]
gl: sprinkle more GST_EXPORT

6 years agogl, wayland: mark more declared functions with GST_EXPORT
Tim-Philipp Müller [Thu, 10 Aug 2017 08:09:22 +0000 (09:09 +0100)]
gl, wayland: mark more declared functions with GST_EXPORT

6 years agogl: return NULL mem if eglCreateImage failed
Julien Isorce [Tue, 1 Aug 2017 09:21:51 +0000 (10:21 +0100)]
gl: return NULL mem if eglCreateImage failed

Found on rpi when gpu_mem is too low so there is not enough memory to
create the eglimage. But still gst_buffer_pool_acquire_buffer succeeded.
And it leads to a CRITICAL assert:
  gst_egl_image_get_image: assertion 'GST_IS_EGL_IMAGE (image)' failed

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

6 years agogl: document missing GstGLShader functions
Matthew Waters [Fri, 28 Jul 2017 15:58:38 +0000 (16:58 +0100)]
gl: document missing GstGLShader functions

6 years agogl/docs: some documentation updates
Matthew Waters [Fri, 28 Jul 2017 10:00:12 +0000 (11:00 +0100)]
gl/docs: some documentation updates

Add some missing/incomplete docs

6 years agogl/docs: correctly name our objects in the documentation GstGl -> GstGL
Matthew Waters [Wed, 26 Jul 2017 09:04:09 +0000 (19:04 +1000)]
gl/docs: correctly name our objects in the documentation GstGl -> GstGL

6 years agogl/docs: document GstGLFormat enum
Matthew Waters [Wed, 26 Jul 2017 09:03:15 +0000 (19:03 +1000)]
gl/docs: document GstGLFormat enum

6 years agogl: fix g-i annotations for glframebuffer
Tim-Philipp Müller [Fri, 21 Jul 2017 07:43:45 +0000 (08:43 +0100)]
gl: fix g-i annotations for glframebuffer

gstglframebuffer.c:176: Error: GstGL: annotations not supported for tag "Since:".

6 years agomeson: specify fallback for libgmodule_dep
Alessandro Decina [Thu, 20 Jul 2017 07:49:59 +0000 (17:49 +1000)]
meson: specify fallback for libgmodule_dep

Fixes build with glib built as a subproject.

6 years agomeson: Fix GLES2 check
Edward Hervey [Mon, 17 Jul 2017 06:06:22 +0000 (08:06 +0200)]
meson: Fix GLES2 check

On systems without pkg-config, we have the the library present but
not the headers

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

6 years agoglwindow_cocoa: fix video overlay support
Philippe Normand [Sat, 15 Jul 2017 16:25:36 +0000 (17:25 +0100)]
glwindow_cocoa: fix video overlay support

Make sure the window handle is configured after the NSWindow was created.

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

6 years agogl/cocoa: keep refs over async operations
Matthew Waters [Sat, 15 Jul 2017 15:17:04 +0000 (01:17 +1000)]
gl/cocoa: keep refs over async operations

Avoids dereferencing dead objects

What happens in the autovideosink case is that context 1 is created and
destroyed before all the async operations hae executed on the associated
window.  When the delayed operations execute, they then reference dead
objects and crash.

We fix this by keeping refs over all async operations so the object
cannot be deleted while async operations are in flight.

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

6 years agogl/window/x11: implement set_render_rectangle support
Matthew Waters [Fri, 14 Jul 2017 15:24:52 +0000 (01:24 +1000)]
gl/window/x11: implement set_render_rectangle support

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

6 years agopkgconfig: missing GL_CFLAGS in gstreamer-gl-uninstalled.pc.in
Julien Isorce [Fri, 7 Jul 2017 15:33:42 +0000 (16:33 +0100)]
pkgconfig: missing GL_CFLAGS in gstreamer-gl-uninstalled.pc.in

Already present in gstreamer-gl.pc.in

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

6 years agoglfilter: Remove hard-coded pad templates
Jan Schmidt [Thu, 6 Jul 2017 11:09:50 +0000 (21:09 +1000)]
glfilter: Remove hard-coded pad templates

Add a function to install the default RGBA pad templates,
but don't make them required so that there can be
GstGLFilter sub-classes with different input/output
caps if they want. Remove the hard-coded RGBA restriction in
the set_caps_features call, as it will be taken care
of by intersecting with the pad templates.

Update all the sub-classes to match

6 years agoglupload: Don't throw assertions on invalid allocation query
Jan Schmidt [Fri, 7 Jul 2017 04:41:17 +0000 (14:41 +1000)]
glupload: Don't throw assertions on invalid allocation query

basesrc can send an allocation query with no caps, in which
case we should just fail it without throwing assertions.

6 years agoglupload: add GST_CAPS_FEATURE_MEMORY_DMABUF
Julien Isorce [Wed, 9 Mar 2016 22:01:12 +0000 (22:01 +0000)]
glupload: add GST_CAPS_FEATURE_MEMORY_DMABUF

Insert before SystemMemory to advice upstream elements that it is
preferable for them to push dmabuf with the caps feature.

Examples:

/* Discard memory:DMABuf caps feature */
GST_GL_PLATFORM=egl GST_GL_API=gles2 GST_GL_WINDOW=x11 gst-launch-1.0 \
    filesrc location=test.mp4 ! qtdemux ! h264parse ! vaapih264dec ! \
    capsfilter caps="video/x-raw(memory:SystemMemory)" ! glimagesink

/* Force memory:DMABuf caps feature. */
GST_GL_PLATFORM=egl GST_GL_API=gles2 GST_GL_WINDOW=x11 gst-launch-1.0 \
    filesrc location=test.mp4 ! qtdemux ! h264parse ! vaapih264dec ! \
    capsfilter caps="video/x-raw(memory:DMABuf)" ! glimagesink

/* Auto select memory:DMABuf caps feature.  */
GST_GL_PLATFORM=egl GST_GL_API=gles2 GST_GL_WINDOW=x11 gst-launch-1.0 \
    filesrc location=test.mp4 ! qtdemux ! h264parse ! vaapih264dec ! \
    glimagesink

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

6 years agogl: reset gl->DrawBuffer to the necessary values
Matthew Waters [Wed, 28 Jun 2017 04:45:18 +0000 (14:45 +1000)]
gl: reset gl->DrawBuffer to the necessary values

GL_COLOR_ATTACHMENT0 when a framebuffer is bound
GL_BACK if no framebuffer is bound

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

6 years agoglmemory: reset the draw buffer to GL_BACK
Hyunjun Ko [Wed, 28 Jun 2017 03:17:37 +0000 (12:17 +0900)]
glmemory: reset the draw buffer to GL_BACK

The draw buffer should be reset to GL_BACK since the framebuffer is already
unbound.

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

6 years agomeson: Re-add pkg-config support for bcm_host
Nicolas Dufresne [Thu, 22 Jun 2017 14:34:04 +0000 (10:34 -0400)]
meson: Re-add pkg-config support for bcm_host

Now we just fallback to find_library for Rasbian jessy and older.

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

6 years agogl: meson: use cc.find_library() to detect 'bcm_host'
Guillaume Desmottes [Wed, 21 Jun 2017 09:18:43 +0000 (11:18 +0200)]
gl: meson: use cc.find_library() to detect 'bcm_host'

On the raspberry pi no pkg-config file is provided for the bcm_host
library. We are using AC_CHECK_LIB to detect this lib with autotools,
cc.find_library() library is a closer meson equivalent.

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

6 years agogl/cocoa: Put gstglwindow_cocoa.h into noinst_HEADERS again
Sebastian Dröge [Tue, 20 Jun 2017 16:19:51 +0000 (19:19 +0300)]
gl/cocoa: Put gstglwindow_cocoa.h into noinst_HEADERS again

And remove gstgldisplay_cocoa.h instead, which got moved to the
installed headers earlier.

6 years agoglupload: Fix DirectVIV uploader for formats with a single plane
Sebastian Dröge [Mon, 12 Jun 2017 19:29:01 +0000 (22:29 +0300)]
glupload: Fix DirectVIV uploader for formats with a single plane

We have to pass the "height" as height = vmeta->offset[1] / width to the
API, which of course does not work well for formats with only a single
plane. Use the whole memory size instead of the offset in that case.

6 years agogl: Add dependency to gstallocators
Nicolas Dufresne [Mon, 29 May 2017 16:22:17 +0000 (12:22 -0400)]
gl: Add dependency to gstallocators

6 years agoglutils: Fix GValue leak in gst_gl_value_set_texture_target_from_mask()
Jeremy Hiatt [Thu, 1 Jun 2017 01:15:05 +0000 (01:15 +0000)]
glutils: Fix GValue leak in gst_gl_value_set_texture_target_from_mask()

6 years agogl: Fix indentation
Sebastian Dröge [Thu, 25 May 2017 10:06:03 +0000 (13:06 +0300)]
gl: Fix indentation

6 years agoglframebuffer: #define GL_READ_FRAMEBUFFER / GL_DRAW_FRAMEBUFFER if not defined yet
Sebastian Dröge [Thu, 25 May 2017 10:05:23 +0000 (13:05 +0300)]
glframebuffer: #define GL_READ_FRAMEBUFFER / GL_DRAW_FRAMEBUFFER if not defined yet

Just like we do elsewhere already.

6 years agoglformat: fix the usage of GST_GL_RGB565
Haihua Hu [Thu, 25 May 2017 03:05:47 +0000 (11:05 +0800)]
glformat: fix the usage of GST_GL_RGB565

GL_RGB565 is sized internal glformat, the corresponding glformat
should be GL_RGB and type is GL_UNSIGNED_SHORT_565. Otherwise will
return GL_INVALID_ENUM when creating texture.

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

6 years agoglframebuffer: check frame buffer status need use specific fbo target
Haihua Hu [Thu, 25 May 2017 02:09:04 +0000 (10:09 +0800)]
glframebuffer: check frame buffer status need use specific fbo target

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

6 years agogltestsrc: Fix typo (occured->occurred)
Anders Jonsson [Mon, 22 May 2017 11:46:36 +0000 (13:46 +0200)]
gltestsrc: Fix typo (occured->occurred)

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

6 years agoglbasemixer: Remove unused negotiated member
Olivier Crête [Sun, 21 May 2017 16:31:59 +0000 (18:31 +0200)]
glbasemixer: Remove unused negotiated member

This is now all handled in GstAggregator, so this code is not
called anymore.

6 years agogl*mixer: Use propose_allocation from the GstAggregator base class
Olivier Crête [Sun, 21 May 2017 13:30:10 +0000 (15:30 +0200)]
gl*mixer: Use propose_allocation from the GstAggregator base class

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

6 years agogl/viv-fb: Fix user-choice string comparisons
Carlos Rafael Giani [Tue, 9 May 2017 21:59:04 +0000 (23:59 +0200)]
gl/viv-fb: Fix user-choice string comparisons

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

6 years agoglbasemixer: Remove own decide_allocation, use GstAggregator's
Olivier Crête [Sat, 20 May 2017 15:35:43 +0000 (17:35 +0200)]
glbasemixer: Remove own decide_allocation, use GstAggregator's

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

6 years agoglbasemixer: Use aggregator for allocation handling
Olivier Crête [Sat, 20 May 2017 15:30:06 +0000 (17:30 +0200)]
glbasemixer: Use aggregator for allocation handling

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

6 years agovideoaggregator: Get the buffer from the pool if available
Olivier Crête [Sat, 20 May 2017 15:25:16 +0000 (17:25 +0200)]
videoaggregator: Get the buffer from the pool if available

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

6 years agogl: x11: fix compiler warning
Tim-Philipp Müller [Sun, 21 May 2017 10:44:37 +0000 (11:44 +0100)]
gl: x11: fix compiler warning

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