platform/upstream/gstreamer.git
6 years agoglupload: try to use the last method after reconfigure
Michael Olbrich [Wed, 4 Jul 2018 07:17:11 +0000 (09:17 +0200)]
glupload: try to use the last method after reconfigure

Reconfigure will trigger a set_caps which clears the upload method.
Remember the method in this case and start with it.
Wrap around once to try all methods if necessary.

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

6 years agoglupload: Implement direct dmabuf uploader
Michael Olbrich [Thu, 5 Jul 2018 08:17:27 +0000 (10:17 +0200)]
glupload: Implement direct dmabuf uploader

The idea is that some GPUs (like the Vivante series) can actually
perform the YUV->RGB conversion internally, so no custom conversion
shaders are needed. To make use of this feature, we need an additional
uploader that can import DMABUF FDs and also directly pass the pixel
format, relying on the GPU to do the conversion.

Based on patches from Nicolas Dufresne <nicolas.dufresne@collabora.com> and
Carlos Rafael Giani <dv@pseudoterminal.org>.

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

6 years agogl/egl: Add gst_egl_image_from_dmabuf_direct() function
Nicolas Dufresne [Tue, 11 Sep 2018 03:28:30 +0000 (23:28 -0400)]
gl/egl: Add gst_egl_image_from_dmabuf_direct() function

The colorspace conversion happens during the upload so the necessary hints
must be provided to ensure that the conversion works correctly.

At least the Mesa Intel driver will create a texture without error but
produces an incorrect result. Use eglQueryDmaBufModifiersEXT() to check if
non-external upload is supported for the given format.

Based on a patch from Carlos Rafael Giani <dv@pseudoterminal.org>.

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

6 years agoglupload: handle upload methods with different caps
Michael Olbrich [Wed, 4 Jul 2018 07:21:00 +0000 (09:21 +0200)]
glupload: handle upload methods with different caps

If a upload method is selected then use it exclusively in transform_caps().
Also, reconfigure if the current caps don't match the current upload
method.

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

6 years agoglupload: allow system memory for dmabuf in transform_caps
Michael Olbrich [Thu, 5 Jul 2018 13:17:30 +0000 (15:17 +0200)]
glupload: allow system memory for dmabuf in transform_caps

This should not be necessary, but currently not all plugins that provide
dmabuf memory announce this with caps features, e.g. v4l2.
The static caps already contain the system memory. It didn't break before
because other upload methods provide the necessary transformation.

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

6 years agoglmemory: Fix n_wrapped_pointers usage
Nicolas Dufresne [Wed, 7 Jun 2017 16:00:08 +0000 (18:00 +0200)]
glmemory: Fix n_wrapped_pointers usage

gst_gl_memory_setup_buffer() was not properly using the number
of pointers to wrapped. This also fixes the validation, as we
only support 1 wrapper per view, or num_planes * views wrapper.

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

6 years agovideodecoder: Delete the link before pushing
Nicolas Dufresne [Sat, 8 Sep 2018 02:15:35 +0000 (22:15 -0400)]
videodecoder: Delete the link before pushing

The gst_video_decoder_clip_and_push_buf() now drops the internal stream
lock while pushing. This means, the output_queued list could be modififed
during that time. To make the code safe again, we delete the link before
pushing the data. The walk pointer will later be updated with the list
head, which makes it safe in case the list was modififed.

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

6 years agogstaudiosrc/sink: Set audio ringbuffer thread priority
Nirbheek Chauhan [Mon, 10 Sep 2018 19:11:59 +0000 (00:41 +0530)]
gstaudiosrc/sink: Set audio ringbuffer thread priority

On Windows, the ringbuffer thread function must have the "Pro Audio"
priority set, otherwise it sometimes doesn't get scheduled for
200-300ms, which will immediately cause an underrun unless you set
a very high latency-time and buffer-time.

This has no compile-time deps since it tries to load avrt.dll at
runtime to set the thread priority.

6 years agomeson: Add an option for the 'Tremor' Vorbis implementation
Nirbheek Chauhan [Mon, 10 Sep 2018 16:52:16 +0000 (22:22 +0530)]
meson: Add an option for the 'Tremor' Vorbis implementation

It makes sense to control it explicitly to allow us to enable it on
platforms that don't have hardware floating-point, and to allow people
to enable the 'vorbis' plugin without having to also provide the
Tremor dependency which is useless on most devices.

6 years agogl/meson: check for EGL headers before allowing use of EGL
Matthew Waters [Wed, 5 Sep 2018 08:34:06 +0000 (18:34 +1000)]
gl/meson: check for EGL headers before allowing use of EGL

For distros that provide headers in seperate dev/devel packages this
won't build egl support without the necessary EGL headers.

6 years agodiscoverer: Consider closedcaption/ as subtitles and improve subtitle caps detection
Sebastian Dröge [Tue, 4 Sep 2018 08:55:03 +0000 (11:55 +0300)]
discoverer: Consider closedcaption/ as subtitles and improve subtitle caps detection

Generally all subtitle/, subpicture/, text/, closedcaption/ and
application/x-subtitle caps instead of hardcoding a small set of caps.

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

6 years agovideoencoder: Release STREAM_LOCK during gst_pad_push()
Alexey Chernov [Mon, 25 Nov 2013 16:49:50 +0000 (20:49 +0400)]
videoencoder: Release STREAM_LOCK during gst_pad_push()

Release STREAM_LOCK before calling gst_pad_push() and take it
back afterward so that upstream isn't blocked while output
buffer is being pushed downstream.

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

6 years agovideodecoder: Release STREAM_LOCK during gst_pad_push()
Alexey Chernov [Mon, 25 Nov 2013 16:45:18 +0000 (20:45 +0400)]
videodecoder: Release STREAM_LOCK during gst_pad_push()

Release STREAM_LOCK before calling gst_pad_push() and take it
back afterward so that upstream isn't blocked while output
buffer is being pushed downstream.

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

6 years agomeson: Maintain macOS ABI through dylib versioning
Nirbheek Chauhan [Fri, 31 Aug 2018 09:06:30 +0000 (14:36 +0530)]
meson: Maintain macOS ABI through dylib versioning

Requires Meson 0.48, but the feature will be ignored on older versions
so it's safe to add it without bumping the requirement.

Documentation:
https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-manual.md#shared_library

6 years agogl/meson: fix gbm option to enable rather than disable
Matthew Waters [Fri, 31 Aug 2018 08:14:13 +0000 (18:14 +1000)]
gl/meson: fix gbm option to enable rather than disable

This change matches what the other winsys/platforms are doing

6 years agogl/meson: add Android build definitions
Matthew Waters [Thu, 30 Aug 2018 14:15:35 +0000 (00:15 +1000)]
gl/meson: add Android build definitions

6 years agogl/meson: add build for iOS
Matthew Waters [Thu, 2 Aug 2018 05:59:20 +0000 (15:59 +1000)]
gl/meson: add build for iOS

6 years agovideo: Add GST_VIDEO_INFO_FIELD_RATE_N() macro
Zeeshan Ali [Mon, 2 Jul 2018 21:48:04 +0000 (23:48 +0200)]
video: Add GST_VIDEO_INFO_FIELD_RATE_N() macro

Add a new macro that gives you the rate of the fields, which is the
numerator of the field-rate for ALTERNATE interlacing video and FPS for
progressive and other interlacing formats.

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

6 years agovideo: Add gst_video_decoder_set_interlaced_output_state()
Zeeshan Ali [Fri, 6 Jul 2018 13:48:35 +0000 (15:48 +0200)]
video: Add gst_video_decoder_set_interlaced_output_state()

Add a variant of gst_video_decoder_set_output_state() that allows the user
to pass an interlacing mode as well. This is needed to ensure that
gst_video_info_set_interlaced_format() is used instead so that
GstVideoInfo.size is correctly initialized.

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

6 years agovideo: Add GST_VIDEO_INFO_FIELD_HEIGHT() macro
Zeeshan Ali [Mon, 2 Jul 2018 21:48:04 +0000 (23:48 +0200)]
video: Add GST_VIDEO_INFO_FIELD_HEIGHT() macro

Add a new macro that gives you the height of a field. It returns the
height of the full frame unless split-field (alternate) interlacing is
in use. Also GST_VIDEO_INFO_COMP_HEIGHT macro now uses this new macro to
get the height for its calculation.

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

6 years agotest: Ensure gst_video_info_set_format() calls succeed
Zeeshan Ali [Mon, 2 Jul 2018 15:51:06 +0000 (17:51 +0200)]
test: Ensure gst_video_info_set_format() calls succeed

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

6 years agovideo: Add gst_video_info_set_interlaced_format()
Zeeshan Ali [Mon, 2 Jul 2018 14:48:30 +0000 (16:48 +0200)]
video: Add gst_video_info_set_interlaced_format()

Add a helper to set the interlacing mode while creating the GstVideoInfo
in addition to format and resolution. Using this helper will ensure that
size is correctly calculated for split-field interlacing mode.

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

6 years agovideo: Add GST_VIDEO_INTERLACE_MODE_ALTERNATE
Zeeshan Ali [Fri, 4 May 2018 14:16:28 +0000 (16:16 +0200)]
video: Add GST_VIDEO_INTERLACE_MODE_ALTERNATE

Add a new interlace mode enum to represent buffers containing a single
field of an interlaced video in a buffer. The name is based on the
equivalent video format in the V4L2 API, V4L2_FIELD_ALTERNATE:

https://01.org/linuxgraphics/gfx-docs/drm/media/uapi/v4l/field-order.html

Since caps fields are optional, we also introduce a new caps feature,
"format:Interlaced" that always goes with "alternate" interlace mode to ensure
that caps for this incompatible format are incompatible with other interlaced
and progressive video caps.

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

6 years agovideo: Add format for single fields of interlaced video in a buffer
Zeeshan Ali [Fri, 4 May 2018 13:19:11 +0000 (15:19 +0200)]
video: Add format for single fields of interlaced video in a buffer

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

6 years agodoc: glbasefilter: Add missing Since for gst_gl_base_filter_find_gl_context()
Nicolas Dufresne [Wed, 29 Aug 2018 14:38:32 +0000 (10:38 -0400)]
doc: glbasefilter: Add missing Since for gst_gl_base_filter_find_gl_context()

6 years agovorbisdec: Always handle in-band header packets once the first non-header packet...
Sebastian Dröge [Thu, 16 Aug 2018 16:37:33 +0000 (19:37 +0300)]
vorbisdec: Always handle in-band header packets once the first non-header packet arrives

And clean up any old pending headers if we receive a new identification
header, or if we receive a new set of headers via caps.

Otherwise it might happen that we receive one or more header but not
all, and then afterwards all headers again, and libvorbis does not like
getting headers passed multiple times and would error out.

It only makes sense to pass the very latest headers to the decoder at
the time we can actually make use of them.

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

6 years agomeson: Always define gstgl_dep to a valid dependency object
Nirbheek Chauhan [Tue, 28 Aug 2018 08:05:28 +0000 (13:35 +0530)]
meson: Always define gstgl_dep to a valid dependency object

Fixes configure error when gl support was auto-detected as not being
available:

ext/gl/meson.build:50:20: ERROR:  Unknown variable "gstgl_dep".

6 years agogl/dispmanx: fix removing foreign window handle
Yuji Kuwabara [Thu, 21 Sep 2017 05:03:28 +0000 (14:03 +0900)]
gl/dispmanx: fix removing foreign window handle

gst_gl_window_dispmanx_egl_set_window_handle() removes native window handle
(dispmanx element), regardless it was foreign window handle
(set via gst_video_overlay_set_window_handle()) or not.

This problem prevents glimagesink reusable.
(PAUSED -> READY -> PAUSED does not work)

This patch corrects it comparing the native window handle with foreign window
handle. This behavior is same as gst_gl_window_dispmanx_egl_close().

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

6 years agogl/wayland: correctly use the set_render_rectangle size first
Matthew Waters [Tue, 28 Aug 2018 04:31:43 +0000 (14:31 +1000)]
gl/wayland: correctly use the set_render_rectangle size first

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

6 years agogl/wayland: add preferred window size, and set it according to video size
memeka [Tue, 24 Oct 2017 07:09:50 +0000 (17:39 +1030)]
gl/wayland: add preferred window size, and set it according to video size

The glimagesink wayland backend lacks the implementation of
gst_gl_window_wayland_egl_set_preferred_size. Because of this, glimagesink windows on
wayland are created with a fixed window size of 320x240.

[Matthew Waters]: gst-indent sources

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

6 years agopango: Create one context per instance and remove class mutex
Sebastian Dröge [Mon, 27 Aug 2018 12:41:31 +0000 (15:41 +0300)]
pango: Create one context per instance and remove class mutex

PangoCairo is thread-safe as long as the context and fontmap are not
shared between threads. Previously each subclass had its own context and
a class mutex for this reason, but apart from hurting performance this
was also not completely safe yet: the same fontmap might've been used by
different classes from different threads as the thread-default fontmap
(at time of class initialization) was used.

6 years agooggdemux: Ensure that no pad values are set when setting up the mapper
Sebastian Dröge [Mon, 27 Aug 2018 08:07:47 +0000 (11:07 +0300)]
oggdemux: Ensure that no pad values are set when setting up the mapper

Otherwise we might have arbitrary values set that are used later and can
cause undefined behaviour, as found by ossfuzz.

6 years agoglcolorscale: fix compiler warning
Tim-Philipp Müller [Sat, 25 Aug 2018 23:52:41 +0000 (01:52 +0200)]
glcolorscale: fix compiler warning

gstglcolorscale.c(173): warning C4098: 'gst_gl_colorscale_gl_stop': 'void' function returning a value

6 years agogl: use right export decorator
Tim-Philipp Müller [Sat, 25 Aug 2018 23:41:42 +0000 (01:41 +0200)]
gl: use right export decorator

6 years agoaudio: use right export decorator
Tim-Philipp Müller [Sat, 25 Aug 2018 23:40:57 +0000 (01:40 +0200)]
audio: use right export decorator

6 years agomeson: gl: return not-found dependency instead of disabler if opengl is disabled
Tim-Philipp Müller [Sat, 18 Aug 2018 11:37:48 +0000 (12:37 +0100)]
meson: gl: return not-found dependency instead of disabler if opengl is disabled

This allows consumers of the gstgl dependency where gstgl is optional
to do things like:

  config_data.set('HAVE_GST_GL', gstgl_dep.found())
  deps = [gstvideo_dep, gstgl_dep]

meaning they can still use the dep unconditionally. With the
disabler we would just disable the whole target even if the
gstgl part was an optional extra. We can add an option to
dependency() later to let users/consumers of the dep decide
if they want a not-found dependency or a disabler instead.

6 years agomeson: host_system is 'ios' when building for iOS
Nirbheek Chauhan [Thu, 16 Aug 2018 21:29:14 +0000 (02:59 +0530)]
meson: host_system is 'ios' when building for iOS

The cross file sets this value, and we use 'ios' in Cerbero.

6 years agoplaysink: audio visualization support fixes
Philippe Normand [Sat, 16 Jun 2018 13:27:20 +0000 (14:27 +0100)]
playsink: audio visualization support fixes

The queue between the audiotee and the audio chain wasn't properly added to the
bin, leading to streamsynchronizer locks on EOS. Reconfiguration of the
visualization chain wasn't working as expected either. It is now possible to
dynamically enable/disable the audio visualization support.

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

6 years agoaudioaggregator: Also run the audio-specific caps fixation for audio aggregator subcl...
Sebastian Dröge [Thu, 16 Aug 2018 15:03:37 +0000 (18:03 +0300)]
audioaggregator: Also run the audio-specific caps fixation for audio aggregator subclasses that can't convert

6 years agoaudioaggregator: Fixate to some meaningful values if no sinkpad is configured yet
Sebastian Dröge [Thu, 16 Aug 2018 14:54:00 +0000 (17:54 +0300)]
audioaggregator: Fixate to some meaningful values if no sinkpad is configured yet

The default caps fixation code would select a rate of 1 for example,
which is not really ideal.

6 years agomeson: remove obsolete FIXME
Tim-Philipp Müller [Thu, 16 Aug 2018 10:35:33 +0000 (11:35 +0100)]
meson: remove obsolete FIXME

6 years agomeson: gl: find libjpeg via pkg-config
Tim-Philipp Müller [Thu, 16 Aug 2018 10:08:38 +0000 (11:08 +0100)]
meson: gl: find libjpeg via pkg-config

This effectively (but optionally) requires libjpeg-turbo which
ships with a .pc file and is what pretty much everyone these days
uses anyway for libjpeg, so shouldn't be a problem hopefully.

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

6 years agomeson: move gmodule check to top-level
Tim-Philipp Müller [Thu, 16 Aug 2018 09:58:47 +0000 (10:58 +0100)]
meson: move gmodule check to top-level

It's also needed by the generic/states test and the variable
is currently checked as part of the opengl lib tests so wouldn't
be available if opengl was disabled.

6 years agomeson: add option for opengl and the misc optional gl plugin deps
Tim-Philipp Müller [Thu, 16 Aug 2018 09:28:48 +0000 (10:28 +0100)]
meson: add option for opengl and the misc optional gl plugin deps

Finer control over the opengl integration library dependencies
is already implemented via the gl_api, gl_platform, and gl_winsys
options.

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

6 years agomeson: options: move gl options into separate section
Tim-Philipp Müller [Thu, 16 Aug 2018 09:13:39 +0000 (10:13 +0100)]
meson: options: move gl options into separate section

6 years agoaudioaggregator: Properly propagate caps negotiation failures
Sebastian Dröge [Mon, 13 Aug 2018 11:50:09 +0000 (14:50 +0300)]
audioaggregator: Properly propagate caps negotiation failures

Otherwise we'll end up doing a division by zero when clipping buffers,
and might even accept buffers for which we don't know the caps.

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

6 years agogst-libs: include config.h in all source files
Tim-Philipp Müller [Sat, 28 Apr 2018 13:50:11 +0000 (14:50 +0100)]
gst-libs: include config.h in all source files

This will be needed later when we get our export define from config.h

6 years agopbutils, rtsp: fix deprecation guards
Tim-Philipp Müller [Sat, 28 Apr 2018 23:18:58 +0000 (00:18 +0100)]
pbutils, rtsp: fix deprecation guards

Function body must only be removed if compiling with
GST_REMOVE_DEPRECATED. Function declaration must not
be skipped if GST_DISABLE_DEPRECATED is defined, since
it contains our export decorator and we wouldn't export
the symbol as public API any more then since we compile
with GST_DISABLE_DEPRECATED.

6 years agotests: remove unused build definition
Tim-Philipp Müller [Sat, 28 Apr 2018 12:41:11 +0000 (13:41 +0100)]
tests: remove unused build definition

6 years agomeson: add build options to disable tools and tests
Tim-Philipp Müller [Sun, 12 Aug 2018 17:12:35 +0000 (18:12 +0100)]
meson: add build options to disable tools and tests

6 years agotag: add license to generated backup language name table and update
Tim-Philipp Müller [Sun, 12 Aug 2018 12:19:44 +0000 (13:19 +0100)]
tag: add license to generated backup language name table and update

It's LGPL same as iso-codes

6 years agomeson: use iso-codes in gsttag if available
Tim-Philipp Müller [Sun, 12 Aug 2018 11:55:00 +0000 (12:55 +0100)]
meson: use iso-codes in gsttag if available

6 years agomeson: add zlib to gstreamer-1.0.pc if found
Tim-Philipp Müller [Sat, 11 Aug 2018 23:21:58 +0000 (00:21 +0100)]
meson: add zlib to gstreamer-1.0.pc if found

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

6 years agomeson: add options to disable gobject cast checks and glib asserts
Tim-Philipp Müller [Sat, 11 Aug 2018 23:13:31 +0000 (00:13 +0100)]
meson: add options to disable gobject cast checks and glib asserts

and define G_DISABLE_DEPRECATED for development versions,
like we do in autotools.

6 years agomeson: update available gl_winsys in options list
Tim-Philipp Müller [Sat, 11 Aug 2018 23:09:20 +0000 (00:09 +0100)]
meson: update available gl_winsys in options list

6 years agomeson: tag: check for zlib and support compressed id3v2 tag if found
Tim-Philipp Müller [Sat, 11 Aug 2018 17:49:10 +0000 (18:49 +0100)]
meson: tag: check for zlib and support compressed id3v2 tag if found

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

6 years agoglviewconvert: fix output when a transformation matrix is used
Matthew Waters [Fri, 10 Aug 2018 12:44:12 +0000 (22:44 +1000)]
glviewconvert: fix output when a transformation matrix is used

If we have a transformation matrix, we have no idea where in the output
the video is going to endup.  It might also be different and not cover
the entire output.

We need to clear the output to remove any previous data in the backing
texture.

Found from
https://stackoverflow.com/questions/51707229/python-gstreamer-for-dynamic-control-of-element-properties

6 years agomeson: fix install dir for generated header files
Bastian Köcher [Fri, 10 Aug 2018 11:43:38 +0000 (12:43 +0100)]
meson: fix install dir for generated header files

Nixos installs into a non-standard includedir, so need
to take account of the 'includedir' option instead of
just hard-coding 'include' here.

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

6 years agogst-play: use Fisher-Yates shuffle for shuffling the playlist
Tim-Philipp Müller [Wed, 8 Aug 2018 18:18:22 +0000 (19:18 +0100)]
gst-play: use Fisher-Yates shuffle for shuffling the playlist

6 years agotagdemux: Propagate flow returns from gst_type_find_helper_get_range() properly
Sebastian Dröge [Wed, 8 Aug 2018 10:44:55 +0000 (12:44 +0200)]
tagdemux: Propagate flow returns from gst_type_find_helper_get_range() properly

Instead of considering every failed typefinding as an error, even in
case of e.g. GST_FLOW_FLUSHING.

6 years agortsp: Include gstreamer-base gir dir in autotools
Thibault Saunier [Mon, 6 Aug 2018 18:17:09 +0000 (14:17 -0400)]
rtsp: Include gstreamer-base gir dir in autotools

6 years agogl/meson: fix macos additions for non-macos platforms
Matthew Waters [Fri, 3 Aug 2018 09:06:00 +0000 (19:06 +1000)]
gl/meson: fix macos additions for non-macos platforms

"gst-libs/gst/gl/meson.build:655:20: ERROR:  Unknown variable "quartzcore_dep"."

6 years agogl/meson: OSX support (CGL and Cocoa)
Alessandro Decina [Fri, 21 Jul 2017 06:59:28 +0000 (16:59 +1000)]
gl/meson: OSX support (CGL and Cocoa)

[Matthew Waters]: minor additions such as -fobjc-arc and relying on
dependency rather than cc.find_library()

6 years agoAdd GBM_CFLAGS and define EGL_PLATFORM_GBM_MESA
Norbert Wesp [Wed, 1 Aug 2018 11:59:45 +0000 (13:59 +0200)]
Add GBM_CFLAGS and define EGL_PLATFORM_GBM_MESA

Building an image with yocto for an 'am335x' processor will fail,
because 'gbm.h' can not be found and 'EGL_PLATFORM_GBM_MESA' is not defined.

So simply adding define of 'EGL_PLATFORM_GBM_MESA' in 'gstgldisplay_egl.c'
and adding 'GBM_CFLAGS' in 'gst-gl.m4' to get rid of this errors and complete
a full build process.

ERRORs were:
-----------
gst-plugins-base-1.14.1/gst-libs/gst/gl/gbm/gstglwindow_gbm_egl.h:24:10:
fatal error: gbm.h: No such file or directory
  #include <gbm.h>
           ^~~~~~~

gst-plugins-base-1.14.1/gst-libs/gst/gl/egl/gstgldisplay_egl.c:157:39:
error: 'EGL_PLATFORM_GBM_MESA' undeclared (first use in this function);
did you mean 'EGL_PLATFORM_WAYLAND'?
  ret = _gst_eglGetPlatformDisplay (EGL_PLATFORM_GBM_MESA, (gpointer) display,
                                    ^~~~~~~~~~~~~~~~~~~~~

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

6 years agoopusdec: Add property to control phase inversion
Nicolas Dufresne [Wed, 1 Aug 2018 02:41:16 +0000 (22:41 -0400)]
opusdec: Add property to control phase inversion

When enabled, phase-inversion slightly increase stereo quality, but
produce a stream that when downmixed to mono will present important
audio distortion. This patch disables this feature by default and
introduce a property that let user enable it if desired.

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

6 years agogl/gbm: allow headless mode
freyr [Mon, 30 Jul 2018 07:03:11 +0000 (10:03 +0300)]
gl/gbm: allow headless mode

Don't require an output for the GBM backend.

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

6 years agogl: Add switches for explicitely enabling/disabling PNG and JPEG support
Carlos Rafael Giani [Thu, 19 Jul 2018 09:16:05 +0000 (11:16 +0200)]
gl: Add switches for explicitely enabling/disabling PNG and JPEG support

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

6 years agogl: Add switch for explicitely enabling/disabling GBM support
Carlos Rafael Giani [Thu, 19 Jul 2018 08:30:54 +0000 (10:30 +0200)]
gl: Add switch for explicitely enabling/disabling GBM support

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

6 years agomeson: Fix build with x11 dependency is disabled
Nirbheek Chauhan [Tue, 31 Jul 2018 18:02:42 +0000 (23:32 +0530)]
meson: Fix build with x11 dependency is disabled

gtk_x11_dep is used unconditionally in tests/icles/meson.build

6 years agomeson: Fix detection of cdparanoia library
Nirbheek Chauhan [Tue, 31 Jul 2018 07:58:59 +0000 (13:28 +0530)]
meson: Fix detection of cdparanoia library

Without this the pkg-config file is required when the plugin is enabled.

6 years agotagdemux: Properly propagate gst_pad_pull_range() errors
Sebastian Dröge [Fri, 27 Jul 2018 12:15:34 +0000 (15:15 +0300)]
tagdemux: Properly propagate gst_pad_pull_range() errors

And don't consider FLUSHING an actual error, just stop in that case.

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

6 years agomeson: Add feature options for all plugins
Nirbheek Chauhan [Wed, 25 Jul 2018 02:05:05 +0000 (07:35 +0530)]
meson: Add feature options for all plugins

GL dependency detection is still automagic.

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

6 years agogl: Also don't leak floating references to elements set via properties
Sebastian Dröge [Wed, 25 Jul 2018 12:03:59 +0000 (15:03 +0300)]
gl: Also don't leak floating references to elements set via properties

Fixup for 58ac815eae6ed468d1db60a54a1bd34d6324c28c. Floating references
are such a mess.

6 years agogl: Don't steal callers reference when setting non-floating elements via properties
Sebastian Dröge [Wed, 25 Jul 2018 11:23:36 +0000 (14:23 +0300)]
gl: Don't steal callers reference when setting non-floating elements via properties

Introduced by fbef9220d3dc2f785081c4766901aab2ecfaed10. The code there
is only correct for elements we get from signals.

6 years agoaudio-buffer: fix typo in assignment that causes buggy behavior
George Kiagiadakis [Tue, 24 Jul 2018 12:09:25 +0000 (15:09 +0300)]
audio-buffer: fix typo in assignment that causes buggy behavior

6 years agogstaudiodecoder: take into account GstAudioMeta::samples on the output buffers
George Kiagiadakis [Wed, 14 Feb 2018 11:55:06 +0000 (13:55 +0200)]
gstaudiodecoder: take into account GstAudioMeta::samples on the output buffers

This is useful if the output buffers are planar and have extra padding
on each plane, in which case size/bpf does not represent the number of
valid samples.

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

6 years agogstaudiodecoder: do not aggregate output if buffers are planar
George Kiagiadakis [Wed, 14 Feb 2018 11:11:37 +0000 (13:11 +0200)]
gstaudiodecoder: do not aggregate output if buffers are planar

Aggregation will break the layout, as it concatenates buffers,
and fixing it here would be much more inefficient than configuring
the actual decoder implementation to output larger buffers.

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

6 years agomeson: gl/gtk tests: Add video_dep to the helper
Nicolas Dufresne [Sat, 21 Jul 2018 13:13:27 +0000 (09:13 -0400)]
meson: gl/gtk tests: Add video_dep to the helper

The gtk helper library includes videooverlay.h hence must have a
dependency on video_dep, this allow removing the dep from the dependant
executables.

6 years agomeson: examples: fix wrong keyword for gtk examples
Tim-Philipp Müller [Sat, 21 Jul 2018 10:12:09 +0000 (11:12 +0100)]
meson: examples: fix wrong keyword for gtk examples

6 years agomeson: Build gl/gtk examples
Nicolas Dufresne [Sat, 21 Jul 2018 02:07:04 +0000 (22:07 -0400)]
meson: Build gl/gtk examples

6 years agoaudiorate: accumulate offset by time diff
Justin Kim [Fri, 5 Jan 2018 07:07:54 +0000 (16:07 +0900)]
audiorate: accumulate offset by time diff

The fomula, 'offset = time / rate', is correct only if
the rate is never changed. When the rate is changed,
the offset should be re-calculated based on the previous
offset.

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

6 years agoxvimage: Fix symbol redefine build error
Seungha Yang [Wed, 18 Jul 2018 10:53:26 +0000 (19:53 +0900)]
xvimage: Fix symbol redefine build error

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

6 years agoglupload: Only offer DMABuf caps feature if using EGL
Nicolas Dufresne [Tue, 17 Jul 2018 15:43:40 +0000 (11:43 -0400)]
glupload: Only offer DMABuf caps feature if using EGL

This was miss-leading VAAPI which was not forcing linear back buffers,
would still export DMABuf. That caused bad rendering as the buffers are
tiled and most likely compressed.

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

6 years agourisourcebin: Rename urisourcebin variable and query functions
Wonchul Lee [Thu, 1 Sep 2016 06:14:37 +0000 (15:14 +0900)]
urisourcebin: Rename urisourcebin variable and query functions

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

6 years agourisourcebin: Set streams-aware flag
Seungha Yang [Fri, 11 May 2018 11:25:34 +0000 (20:25 +0900)]
urisourcebin: Set streams-aware flag

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

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

6 years agogl/build: fixed failed compilation due to missing EGLuint64KHR typedef
Iñigo Huguet [Mon, 16 Jul 2018 14:01:34 +0000 (16:01 +0200)]
gl/build: fixed failed compilation due to missing EGLuint64KHR typedef

[Matthew Waters]: add meson differences

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

6 years agoRevert "glupload: Only offer DMABuf caps feature if using EGL"
Nicolas Dufresne [Tue, 17 Jul 2018 15:51:49 +0000 (11:51 -0400)]
Revert "glupload: Only offer DMABuf caps feature if using EGL"

This reverts commit bc9afe724360cbbe5489ca1e1ea44f077810aca4.

6 years agoglupload: Only offer DMABuf caps feature if using EGL
Nicolas Dufresne [Tue, 17 Jul 2018 15:43:40 +0000 (11:43 -0400)]
glupload: Only offer DMABuf caps feature if using EGL

This was miss-leading VAAPI which was not forcing linear back buffers,
would still export DMABuf. That caused bad rendering as the buffers are
tiled and most likely compressed.

6 years agodocs: libs: Add new symbols to section file
Olivier Crête [Mon, 16 Jul 2018 21:09:02 +0000 (17:09 -0400)]
docs: libs: Add new symbols to section file

6 years agorawvideoparse: fix typo in 'plane-offsets' description
Guillaume Desmottes [Mon, 16 Jul 2018 11:12:50 +0000 (13:12 +0200)]
rawvideoparse: fix typo in 'plane-offsets' description

The property is 'plane-offsets', not 'plane-offset' so the example in
the description was wrong.

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

6 years agovideodecoder: Don't always drain on gaps/discont
Nicolas Dufresne [Mon, 9 Jul 2018 18:03:04 +0000 (14:03 -0400)]
videodecoder: Don't always drain on gaps/discont

V4L2 and OMX decoder don't support draining and keeping reference
frames. As a side effect, these decoder just stops working on
gaps/discont. When this drain was introduced, the commit stated that
this was for TRICKMODE_KEY_UNITS, so only drain if running in this mode.

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

6 years agotests: audio: test gst_audio_buffer_reorder_channels() also with non-interleaved...
George Kiagiadakis [Tue, 13 Feb 2018 13:04:04 +0000 (15:04 +0200)]
tests: audio: test gst_audio_buffer_reorder_channels() also with non-interleaved buffers

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

6 years agolibs: audio: implement planar buffer support in gst_audio_buffer_reorder_channels()
George Kiagiadakis [Tue, 13 Feb 2018 11:24:32 +0000 (13:24 +0200)]
libs: audio: implement planar buffer support in gst_audio_buffer_reorder_channels()

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

6 years agoaudiorate: fix support for non-interleaved buffers
George Kiagiadakis [Mon, 12 Feb 2018 12:45:44 +0000 (14:45 +0200)]
audiorate: fix support for non-interleaved buffers

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

6 years agolibs: audio: add a new gst_audio_buffer_truncate() function
George Kiagiadakis [Fri, 18 May 2018 13:22:47 +0000 (16:22 +0300)]
libs: audio: add a new gst_audio_buffer_truncate() function

Essentially this moves the truncation logic out of gst_audio_buffer_clip()
so that it can be used in other places, like in audiorate.

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

6 years agotests: audio: add unit tests for planar audio support in gst_audio_buffer_clip()
George Kiagiadakis [Fri, 18 May 2018 13:22:32 +0000 (16:22 +0300)]
tests: audio: add unit tests for planar audio support in gst_audio_buffer_clip()

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

6 years agolibs: audio: implement support for non-interleaved audio in gst_audio_buffer_clip()
George Kiagiadakis [Thu, 8 Feb 2018 12:34:23 +0000 (14:34 +0200)]
libs: audio: implement support for non-interleaved audio in gst_audio_buffer_clip()

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

6 years agogluploadelement: also set the context in decide_allocation
Matthew Waters [Thu, 12 Jul 2018 03:13:04 +0000 (13:13 +1000)]
gluploadelement: also set the context in decide_allocation

If downstream doesn't perform allocation queries, the context would
never be set and criticals would occur.

6 years agotests: simple-launch-lines: fixate audioconvert caps now that the layout is also...
George Kiagiadakis [Wed, 11 Jul 2018 15:29:52 +0000 (18:29 +0300)]
tests: simple-launch-lines: fixate audioconvert caps now that the layout is also convertable

Because audioconvert can now convert between interleaved and non-interleaved,
this pipeline fails on the upstream capsfilter not being able to fixate its
output caps. This is unavoidable.

6 years agoadder: remove non-interleaved layout from caps
George Kiagiadakis [Mon, 12 Feb 2018 13:33:49 +0000 (15:33 +0200)]
adder: remove non-interleaved layout from caps

adder needs more than just trivial work to support planar buffers properly
because it currently reads sub-buffers from GstCollectPads in order for all
of them to have matching sizes. In planar mode, this means it would truncate
some channels and mix them up in strange ways. It only works if all input
buffers in all sink pads have matching sizes.