platform/upstream/gstreamer.git
6 years agoautotools: use -fno-strict-aliasing where supported
Tim-Philipp Müller [Sun, 4 Feb 2018 10:22:36 +0000 (11:22 +0100)]
autotools: use -fno-strict-aliasing where supported

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

6 years agogl: some annotation fixes
Matthew Waters [Mon, 5 Feb 2018 03:58:06 +0000 (14:58 +1100)]
gl: some annotation fixes

6 years agogl/build/meson: fix gl_api variable names
Matthew Waters [Mon, 5 Feb 2018 03:56:07 +0000 (14:56 +1100)]
gl/build/meson: fix gl_api variable names

6 years agotests: sdp: relicense code snippet from GPLv3 to LGPLv2.1+
Tim-Philipp Müller [Wed, 22 Feb 2017 10:48:55 +0000 (10:48 +0000)]
tests: sdp: relicense code snippet from GPLv3 to LGPLv2.1+

Relicense with approval from Jose and Miguel. Code snippet
was supposed to be LGPL from the beginning.

https://bugzilla.gnome.org/show_bug.cgi?id=697808#c14
https://bugzilla.gnome.org/show_bug.cgi?id=697808#c15

6 years agoglmemory: fixup GL_RGB565 usage when performing texsubimage
Matthew Waters [Wed, 17 Jan 2018 04:24:20 +0000 (15:24 +1100)]
glmemory: fixup GL_RGB565 usage when performing texsubimage

An additional change for the texsubimage use case on top of
https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=c2b2c68beaddbea0ec4fe7b099507cc492f6dd7c
https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=ea6bed111bab9b394d787f7760c6a3b953630d3a

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

6 years agopkgconfig: only install gstreamer-gl-1.0.pc if OpenGL support was built
Tim-Philipp Müller [Thu, 1 Feb 2018 11:21:19 +0000 (11:21 +0000)]
pkgconfig: only install gstreamer-gl-1.0.pc if OpenGL support was built

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

6 years agooggdemux: Handle invalid-sized packets
Edward Hervey [Thu, 1 Feb 2018 09:40:28 +0000 (10:40 +0100)]
oggdemux: Handle invalid-sized packets

On invalid packets there is the possibility we might end up wanting
to trim/offset more than what is available.

oss-fuzz issue #5866

6 years agomeson: use -fno-strict-aliasing if supported
Tim-Philipp Müller [Tue, 30 Jan 2018 20:33:36 +0000 (20:33 +0000)]
meson: use -fno-strict-aliasing if supported

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

6 years agomeson: use built-in pic kwarg when building static helper libs
Tim-Philipp Müller [Tue, 30 Jan 2018 20:32:44 +0000 (20:32 +0000)]
meson: use built-in pic kwarg when building static helper libs

instead of passing -fPIC manually.

6 years agoglimagesink: Allow resetting render rectangle
Nicolas Dufresne [Mon, 29 Jan 2018 12:57:56 +0000 (12:57 +0000)]
glimagesink: Allow resetting render rectangle

As documented, passing -1 to x and/or y should reset the render
rectangle to the window/display size.

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

6 years agoglimagesink: Add render-rectangle property
Nicolas Dufresne [Mon, 29 Jan 2018 12:45:06 +0000 (12:45 +0000)]
glimagesink: Add render-rectangle property

This allow controlling the render rectangle from gst-launch-1.0.

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

6 years agoxvimagesink: Allow changing render-rectangle through property
Nicolas Dufresne [Tue, 23 Jan 2018 20:04:21 +0000 (15:04 -0500)]
xvimagesink: Allow changing render-rectangle through property

This also enables setting the render rectangle before the window
is provided or created.

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

6 years agovideo-overlay: Add helpers for render-rectangle property
Nicolas Dufresne [Mon, 22 Jan 2018 20:40:32 +0000 (15:40 -0500)]
video-overlay: Add helpers for render-rectangle property

This is a set of helper that makes it easy to enable the render
rectangle to be controllable through a property.

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

6 years agovideo: Add NV16_10LE32 support
Nicolas Dufresne [Fri, 3 Nov 2017 16:18:27 +0000 (12:18 -0400)]
video: Add NV16_10LE32 support

This adds a 10 bit variant for NV16 packed into 32 bits little endian
words. The MSB 2 bits are padding. This format is used on Xilinx SoC and
identified with the FOURCC XV20.

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

6 years agovideo: Add GRAY10_LE32 support
Nicolas Dufresne [Fri, 3 Nov 2017 16:11:58 +0000 (12:11 -0400)]
video: Add GRAY10_LE32 support

This add a 10bit variant of gray scale packed into 32bits little endian
words. The MSB 2 bits are padding and should be ignored. This format is
used on Xilinx SoC and is identified with the FOURCC XV10.

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

6 years agovideo: Add NV12_10LE32 support
Nicolas Dufresne [Wed, 1 Nov 2017 21:26:31 +0000 (17:26 -0400)]
video: Add NV12_10LE32 support

This adds a 10bit variant for NV12 which packs 3 10bit components
into little endian 32bit words. The MSB 2 bits are padding and should be
ignored. This format is used on Xilinx SoC and is identified with there
with the FOURCC XV15

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

6 years agosubparse: fix pushing out of last chunk if last line has no newline
Tim-Philipp Müller [Thu, 25 Jan 2018 18:39:11 +0000 (18:39 +0000)]
subparse: fix pushing out of last chunk if last line has no newline

With playbin the last subtitle chunk would not get displayed
if the last chunk was missing a newline at the end. This is
because streamsynchronizer will hold back the EOS event until
the audio and video streams are finished too, so subparse
would never forcefully push out the last chunk until the very
end when it is too late.

We get a STREAM_GROUP_DONE event from streamsynchronizer however,
so handle that like EOS and force out any remaining text then.

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

6 years agogst-plugins-base.supp: add gl suppressions for one off init allocations
Vincent Penquerc'h [Fri, 7 Apr 2017 09:33:40 +0000 (10:33 +0100)]
gst-plugins-base.supp: add gl suppressions for one off init allocations

Add to valgrind suppressions file.

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

6 years agoalsasrc: lock calls to snd_pcm_delay() with mutex as in alsasink
Branislav Katreniak [Fri, 20 Mar 2015 08:41:05 +0000 (09:41 +0100)]
alsasrc: lock calls to snd_pcm_delay() with mutex as in alsasink

Alsasrc introduced delay_lock in commit 519f85a43e73efb8f3fb2c7be45226e
because alsa-lib is not thread safe for the same handle.
Alsasrc uses the same threading pattern, it should be locked too.

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

6 years agotag: id3v2: don't leak stack pointer outside of block where it's valid
Tim-Philipp Müller [Fri, 19 Jan 2018 20:43:57 +0000 (20:43 +0000)]
tag: id3v2: don't leak stack pointer outside of block where it's valid

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

6 years agotests: audioconvert: fix up check for lost channel positions
Tim-Philipp Müller [Fri, 19 Jan 2018 18:50:07 +0000 (18:50 +0000)]
tests: audioconvert: fix up check for lost channel positions

The caps field is channel-mask these days, so that code path
was never active.

6 years agotests: audioconvert: Fix memory leak in failure path
Jimmy Ohn [Mon, 5 Jun 2017 05:08:33 +0000 (14:08 +0900)]
tests: audioconvert: Fix memory leak in failure path

Don't set a bad example by leaking things, even if calling
g_error() will make the process abort.

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

6 years agotheoradec: Check for valid width/height
Edward Hervey [Wed, 17 Jan 2018 13:35:11 +0000 (14:35 +0100)]
theoradec: Check for valid width/height

If width or height are zero ... there's no video :)

6 years agoplayback-utils: Fix caps leak on failure
Ashish Kumar [Tue, 31 Oct 2017 09:34:47 +0000 (15:04 +0530)]
playback-utils: Fix caps leak on failure

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

6 years agotests: fix build on Windows with MSVC
Tim-Philipp Müller [Tue, 16 Jan 2018 20:13:45 +0000 (20:13 +0000)]
tests: fix build on Windows with MSVC

6 years agomeson: tests: fix build of tcp test on unix
Tim-Philipp Müller [Tue, 16 Jan 2018 19:22:16 +0000 (19:22 +0000)]
meson: tests: fix build of tcp test on unix

Need to add gio-unix-2.0 dep to pipelines/tcp test otherwise it
won't find the gio/gunixfdmessage.h header which is not in the
same dir as the other gio headers. This issue was masked before
because we didn't include config.h so HAVE_GIO_UNIX_2_0
wasn't defined.

6 years agomeson: tests: skip allocators dmabuf test on non-Linux
Tim-Philipp Müller [Tue, 16 Jan 2018 19:21:53 +0000 (19:21 +0000)]
meson: tests: skip allocators dmabuf test on non-Linux

6 years agotests: include config.h and don't include unix headers
Tim-Philipp Müller [Tue, 16 Jan 2018 18:14:59 +0000 (18:14 +0000)]
tests: include config.h and don't include unix headers

In many cases the unistd.h includes weren't actually needed.

Don't build tests that need it on windows with MSVC
(multifdsink, multisocketsink, pipelines/tcp).

Preparation for making tests work on Windows with MSVC.

6 years agomeson: gl: fix build on windows
Roland Peffer [Tue, 16 Jan 2018 13:59:08 +0000 (13:59 +0000)]
meson: gl: fix build on windows

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

6 years agomeson: fix check whether both gles2 and opengl headers can be included
Tim-Philipp Müller [Tue, 16 Jan 2018 11:25:29 +0000 (11:25 +0000)]
meson: fix check whether both gles2 and opengl headers can be included

cc.compiles() doesn't support the prefix: kwarg currently, so it
never had any effect.

https://github.com/mesonbuild/meson/issues/2364
https://bugzilla.gnome.org/show_bug.cgi?id=787964

6 years agovideotestsrc: Document the num-buffers property
Sam Thursfield [Mon, 23 Jan 2017 14:30:20 +0000 (14:30 +0000)]
videotestsrc: Document the num-buffers property

It's not obvious from the existing docs that this option exists, nor
that it can be used to give a pipeline an exact length in video frames.

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

6 years agoexamples: playback: don't use deprecated font button API
Tim-Philipp Müller [Mon, 8 Jan 2018 14:21:29 +0000 (14:21 +0000)]
examples: playback: don't use deprecated font button API

playback-test.c:2587:3: error: "gtk_font_button_get_font_name" is deprecated

6 years agogl/wayland: move roundtrip on show to window thread
Matthew Waters [Thu, 4 Jan 2018 04:33:33 +0000 (15:33 +1100)]
gl/wayland: move roundtrip on show to window thread

This makes it thread safe and fixes a possible deadlock.

Keeping the roundtrip off the window thread will result in two different
threads call wl_display_dispatch_queue() for the same queue which
violates the assumption for _dispatch_queue()'s thread-safety
guarantees.

https://bugzilla.gnome.org/show_bug.cgi?id=788754
https://bugzilla.gnome.org/show_bug.cgi?id=792156
https://bugzilla.gnome.org/show_bug.cgi?id=758984

6 years agotypefind: Fix mp3 typefinding with multiple different headers
Edward Hervey [Wed, 3 Jan 2018 14:31:04 +0000 (15:31 +0100)]
typefind: Fix mp3 typefinding with multiple different headers

(yes, this has never worked since it was introduced, don't worry)

If we want to actually detect layer/channels/samplerate changes,
it would be better to:
* not reset the various prev_* variables at every iteration.
* and actually store the values when they change

CID #206079
CID #206080
CID #206081

6 years agolibs/glheaders: move object creation to the gl thread where necessary
Matthew Waters [Wed, 3 Jan 2018 12:11:54 +0000 (23:11 +1100)]
libs/glheaders: move object creation to the gl thread where necessary

Some GL platforms (EGL, WGL) require deactivating the OpenGL context in
one thread before it can be used in another thread which this test
currently violates and would e.g. result in EGL_BAD_ACCESS errors from
gst_gl_context_activate().

Fix by moving the object creation into the GL thread instead and not
requiring additional gst_gl_context_activate() calls.

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

6 years agotests/glheaders: use #if for platform selection
Matthew Waters [Wed, 3 Jan 2018 12:09:20 +0000 (23:09 +1100)]
tests/glheaders: use #if for platform selection

GST_GL_HAVE_* are always defined to 0 or 1 so an #ifdef will always
succeed which is not the intention here.

6 years agoglcolorconvert: re-enable -Wformat-nonliteral warning
Tim-Philipp Müller [Fri, 22 Dec 2017 22:11:42 +0000 (23:11 +0100)]
glcolorconvert: re-enable -Wformat-nonliteral warning

We can pass string constants here to g_strdup_printf(),
so do so and re-enable the -Wformat-nonliteral warning
we had to disable when merging the opengl libs.

6 years agoglcolorconvert: fix missing printf arg for apple rectangular texture case
Tim-Philipp Müller [Wed, 3 Jan 2018 09:15:34 +0000 (09:15 +0000)]
glcolorconvert: fix missing printf arg for apple rectangular texture case

Found by -Wformat-nonliteral (to be re-enabled in a separate commit).

6 years agoconfigure: Fix build without gl plugins
Edward Hervey [Wed, 3 Jan 2018 07:47:58 +0000 (08:47 +0100)]
configure: Fix build without gl plugins

The AM_CONDITIONAL always need to be evaluated, regardless of
whether we are building with or without gl plugins (the actual
checks are only called in AG_GST_GL_PLUGIN_CHECKS).

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