platform/upstream/gst-plugins-base.git
6 years agogl: cocoa: fix formatting for function definition
Philippe Normand [Sat, 30 Dec 2017 12:29:13 +0000 (12:29 +0000)]
gl: cocoa: fix formatting for function definition

This is a follow-up of 5d35e1fa15744b48c406fffa98695478fc8c9969

6 years agogl: cocoa: Implement set_render_rectangle
Philippe Normand [Tue, 26 Dec 2017 13:23:11 +0000 (13:23 +0000)]
gl: cocoa: Implement set_render_rectangle

Resize the internal NSView according to the provided render rectangle.

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

6 years agogl: don't link to system gstallocators
Tim-Philipp Müller [Tue, 26 Dec 2017 14:35:35 +0000 (15:35 +0100)]
gl: don't link to system gstallocators

We already link to the in-tree gstallocators, no need
to link to it again here, which also ends up being the
system gstallocators lib.

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

6 years agomeson: skip translations if gettext is not available
Tim-Philipp Müller [Tue, 26 Dec 2017 12:49:25 +0000 (13:49 +0100)]
meson: skip translations if gettext is not available

6 years agomeson: gl: define HAVE_PNG etc. in config.h instead of c_args
Tim-Philipp Müller [Fri, 22 Dec 2017 21:28:20 +0000 (22:28 +0100)]
meson: gl: define HAVE_PNG etc. in config.h instead of c_args

So that the tests have access to them as well (gl-launch-lines.c)

6 years agortp: fix gst_rtp_buffer_ext_timestamp taking into account backwards
Miguel Paris [Mon, 5 Jun 2017 16:11:42 +0000 (18:11 +0200)]
rtp: fix gst_rtp_buffer_ext_timestamp taking into account backwards

If timestamp goes forwards more than allowed, we consider that the
timestamp belongs to the previous counting, so the extended timestamp
is unwrapped.

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

6 years agotests: add missing comma
Mathieu Duponchelle [Thu, 21 Dec 2017 18:32:03 +0000 (19:32 +0100)]
tests: add missing comma

6 years agotests: conditionally define the glimagesink test as well
Mathieu Duponchelle [Thu, 21 Dec 2017 18:28:00 +0000 (19:28 +0100)]
tests: conditionally define the glimagesink test as well

Forgotten in previous commit

6 years agotests: fix build when not building gstgl
Mathieu Duponchelle [Thu, 21 Dec 2017 18:24:20 +0000 (19:24 +0100)]
tests: fix build when not building gstgl

gstgl_dep is only defined when build_gstgl is true

6 years agomeson: docs: link gtk-doc scanner with gstgl
Tim-Philipp Müller [Wed, 20 Dec 2017 23:47:33 +0000 (23:47 +0000)]
meson: docs: link gtk-doc scanner with gstgl

6 years agogl: fix build if libjpeg is not available
Tim-Philipp Müller [Wed, 20 Dec 2017 16:01:38 +0000 (16:01 +0000)]
gl: fix build if libjpeg is not available

If libjpeg is not available, leave HAVE_JPEG undefined in
config.h, instead of defining it to 0. Fixes mismatch between
autotools conditional and ifdefs in the code.

6 years agogl: fix up a few more #if HAVE_FOO
Tim-Philipp Müller [Tue, 19 Dec 2017 16:51:24 +0000 (16:51 +0000)]
gl: fix up a few more #if HAVE_FOO

error: "HAVE_PNG" is not defined, evaluates to 0 [-Werror=undef]

6 years agoautotools: gl: don't check for gstreamer-allocators via pkg-config
Tim-Philipp Müller [Tue, 19 Dec 2017 15:48:19 +0000 (15:48 +0000)]
autotools: gl: don't check for gstreamer-allocators via pkg-config

It's in -base too after all, so this doesn't make sense and is no
longer needed.

6 years agoallocators: fix meson build after physmem move from -bad
Tim-Philipp Müller [Tue, 19 Dec 2017 12:44:35 +0000 (12:44 +0000)]
allocators: fix meson build after physmem move from -bad

6 years agogl: cocoa: fix a warning when building in MacOS 10.12
Josep Torra [Tue, 12 Dec 2017 07:31:47 +0000 (08:31 +0100)]
gl: cocoa: fix a warning when building in MacOS 10.12

gstglwindow_cocoa.m:186:60: error: incompatible pointer types sending 'GstGLContextCocoa *'
(aka 'struct _GstGLContextCocoa *') to parameter of type 'GstGLContext *' (aka 'struct _GstGLContext *')

6 years agogl: display: demote error level at display creation error
Víctor Manuel Jáquez Leal [Fri, 8 Dec 2017 13:46:35 +0000 (14:46 +0100)]
gl: display: demote error level at display creation error

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

6 years agomeson: set info variables in gstreamer-gl .pc file
Tim-Philipp Müller [Sun, 17 Dec 2017 20:48:11 +0000 (20:48 +0000)]
meson: set info variables in gstreamer-gl .pc file

6 years agodocs: plugins: add opengl plugin to docs
Tim-Philipp Müller [Sun, 17 Dec 2017 15:21:19 +0000 (15:21 +0000)]
docs: plugins: add opengl plugin to docs

6 years agodocs: update for git master
Tim-Philipp Müller [Sun, 17 Dec 2017 15:18:49 +0000 (15:18 +0000)]
docs: update for git master

6 years agodocs: add moved gl lib to documentation
Tim-Philipp Müller [Fri, 15 Dec 2017 00:40:25 +0000 (00:40 +0000)]
docs: add moved gl lib to documentation

6 years agogl: hook up tests
Tim-Philipp Müller [Mon, 11 Dec 2017 11:59:57 +0000 (11:59 +0000)]
gl: hook up tests

Also move over simple gl launch line test.

6 years agogl: hook up to build system
Tim-Philipp Müller [Sun, 10 Dec 2017 20:02:26 +0000 (20:02 +0000)]
gl: hook up to build system

Tests and documentation will follow separately.

The mixer elements in the opengl plugin need to stay
in -bad for now since they use GstVideoAggregator.

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

6 years agogl: examples: fix c++ code for -Wreturn-aggregate
Tim-Philipp Müller [Mon, 11 Dec 2017 00:26:36 +0000 (00:26 +0000)]
gl: examples: fix c++ code for -Wreturn-aggregate

.. and use #ifdef instead of #if

6 years agogl: use #ifdef HAVE_* instead of #if HAVE_FOO
Tim-Philipp Müller [Sun, 10 Dec 2017 22:27:31 +0000 (22:27 +0000)]
gl: use #ifdef HAVE_* instead of #if HAVE_FOO

6 years agogl: remove GST_USE_UNSTABLE_API bits
Tim-Philipp Müller [Sat, 9 Dec 2017 20:16:48 +0000 (20:16 +0000)]
gl: remove GST_USE_UNSTABLE_API bits

6 years agoopus: remove unused build variable and define
Tim-Philipp Müller [Sun, 10 Dec 2017 21:08:28 +0000 (21:08 +0000)]
opus: remove unused build variable and define

6 years agoallocators: move GstPhysMemoryAllocator abstraction from -bad to -base
Sebastian Dröge [Fri, 17 Feb 2017 17:26:41 +0000 (19:26 +0200)]
allocators: move GstPhysMemoryAllocator abstraction from -bad to -base

This can be used in a generic way as common interface by all platforms
that, in one way or another, pass around physical memory addresses.

This is used by the gl lib and seems useful enough, so might just as
well move it next to the other allocators.

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

6 years agoMove OpenGL library and plugin from -bad
Tim-Philipp Müller [Tue, 19 Dec 2017 12:00:43 +0000 (12:00 +0000)]
Move OpenGL library and plugin from -bad

Merge branch 'opengl-move'

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

6 years agovideoconvert: Filter-out crop meta
Nicolas Dufresne [Sun, 10 Dec 2017 19:59:54 +0000 (14:59 -0500)]
videoconvert: Filter-out crop meta

To passthrough crop-meta, the converter would need to allocate and
convert buffers of the size of the originating buffer. This is currently
made difficult by GstBaseTransform since we cannot alter the caps passed
though the allocation query. We would also need to wait for the first
input buffer to be received in order to make the decision around that
size.

So the short and safe solution is just to stop pretending we can
passthrought that meta.

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

6 years agoplaybin3: Fix accessing invalid index in GstStream when received select-stream event
Dongil Park [Fri, 15 Dec 2017 01:50:44 +0000 (10:50 +0900)]
playbin3: Fix accessing invalid index in GstStream when received select-stream event

If select-stream event was send to playbin3 as missing any GstStream of ES type
(V or A or TEX) of collection then, playbin will access to invalid address of
GstStream due to invalid index limit. This caused SIGSEGV.

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

6 years agoAutomatic update of common submodule
Matthew Waters [Thu, 14 Dec 2017 03:48:54 +0000 (14:48 +1100)]
Automatic update of common submodule

From e8c7a71 to 3fa2c9e

6 years agoxvimagesink: fix inaccurate error message
Jun Xie [Mon, 11 Dec 2017 03:45:37 +0000 (11:45 +0800)]
xvimagesink: fix inaccurate error message

It's about not being able to calculate the display size, not the display
ratio.

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

6 years agogldownload: fix wrong enum
Víctor Manuel Jáquez Leal [Tue, 5 Dec 2017 09:37:40 +0000 (10:37 +0100)]
gldownload: fix wrong enum

When compiling with clang, an enum conversion error is triggered
since GstVideoFrameFlags are not GstVideoFlags.

This patch sets GST_VIDEO_FRAME_FLAG_NONE to the added video meta.

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

6 years agogldownload: Add missing ifdef for dmabuf and egl
Nicolas Dufresne [Sun, 3 Dec 2017 00:28:30 +0000 (19:28 -0500)]
gldownload: Add missing ifdef for dmabuf and egl

This fixes the build for platforms that don't support one or the other.

6 years agogldisplay: Prefer wayland over X11
Nicolas Dufresne [Sat, 2 Dec 2017 20:25:38 +0000 (15:25 -0500)]
gldisplay: Prefer wayland over X11

As most Wayland compositors supports XWayland, X11 backend get
selected. This also realign better GStreamer decision to what
happens with GTK and other stack out there.

6 years agogldisplay: Add missing GL API to the doc
Nicolas Dufresne [Sat, 2 Dec 2017 20:25:16 +0000 (15:25 -0500)]
gldisplay: Add missing GL API to the doc

6 years agogldownload: Add dmabuf exporting
Matt Fischer [Wed, 11 Jan 2017 01:23:58 +0000 (19:23 -0600)]
gldownload: Add dmabuf exporting

This patch adds code to gldownload to export the image as a
dmabuf if requested.  The element now exposes memory:DMABuf as
a cap feature, and if it is selected, the element exports the
texture to an EGL image and then a dmabuf. It also implements a
fallback to system memory download in case the exportation failed.

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

6 years agoRemove GstAggregator from -bad, moved to core
Tim-Philipp Müller [Sat, 2 Dec 2017 16:01:25 +0000 (16:01 +0000)]
Remove GstAggregator from -bad, moved to core

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

6 years agogl/caopengllayer: use public GstGLContext instead of Cocoa-specific one
Matthew Waters [Mon, 27 Nov 2017 03:44:58 +0000 (14:44 +1100)]
gl/caopengllayer: use public GstGLContext instead of Cocoa-specific one

Allows keeping the GstGLCAOpenGLLayer public but not the winsys-specific
context/display/window.

6 years agoRevert "gl: cocoa: sprinkle some GST_EXPORT"
Matthew Waters [Mon, 27 Nov 2017 03:44:24 +0000 (14:44 +1100)]
Revert "gl: cocoa: sprinkle some GST_EXPORT"

This reverts commit 94d798c3337013bd902c0fd0a66f7f6842243eeb.

cocoac headers don't need to be public as all the functionality can be
provided by the base class

6 years agogl: cocoa: sprinkle some GST_EXPORT
Tim-Philipp Müller [Sun, 26 Nov 2017 22:36:35 +0000 (22:36 +0000)]
gl: cocoa: sprinkle some GST_EXPORT

Undefined symbols for architecture x86_64:
  "_gst_gl_context_cocoa_get_type", referenced from:
      __create_layer in libgstopengl_la-caopengllayersink.o

Might need some more in other headers, but first need to
clarify what exactly should be exported, there are some
inconsistencies (installed header files vs. funcs in docs).

6 years agosdlshare: Destroy GL backend buffer before the GL Context
Nicolas Dufresne [Fri, 24 Nov 2017 22:06:22 +0000 (17:06 -0500)]
sdlshare: Destroy GL backend buffer before the GL Context

This was otherwise leading to a deadlock in the GL library.

6 years agosdlshare2: Fix race conditions
Nicolas Dufresne [Fri, 24 Nov 2017 21:58:21 +0000 (16:58 -0500)]
sdlshare2: Fix race conditions

The client-draw callback is running on the GL Thread, which will
be required to map the buffer. Map early, and pass the mapped
frame instead. On top of that, make sure to signal any pending
draw before trying to push EOS, as some pad locks might be taken.
This is the cost of using the same thread to control GStreamer and
to render GL.

6 years agomeson: Build gl/sdl examples
Nicolas Dufresne [Fri, 24 Nov 2017 21:58:01 +0000 (16:58 -0500)]
meson: Build gl/sdl examples

6 years agoviv-fb: Don't destroy the native FB display
Jan Schmidt [Thu, 23 Nov 2017 12:01:52 +0000 (23:01 +1100)]
viv-fb: Don't destroy the native FB display

It causes crashes in applications because the result of
fbGetDisplay() might be in use elsewhere in the application
and Vivante doesn't seem to do any refcounting

6 years agoRevert "gl: Use GstGLDisplayEGL directly instead of creating a GstGLDisplayVIVFb...
Jan Schmidt [Thu, 23 Nov 2017 11:58:40 +0000 (22:58 +1100)]
Revert "gl: Use GstGLDisplayEGL directly instead of creating a GstGLDisplayVIVFb subclass"

This reverts commit 47fd4d391e775c11f529705bb0f457a9d25ba5e7.

This patch is incorrect. It doesn't actually compile, and causes a crash
because the viv-fb window implementation needs a native EGL handle
to pass to fbCreateWindow, but the GstGLDisplayEGL handleis actually
an EGLDisplay now (and gets cast to the wrong type)

6 years ago3dvideo example: Correct video overlay for HiDPI
Jan Schmidt [Thu, 23 Nov 2017 14:37:48 +0000 (01:37 +1100)]
3dvideo example: Correct video overlay for HiDPI

Use the GTK scaling factor to scale the video allocation
so video displays correctly on hi-dpi screens

6 years agomeson: remove outdated comment in build file
Tim-Philipp Müller [Thu, 23 Nov 2017 10:15:49 +0000 (11:15 +0100)]
meson: remove outdated comment in build file

6 years agoaggregator: Remove klass->sinkpads_type
Mathieu Duponchelle [Mon, 6 Nov 2017 20:07:51 +0000 (21:07 +0100)]
aggregator: Remove klass->sinkpads_type

This posed problems for the python bindings (and possibly others).

Instead, subclasses now use add_pad_template_with_gtype.

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

6 years agoall: Fix left-shift undefined behaviour
Edward Hervey [Mon, 20 Nov 2017 16:06:07 +0000 (17:06 +0100)]
all: Fix left-shift undefined behaviour

Cast to the target type before shifting (or use macro if available)

6 years agogl/tests: add some simple shader testing
Matthew Waters [Tue, 7 Nov 2017 04:21:43 +0000 (15:21 +1100)]
gl/tests: add some simple shader testing

Making sure that the default shaders compile and are usable

6 years agogltestsrc: guard stop in gl thread
Matthew Waters [Tue, 7 Nov 2017 01:39:58 +0000 (12:39 +1100)]
gltestsrc: guard stop in gl thread

So we don't result in a critical when we've never created the GL context:

gst_gl_context_thread_add: assertion 'GST_IS_GL_CONTEXT (context)' failed

6 years agoglbasefilter: actually indicate start internally
Matthew Waters [Mon, 6 Nov 2017 13:07:42 +0000 (00:07 +1100)]
glbasefilter: actually indicate start internally

Otherwise when we stop, the necessary stop functions will not be called
and things may be leaked.

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

6 years agogltestsrc: free in the GL thread on stop
Matthew Waters [Mon, 6 Nov 2017 12:19:15 +0000 (23:19 +1100)]
gltestsrc: free in the GL thread on stop

Calling GL functions not on the GL thread may crash in some GL
implementations.

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

6 years agogl: use new gst_element_foreach_sink_pad()
Tim-Philipp Müller [Thu, 2 Nov 2017 12:17:38 +0000 (12:17 +0000)]
gl: use new gst_element_foreach_sink_pad()

Instead of gst_aggregator_iterate_sinkpads() which will
soon be removed.

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

6 years agogl/shader: allow setting non-square matrices as uniforms on gles platforms
Matthew Waters [Sat, 28 Oct 2017 10:34:08 +0000 (21:34 +1100)]
gl/shader: allow setting non-square matrices as uniforms on gles platforms

It is possible with GLES3

6 years agogl/query: split tests and fix some corresponding issues in usage
Matthew Waters [Sat, 28 Oct 2017 07:33:44 +0000 (18:33 +1100)]
gl/query: split tests and fix some corresponding issues in usage

6 years agoUse value instead of version macro when testing for mac OS version
Jérôme Laheurte [Sun, 1 Oct 2017 17:04:15 +0000 (19:04 +0200)]
Use value instead of version macro when testing for mac OS version

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

6 years agogl: Use GstGLDisplayEGL directly instead of creating a GstGLDisplayVIVFb subclass
Cassandra Rommel [Mon, 2 Oct 2017 19:35:48 +0000 (12:35 -0700)]
gl: Use GstGLDisplayEGL directly instead of creating a GstGLDisplayVIVFb subclass

This simplifies the code a lot without any functional changes apart from
not closing the display connection. Closing the display connection is
not safe to do as it is shared between all other code in the same
process and no reference counting or anything happens at the platform
layer.

6 years agoglcontext_egl: Add gstglwindow header
Justin Kim [Mon, 2 Oct 2017 07:22:26 +0000 (16:22 +0900)]
glcontext_egl: Add gstglwindow header

Otherwise, compiler complains implicit function declaration warning.

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

6 years agoglfilter: Unmap video frame in error case
Ponnam Srinivas [Thu, 28 Sep 2017 10:50:53 +0000 (16:20 +0530)]
glfilter: Unmap video frame in error case

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

6 years agoglmixer: Unmap video frame in error case
Ponnam Srinivas [Mon, 25 Sep 2017 11:50:58 +0000 (17:20 +0530)]
glmixer: Unmap video frame in error case

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

6 years agoglvidemixer: need reconfigure output gemotry after caps renegotiated
Haihua Hu [Wed, 20 Sep 2017 12:00:03 +0000 (20:00 +0800)]
glvidemixer: need reconfigure output gemotry after caps renegotiated

6 years agoRevert "glvideomixer: need update output geometry after src caps reconfigure"
Matthew Waters [Thu, 21 Sep 2017 01:59:22 +0000 (11:59 +1000)]
Revert "glvideomixer: need update output geometry after src caps reconfigure"

This reverts commit d6e538dc5651fb03c85d7c7614bcf6c689f2db2f.

6 years agoglvideomixer: need update output geometry after src caps reconfigure
Haihua Hu [Mon, 18 Sep 2017 07:42:00 +0000 (15:42 +0800)]
glvideomixer: need update output geometry after src caps reconfigure

Need update output geometry when sink caps changed and use
gst_structure_set to update caps if structure is fixed

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

6 years agogl/viv-fb: transform screen coordinate to viewport coordinate
Haihua Hu [Mon, 11 Sep 2017 08:00:24 +0000 (16:00 +0800)]
gl/viv-fb: transform screen coordinate to viewport coordinate

In y direction, screen coordinate are opposite to viewport coordinate.

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

6 years agogl/viv-fb: fix wrong pos (x,y) calculate in queue_resize
Haihua Hu [Mon, 11 Sep 2017 07:12:53 +0000 (15:12 +0800)]
gl/viv-fb: fix wrong pos (x,y) calculate in queue_resize

queue_resize viewport coordinate calculate is wrong and
force queue_resize when do _set_render_rectangle in case
user input pos changed

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

6 years agoglimagesink: expose should do redisplay all the time
Haihua Hu [Mon, 11 Sep 2017 08:11:19 +0000 (16:11 +0800)]
glimagesink: expose should do redisplay all the time

when using internal window, window resize should work
when pause state, but expose only do redisplay when
window_id is valid. So expose should do redisplay all
the time.

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

6 years agoRequest minimum buffer even if need_pool is FALSE
Nicolas Dufresne [Tue, 5 Sep 2017 20:20:44 +0000 (16:20 -0400)]
Request minimum buffer even if need_pool is FALSE

When tee is used, it will not request a pool, but still it wants to
know how many buffers are required.

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

6 years agogl/wayland: call eglTerminate() before wl_display_disconnect()
Matthew Waters [Tue, 5 Sep 2017 06:14:02 +0000 (16:14 +1000)]
gl/wayland: call eglTerminate() before wl_display_disconnect()

Calling these two functions in the wrong order will result in
use-after-free inside wayland.

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

6 years agogtkglsink: expose the created display and context correctly
Matthew Waters [Fri, 1 Sep 2017 05:00:12 +0000 (15:00 +1000)]
gtkglsink: expose the created display and context correctly

1. Propagate the GstGLDisplay we create
2. Add the created GstGLContext to the propagated GstGLDisplay

Otherwise with multi-branch GL pipelines involving gtkglsink, things
will fall apart and errors will be genarated somewhere.

6 years agoexamples/gl/gtk: build fix for the 3dvideo example on macOS
Philippe Normand [Wed, 30 Aug 2017 14:18:58 +0000 (15:18 +0100)]
examples/gl/gtk: build fix for the 3dvideo example on macOS

6 years agoexamples/gl/gtk: fix overlay handling for macOS
Philippe Normand [Wed, 30 Aug 2017 14:16:39 +0000 (15:16 +0100)]
examples/gl/gtk: fix overlay handling for macOS

The GTK+ window requires a NSView sub-view, not an NSWindow.

6 years agogl: fix build for ios/win32/android after 2fd84a6c
Matthew Waters [Mon, 28 Aug 2017 02:56:34 +0000 (12:56 +1000)]
gl: fix build for ios/win32/android after 2fd84a6c

Some missing GL includes.

6 years agogl: install new glfuncs.h header
Tim-Philipp Müller [Fri, 25 Aug 2017 19:37:39 +0000 (20:37 +0100)]
gl: install new glfuncs.h header

6 years agogl/checks: fix build
Matthew Waters [Wed, 23 Aug 2017 15:18:40 +0000 (01:18 +1000)]
gl/checks: fix build

6 years agogl/meson: add build for the vivante fb backend
Matthew Waters [Wed, 23 Aug 2017 06:36:09 +0000 (16:36 +1000)]
gl/meson: add build for the vivante fb backend

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