platform/upstream/gstreamer.git
4 years agobase: Avoid usage of deprecated API
Edward Hervey [Thu, 10 Oct 2019 15:18:34 +0000 (17:18 +0200)]
base: Avoid usage of deprecated API

GTimeval and related functions are now deprecated in glib.
Replacement APIs have been present since 2.26

4 years agocheck: Don't use real audio devices for tests
Edward Hervey [Thu, 10 Oct 2019 14:58:26 +0000 (16:58 +0200)]
check: Don't use real audio devices for tests

When checking the behaviour of live seeking on audiomixer or
adder we don't *really* need real audio devices. audiotestsrc
in live mode is enough to test the behaviour of those elements.

Also avoids people repeatedly wasting hours trying to figure out
whether that failing behaviour is due to their code or not.

4 years agopbutils: add description for CineForm codec
Tim-Philipp Müller [Tue, 8 Oct 2019 18:35:49 +0000 (19:35 +0100)]
pbutils: add description for CineForm codec

4 years agoriff: add mapping for CineForm codec
Tim-Philipp Müller [Tue, 8 Oct 2019 18:35:23 +0000 (19:35 +0100)]
riff: add mapping for CineForm codec

Makes CineForm-in-AVI work.

4 years agoexamples: add device provider example
Mathieu Duponchelle [Sat, 7 Sep 2019 02:28:46 +0000 (04:28 +0200)]
examples: add device provider example

4 years agoglfilters: Don't use static variables for storing per-element state
Sebastian Dröge [Wed, 2 Oct 2019 20:21:09 +0000 (23:21 +0300)]
glfilters: Don't use static variables for storing per-element state

4 years agoglupload: Add VideoMetas and GLSyncMeta to the raw uploaded buffers
Thibault Saunier [Fri, 27 Sep 2019 14:10:43 +0000 (11:10 -0300)]
glupload: Add VideoMetas and GLSyncMeta to the raw uploaded buffers

This is done by reusing `gst_gl_memory_setup_buffer` avoiding to
duplicate code.

Without a VideoMeta, mapping those buffers lead to GstBuffer mapping the
buffer in system memory even when specifying the GL flags (through the
buffer merging mechanism) making the result totally broken.

4 years agoexamples/gl/sdlshare: port to OpenGL 3.0 core profile
Matthew Waters [Wed, 2 Oct 2019 13:35:36 +0000 (23:35 +1000)]
examples/gl/sdlshare: port to OpenGL 3.0 core profile

4 years agobuild: fix werror build on windows
Matthew Waters [Mon, 30 Sep 2019 14:00:57 +0000 (00:00 +1000)]
build: fix werror build on windows

_isatty() is in the io.h header

4 years agodevice-monitor: fix device listing without --follow
Mathieu Duponchelle [Mon, 30 Sep 2019 14:11:18 +0000 (16:11 +0200)]
device-monitor: fix device listing without --follow

In !427, I removed the call to get_devices in order to always
print added devices from the bus handler, however this requires
the main loop to run until all pending messages have been consumed.

This commit achieves this by always running the main loop, and
simply adding an idle source to quit it in the non --follow case.

4 years agovideo-format: correct the pixel stride for Y410
Haihao Xiang [Mon, 30 Sep 2019 02:27:03 +0000 (10:27 +0800)]
video-format: correct the pixel stride for Y410

The stride for Y410 is 4 bytes, not 0 byte

4 years agoexamples/sdlshare: Map video frames as early as possible and wait via GL sync meta...
Sebastian Dröge [Thu, 14 Mar 2019 15:24:11 +0000 (16:24 +0100)]
examples/sdlshare: Map video frames as early as possible and wait via GL sync meta before using texture ids

4 years agoexamples/sdlshare: Initialize GL as part of the event loop
Sebastian Dröge [Wed, 13 Mar 2019 07:28:58 +0000 (08:28 +0100)]
examples/sdlshare: Initialize GL as part of the event loop

And unref additional buffers we never use for rendering directly instead
of going via the output queue.

4 years agoexamples/sdlshare: Activate and initialize our wrapped GL context
Sebastian Dröge [Wed, 13 Mar 2019 07:20:57 +0000 (08:20 +0100)]
examples/sdlshare: Activate and initialize our wrapped GL context

This allows us to e.g. use the GL functions vtable on it later.

4 years agoexamples/sdlshare: Call gst_init() a bit earlier in main()
Sebastian Dröge [Wed, 13 Mar 2019 06:31:43 +0000 (07:31 +0100)]
examples/sdlshare: Call gst_init() a bit earlier in main()

Let's not accidentally call other GStreamer API before that.

4 years agoexamples/sdlshare: Create an OpenGL context for OpenGL 2.0
Sebastian Dröge [Wed, 13 Mar 2019 06:21:12 +0000 (07:21 +0100)]
examples/sdlshare: Create an OpenGL context for OpenGL 2.0

4 years agoexamples/sdlshare: Switch from a GLib main loop to a normal SDL event loop
Sebastian Dröge [Tue, 12 Mar 2019 21:37:48 +0000 (22:37 +0100)]
examples/sdlshare: Switch from a GLib main loop to a normal SDL event loop

4 years agoexamples/sdlshare: Port to SDL2
Sebastian Dröge [Tue, 12 Mar 2019 21:09:18 +0000 (22:09 +0100)]
examples/sdlshare: Port to SDL2

4 years agoexamples/sdlshare: Move from a fakesink to an appsink
Sebastian Dröge [Tue, 12 Mar 2019 20:31:24 +0000 (21:31 +0100)]
examples/sdlshare: Move from a fakesink to an appsink

4 years agoexamples/sdlshare: Store buffer queues and loop in a global variable
Sebastian Dröge [Tue, 12 Mar 2019 20:29:07 +0000 (21:29 +0100)]
examples/sdlshare: Store buffer queues and loop in a global variable

There's no point storing them in GObject data, we already have other
global variables anyway.

4 years agoexamples/sdlshare: Bus sync handlers return no value
Sebastian Dröge [Tue, 12 Mar 2019 20:24:03 +0000 (21:24 +0100)]
examples/sdlshare: Bus sync handlers return no value

4 years agoexamples/sdlshare: Fix various memory leaks
Sebastian Dröge [Tue, 12 Mar 2019 20:20:24 +0000 (21:20 +0100)]
examples/sdlshare: Fix various memory leaks

4 years agoalsasink: pause/resume
Axel Mårtensson [Mon, 18 Jun 2018 08:49:28 +0000 (10:49 +0200)]
alsasink: pause/resume

alsasink can now detect a resume, stop and pause. The sink is now
properly paused using snd_pcm_pause(), and without losing any data

4 years agoaudiosink: fix resuming after pause
Axel Mårtensson [Mon, 18 Jun 2018 08:44:55 +0000 (10:44 +0200)]
audiosink: fix resuming after pause

For resuming after paused, gst_audio_sink_ring_buffer_start() needs to
be called to notify the ringbuffer to continue to play.

4 years agoaudiosink: expose more audioringbuffer vmethods to child sinks
Philippe Renon [Tue, 10 Oct 2017 18:41:31 +0000 (20:41 +0200)]
audiosink: expose more audioringbuffer vmethods to child sinks

The newly exposed vmethods are pause, resume, stop and clear_all.
The existing reset vmethod is deprecated.

The audio sink will fallback to calling reset if pause or stop
are not provided and will fallback to calling start if
resume is not provided. There is no default clear_all
implementation.
Existing audio sinks continue to work as before.

This change is useful for sinks that need to distinguish
between a pause and a stop (currently both are handled
by a reset) and is needed for https://bugzilla.gnome.org/show_bug.cgi?id=788362

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

4 years agogst-play: Add support for interacting console input on Windows
Seungha Yang [Tue, 24 Sep 2019 06:05:30 +0000 (15:05 +0900)]
gst-play: Add support for interacting console input on Windows

Add Windows keyboard input handler. This could make gst-play UX
consistent between *nix and Windows.

4 years agostreamsynchronizer: avoid pad destruction races.
Charlie Turner [Fri, 20 Sep 2019 08:48:30 +0000 (09:48 +0100)]
streamsynchronizer: avoid pad destruction races.

Due to the use of {set/get}-element_private methods being used to store
the GstSyncStream in the src and sink pads, and the racey nature of pad
destruction, there are numerous ways we can be bitten by race conditions
in the stream synchronizer. Fix that by tying the pads toghether with
references.

4 years agoaudio: Use LoadPackagedLibrary when building for UWP
Nirbheek Chauhan [Fri, 10 May 2019 02:02:21 +0000 (07:32 +0530)]
audio: Use LoadPackagedLibrary when building for UWP

Universal Windows Platform apps are not allowed to use LoadLibrary to
load arbitrary DLLs from the filesystem. They can only use
LoadPackagedLibrary to load DLLs that have been packaged with the app
as assets.

See also: https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/190

4 years agogst-play: Use gst_print* to avoid broken stdout string on Windows
Seungha Yang [Tue, 24 Sep 2019 06:32:33 +0000 (15:32 +0900)]
gst-play: Use gst_print* to avoid broken stdout string on Windows

Equvalant to https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/258

When debug enabled, the debug string might be broken on Windows.

4 years agobuild: fix debug output werror build with newer gcc
Matthew Waters [Mon, 23 Sep 2019 05:39:55 +0000 (15:39 +1000)]
build: fix debug output werror build with newer gcc

In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../gst-libs/gst/tag/tag.h:25,
                 from ../gst-libs/gst/tag/gsttageditingprivate.h:24,
                 from ../gst-libs/gst/tag/gsttageditingprivate.c:23:
../gst-libs/gst/tag/gsttageditingprivate.c: In function ‘__exif_tag_capturing_white_balance_to_exif_value’:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1068:27: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1068 | #define GST_WARNING(...)  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~
../gst-libs/gst/tag/gsttageditingprivate.c:265:3: note: in expansion of macro ‘GST_WARNING’
  265 |   GST_WARNING ("Invalid white balance: %s", str);
      |   ^~~~~~~~~~~
../gst-libs/gst/tag/gsttageditingprivate.c:265:40: note: format string is defined here
  265 |   GST_WARNING ("Invalid white balance: %s", str);
      |                                        ^~

In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../gst-libs/gst/tag/tag.h:25,
                 from ../gst-libs/gst/tag/gstxmptag.c:39:
../gst-libs/gst/tag/gstxmptag.c: In function ‘deserialize_exif_gps_direction’:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1068:27: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1068 | #define GST_WARNING(...)  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~
../gst-libs/gst/tag/gstxmptag.c:818:5: note: in expansion of macro ‘GST_WARNING’
  818 |     GST_WARNING ("Missing %s tag", dirref_str);
      |     ^~~~~~~~~~~
../gst-libs/gst/tag/gstxmptag.c:818:27: note: format string is defined here
  818 |     GST_WARNING ("Missing %s tag", dirref_str);
      |                           ^~
In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../gst-libs/gst/tag/tag.h:25,
                 from ../gst-libs/gst/tag/gstxmptag.c:39:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1068:27: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1068 | #define GST_WARNING(...)  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~
../gst-libs/gst/tag/gstxmptag.c:814:5: note: in expansion of macro ‘GST_WARNING’
  814 |     GST_WARNING ("Missing %s tag", dir_str);
      |     ^~~~~~~~~~~
../gst-libs/gst/tag/gstxmptag.c:814:27: note: format string is defined here
  814 |     GST_WARNING ("Missing %s tag", dir_str);
      |                           ^~

In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../gst-libs/gst/gl/gstgl_fwd.h:24,
                 from ../gst-libs/gst/gl/gl.h:24,
                 from ../gst-libs/gst/gl/gstglsl.c:25:
../gst-libs/gst/gl/gstglsl.c: In function ‘gst_glsl_version_profile_from_string’:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1068:27: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1068 | #define GST_WARNING(...)  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~
../gst-libs/gst/gl/gstglsl.c:333:7: note: in expansion of macro ‘GST_WARNING’
  333 |       GST_WARNING ("Invalid preprocesser directive detected: %s", version_s);
      |       ^~~~~~~~~~~
../gst-libs/gst/gl/gstglsl.c:333:62: note: format string is defined here
  333 |       GST_WARNING ("Invalid preprocesser directive detected: %s", version_s);
      |                                                              ^~

In function ‘print_stream_info’,
    inlined from ‘print_topology’ at ../tools/gst-discoverer.c:352:3:
../tools/gst-discoverer.c:316:3: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  316 |   g_print ("%*s%s: %s\n", 2 * GPOINTER_TO_INT (depth), " ",
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  317 |       gst_discoverer_stream_info_get_stream_type_nick (info), desc);
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4 years agogst-device-monitor: stop calling gst_device_monitor_get_devices()
Mathieu Duponchelle [Tue, 10 Sep 2019 23:29:23 +0000 (01:29 +0200)]
gst-device-monitor: stop calling gst_device_monitor_get_devices()

See https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/280

4 years agodevice-monitor: print caps features in the caps
Matthew Waters [Tue, 17 Sep 2019 11:33:49 +0000 (21:33 +1000)]
device-monitor: print caps features in the caps

4 years agoglimagesink: Fix VUYA in memory:DMABuf
Haihao Xiang [Mon, 16 Sep 2019 03:03:59 +0000 (11:03 +0800)]
glimagesink: Fix VUYA in memory:DMABuf

Sample pipeline:
gst-launch-1.0 videotestsrc ! msdkvpp ! \
video/x-raw\(memory:DMABuf\),format=VUYA ! glimagesink

4 years agoegldevice: Fix undeclared type build error
Seungha Yang [Wed, 28 Aug 2019 05:50:24 +0000 (14:50 +0900)]
egldevice: Fix undeclared type build error

Not all eglext.h defines EGLDeviceEXT type. That's implementation and
egl extension version dependent.

4 years agotests: fix up valgrind suppressions for glibc getaddrinfo leaks
Tim-Philipp Müller [Sun, 8 Sep 2019 00:03:57 +0000 (01:03 +0100)]
tests: fix up valgrind suppressions for glibc getaddrinfo leaks

Make more flexible. There is an extra
  gethostbyname2_r@@GLIBC_2.2.5 (getXXbyYY_r.c:217)
in the trace on the build bots (F30).

Fixes the -base and -good valgrind jobs on the 1.16 branch CI.

4 years agooggdemux: Move seeking in pull mode to the streaming thread
Thibault Saunier [Thu, 29 Aug 2019 15:16:39 +0000 (11:16 -0400)]
oggdemux: Move seeking in pull mode to the streaming thread

Flushing and teering down the streaming thread from the seeking thread
and simply letting the streaming thread handle the seek event in its
loop function.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/639

4 years agostreamsplitter: Drop duplicated force-key-unit events
Seungha Yang [Sun, 15 Apr 2018 10:19:34 +0000 (19:19 +0900)]
streamsplitter: Drop duplicated force-key-unit events

Forward force-key-unit event only once for the corresponding sequence number.

4 years agostreamcombiner: Forward upstream force-key-unit events to all sinkpads
Seungha Yang [Sun, 15 Apr 2018 10:15:28 +0000 (19:15 +0900)]
streamcombiner: Forward upstream force-key-unit events to all sinkpads

streamcombiner element forwards a upstream event only to one sinkpad.
When the streamcombiner is used with encodebin, the sinkpad
corresponding to pass-through path is configured before that of encoder,
and therefore streamcombiner forwards upstream events only to
the firstly configured one (i.e., pass-through path).

4 years agomeson: Reenable NEON support
Doug Nazar [Mon, 2 Sep 2019 20:20:07 +0000 (16:20 -0400)]
meson: Reenable NEON support

4 years agoaudio-resampler: Update NEON to handle remainders not multiples of 4
Doug Nazar [Tue, 3 Sep 2019 03:25:39 +0000 (23:25 -0400)]
audio-resampler: Update NEON to handle remainders not multiples of 4

If the remainder is not evenly divisable by 4, we'd miss the check
for zero and continue the loop until crashing. Change the branch
to take into account negatives as well.

This more closely matches the SSE loop.

4 years agoPass the code through codespell
Thibault Saunier [Thu, 29 Aug 2019 17:42:39 +0000 (13:42 -0400)]
Pass the code through codespell

4 years agooggdemux: fix werror build on macos
Matthew Waters [Fri, 30 Aug 2019 03:27:28 +0000 (13:27 +1000)]
oggdemux: fix werror build on macos

../ext/ogg/gstoggdemux.c:1071:7: error: format specifies type 'long' but the argument has type 'ogg_int64_t' (aka 'long long') [-Werror,-Wformat]
      packet->granulepos);
      ^~~~~~~~~~~~~~~~~~~
/Library/Frameworks/GStreamer.framework/Versions/1.0/include/gstreamer-1.0/gst/gstinfo.h:1062:96: note: expanded from macro 'GST_DEBUG_OBJECT'
#define GST_DEBUG_OBJECT(obj,...)       GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   obj,  __VA_ARGS__)
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Library/Frameworks/GStreamer.framework/Versions/1.0/include/gstreamer-1.0/gst/gstinfo.h:646:31: note: expanded from macro 'GST_CAT_LEVEL_LOG'
        (GObject *) (object), __VA_ARGS__);                             \
                              ^~~~~~~~~~~
../ext/ogg/gstoggdemux.c:1312:15: error: format specifies type 'long' but the argument has type 'ogg_int64_t' (aka 'long long') [-Werror,-Wformat]
              packet.granulepos);
              ^~~~~~~~~~~~~~~~~~
/Library/Frameworks/GStreamer.framework/Versions/1.0/include/gstreamer-1.0/gst/gstinfo.h:1060:98: note: expanded from macro 'GST_WARNING_OBJECT'
#define GST_WARNING_OBJECT(obj,...)     GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj,  __VA_ARGS__)
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Library/Frameworks/GStreamer.framework/Versions/1.0/include/gstreamer-1.0/gst/gstinfo.h:646:31: note: expanded from macro 'GST_CAT_LEVEL_LOG'
        (GObject *) (object), __VA_ARGS__);                             \
                              ^~~~~~~~~~~

4 years agogl: also build plugin with -fobjc-arc
Matthew Waters [Fri, 30 Aug 2019 03:13:54 +0000 (13:13 +1000)]
gl: also build plugin with -fobjc-arc

Fixes macos werror build

../ext/gl/caopengllayersink.m:336:23: error: '__bridge_retained' casts have no effect when not using ARC [-Werror,-Warc-bridge-casts-disallowed-in-nonarc]
    ca_sink->layer = (__bridge_retained gpointer)layer;
                      ^~~~~~~~~~~~~~~~~~

4 years agoglwindow/cocoa: silence unused-variable warning
Matthew Waters [Fri, 30 Aug 2019 03:00:14 +0000 (13:00 +1000)]
glwindow/cocoa: silence unused-variable warning

We are using ARC to cleanup after ourselves.

../gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m:159:20: error: unused variable 'queue' [-Werror,-Wunused-variable]
  dispatch_queue_t queue = (__bridge_transfer dispatch_queue_t) window->priv->gl_queue;
                   ^

4 years agom4/gst-gl: Add dummy GST_GL_HAVE_WINDOW_WINRT
Jan Schmidt [Wed, 28 Aug 2019 14:48:16 +0000 (00:48 +1000)]
m4/gst-gl: Add dummy GST_GL_HAVE_WINDOW_WINRT

Add a dummy define to make fix the autotools build for now. To
actually build WinRT support, use the meson build.

4 years agoglcontext/egl: fallback to WINDOW_BIT if PBUFFER_BIT fails
Matthew Waters [Wed, 28 Aug 2019 15:21:12 +0000 (01:21 +1000)]
glcontext/egl: fallback to WINDOW_BIT if PBUFFER_BIT fails

There are some drivers that do not advertise any PBUFFER EGLConfig's.

4 years agoeglimage: Fix memory leak
Jonas Larsson [Wed, 28 Aug 2019 18:24:01 +0000 (11:24 -0700)]
eglimage: Fix memory leak

Also free the GstEGLImage struct allocated by g_new0.

Fixes #661

4 years ago{audio,video}aggregator: define autoptr cleanup functions
Mathieu Duponchelle [Mon, 26 Aug 2019 22:10:32 +0000 (00:10 +0200)]
{audio,video}aggregator: define autoptr cleanup functions

4 years agoaudiodecoder: fix ctitical info assertion 'GST_IS_CAPS (dec->priv->ctx.caps)' failed
Hou Qi [Wed, 21 Aug 2019 11:04:56 +0000 (19:04 +0800)]
audiodecoder: fix ctitical info assertion 'GST_IS_CAPS (dec->priv->ctx.caps)' failed

Matroskademux will send gap event when lag of video and audio is over 3 seconds.
audiodecoder needs to handle gap event and set default output caps.
Only audio info is set, while output caps is ignored. This cause the assertion failed.

Need to fill output caps in gst_audio_decoder_negotiate_default_caps() with
negotiated caps to avoid critical info printed when check it later.

4 years agogstgl: Add a new window type for WinRT
Nirbheek Chauhan [Tue, 21 May 2019 06:14:39 +0000 (11:44 +0530)]
gstgl: Add a new window type for WinRT

This is needed for using GstGL with ANGLE as the GLES implementation
in Universal Windows Platform apps that use the Windows Runtime
(WinRT) instead of Win32, which is deprecated and not allowed in
Windows Store apps.

This has been tested with Servo on the Microsoft HoloLens 2, and seems
to work quite well.

4 years agoencoding-target: fix SECTION comment syntax
Mathieu Duponchelle [Mon, 26 Aug 2019 23:03:40 +0000 (01:03 +0200)]
encoding-target: fix SECTION comment syntax

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/658

4 years agoDon't pass default GLib marshallers for signals
Niels De Graef [Mon, 26 Aug 2019 05:54:48 +0000 (07:54 +0200)]
Don't pass default GLib marshallers for signals

By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.

4 years agodocstrings: port ulinks to markdown links
Mathieu Duponchelle [Fri, 23 Aug 2019 16:28:16 +0000 (18:28 +0200)]
docstrings: port ulinks to markdown links

4 years agopo: update POTFILES
Piotr Drąg [Wed, 21 Aug 2019 14:50:12 +0000 (14:50 +0000)]
po: update POTFILES

4 years agogl/egl/display: Add support EGLDevice display type
Seungha Yang [Thu, 4 Apr 2019 08:41:13 +0000 (17:41 +0900)]
gl/egl/display: Add support EGLDevice display type

Simple addition for supporting EXT_platform_device typed display.
It's a kind of special display type (part of EGL specification)
which has no window at all.
To use EGLDevice explicitly, set environment "GST_GL_WINDOW=egl-device"

See also https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_platform_device.txt

4 years agoglwindow: Introduce new vfunc for querying output surface availability
Seungha Yang [Thu, 4 Apr 2019 15:43:02 +0000 (00:43 +0900)]
glwindow: Introduce new vfunc for querying output surface availability

Only dummy window will return FALSE for now.

4 years agovideo-hdr: Update documentation
Seungha Yang [Tue, 20 Aug 2019 12:10:45 +0000 (21:10 +0900)]
video-hdr: Update documentation

* Fix typo
s/nunormalized/normalized/g

* Update GstVideoMasteringDisplayInfo description
Each values are not array.

* Add missing newline between arguments description and
detailed comment.

4 years agogl: New pushsrc-based glbasesrc base class
Philippe Normand [Wed, 7 Aug 2019 15:15:40 +0000 (16:15 +0100)]
gl: New pushsrc-based glbasesrc base class

The gltestsrc element was refactored to inherit from this base class which
handles the GL context. The sub-class only needs to implement the gl_start,
gl_stop and fill_gl_memory vfuncs, along with properly advertizing the GL APIs
it supports through the supported_gl_api GstGLBaseSrc class attribute.

4 years agovideo-frame: Take TFF flag from the video info if it was set in there
Sebastian Dröge [Fri, 16 Aug 2019 08:58:28 +0000 (11:58 +0300)]
video-frame: Take TFF flag from the video info if it was set in there

The caps and thus the video info have preference. If the field order is
set in there then it applies to all frames.

This works around issues where the tff field order is only set in the
caps but not additionally in the buffer flags.

4 years agoaudioaggregator: add missing Since tag
Mathieu Duponchelle [Mon, 12 Aug 2019 16:00:34 +0000 (18:00 +0200)]
audioaggregator: add missing Since tag

4 years agoglcolorconvert: Fix external-oes shader
Xavier Claessens [Fri, 9 Aug 2019 20:04:03 +0000 (16:04 -0400)]
glcolorconvert: Fix external-oes shader

The #extention must come before 'precision highp float;'.

Closes: #650

4 years agovideo-hdr: Fix document typo
Seungha Yang [Mon, 12 Aug 2019 13:42:10 +0000 (22:42 +0900)]
video-hdr: Fix document typo

Fix missing document update. GstVideoContentLightMeta was changed to
GstVideoContentLightLevel during code review.

4 years agovideo-color: keep UNKNOWN colorimetry define automatically up-to-date
Tim-Philipp Müller [Sun, 11 Aug 2019 13:16:51 +0000 (14:16 +0100)]
video-color: keep UNKNOWN colorimetry define automatically up-to-date

Follow-up to !310 and helps with backport commits like !360

4 years agogl: Add support for P016 format
Seungha Yang [Thu, 8 Aug 2019 02:43:03 +0000 (11:43 +0900)]
gl: Add support for P016 format

All implementation for P010_10LE/BE can be reused.

4 years agovideo: Add P016 LE/BE formats
Seungha Yang [Wed, 7 Aug 2019 16:06:57 +0000 (01:06 +0900)]
video: Add P016 LE/BE formats

Add semi-planar 4:2:0 16 bits format.

4 years agotimeoverlay: chain up finalize
Mathieu Duponchelle [Wed, 7 Aug 2019 18:18:34 +0000 (20:18 +0200)]
timeoverlay: chain up finalize

Mistakenly forgot to amend this in for !325

4 years agovideo: Add Y444_16LE and Y444_16BE formats
Seungha Yang [Tue, 6 Aug 2019 12:49:04 +0000 (21:49 +0900)]
video: Add Y444_16LE and Y444_16BE formats

Add 16 bits planar 4:4:4 YUV formats.

4 years agovideo-anc: Fix ADF detection when trying to extract data from vanc
Sebastian Dröge [Wed, 7 Aug 2019 10:01:07 +0000 (13:01 +0300)]
video-anc: Fix ADF detection when trying to extract data from vanc

Previously we were checking offset 1 twice, but the second check
should've been for offset 2.

4 years agotimeoverlay: add a property to show times as dates
Mathieu Duponchelle [Wed, 10 Jul 2019 12:00:56 +0000 (14:00 +0200)]
timeoverlay: add a property to show times as dates

In this mode, buffer timestamps are displayed as an absolute date
since a user-specifiable epoch. The format is also specifiable as
a string property, that will be passed to g_date_time_format().

4 years agoplayback-test: plug some memory leaks
Aaron Boxer [Fri, 2 Aug 2019 14:26:24 +0000 (10:26 -0400)]
playback-test: plug some memory leaks

4 years agoexiftag: Don't output rational numbers with denominator = 0
Jan Schmidt [Mon, 29 Jul 2019 18:01:55 +0000 (04:01 +1000)]
exiftag: Don't output rational numbers with denominator = 0

4 years agogl/wayland: fix wayland event source burning CPU
Lucas Stach [Tue, 28 May 2019 15:43:25 +0000 (17:43 +0200)]
gl/wayland: fix wayland event source burning CPU

Commit c71dd72b "gl/wayland: fix glib mainloop integration" was overeager
in removing the poll result test from the check function. This caused
dispatch to be called even if no new events are available on the
Wayland connection, which in turn would wake up the glib mainloop,
causing effectively a tight loop without ever blocking on the poll.

Fixes #603

4 years agoAdd used attribute in order to make NEON detection working with -flto.
Martin Liska [Wed, 24 Jul 2019 08:12:17 +0000 (10:12 +0200)]
Add used attribute in order to make NEON detection working with -flto.

4 years agogluploadelement: don't passthrough on same caps
Matthew Waters [Wed, 24 Jul 2019 04:25:19 +0000 (14:25 +1000)]
gluploadelement: don't passthrough on same caps

If we do, then multiple disjoint OpenGL contexts will not perform the
necessary download and reupload of data that is necessary to cross between
each OpenGL context sharegroup.

4 years agotypefindfunctions: Check for NULL return of gst_type_find_peek() instead of segfaulti...
Sebastian Dröge [Tue, 23 Jul 2019 10:54:24 +0000 (13:54 +0300)]
typefindfunctions: Check for NULL return of gst_type_find_peek() instead of segfaulting in otio typefinder

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/329#note_194943

4 years agogldisplay: fix g-i warning
Wonchul Lee [Tue, 23 Jul 2019 00:09:35 +0000 (09:09 +0900)]
gldisplay: fix g-i warning

4 years agotypefind: Add typefind functions for fcpxml, xmel and otio file formats
Thibault Saunier [Fri, 12 Jul 2019 20:37:10 +0000 (16:37 -0400)]
typefind: Add typefind functions for fcpxml, xmel and otio file formats

4 years agoaggregator tests: fix seek event seqnums
Mathieu Duponchelle [Fri, 19 Jul 2019 16:52:02 +0000 (18:52 +0200)]
aggregator tests: fix seek event seqnums

In
https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/207,
aggregator starts ignoring seek events with duplicate seqnums. We thus
need to update the seqnum of events when reusing them multiple times.

4 years agovideo-format: add gst_video_format_info_component()
Guillaume Desmottes [Tue, 16 Jul 2019 10:23:01 +0000 (12:23 +0200)]
video-format: add gst_video_format_info_component()

New API to find out which components are packed in a given plane.
Will prevent us from assuming a 1-1 mapping between planes and
components.

4 years agobasedepayload: do not create segment in onvif mode
Mathieu Duponchelle [Fri, 12 Jul 2019 14:56:52 +0000 (16:56 +0200)]
basedepayload: do not create segment in onvif mode

basedepayload generates its own segment in a pretty unconventional
manner, relying on information in the caps such as npt-start or
npt-stop, usually set by rtspsrc.

In ONVIF mode, rtspsrc will generate the correct segment and this
logic in rtpbasedepayload will not be needed, this commit allows
rtspsrc to signal that through the caps.

4 years agoaudioaggregator: Split getcaps() function into two
Sebastian Dröge [Thu, 18 Jul 2019 05:46:42 +0000 (08:46 +0300)]
audioaggregator: Split getcaps() function into two

One for convert pads and one for normal sink pads.

4 years agovideoaggregator: We can only convert the format if a GstVideoAggregatorConvertPad...
Sebastian Dröge [Tue, 16 Jul 2019 07:40:16 +0000 (10:40 +0300)]
videoaggregator: We can only convert the format if a GstVideoAggregatorConvertPad is used

Otherwise assume that we can at least support any framerate.

4 years agoaudioaggregator: Always take first configure pad's rate and downstream caps into...
Sebastian Dröge [Tue, 16 Jul 2019 07:34:24 +0000 (10:34 +0300)]
audioaggregator: Always take first configure pad's rate and downstream caps into account when calculating allow sink caps

While we can convert between all formats apart from the rate, we
actually need to make sure that we comply with a) the rate of the first
configured pad and b) also all the allowed rates from downstream.

4 years agoaudioaggregator: If we don't have a GstAudioAggregatorConvertPad, don't assume that...
Sebastian Dröge [Tue, 16 Jul 2019 07:02:08 +0000 (10:02 +0300)]
audioaggregator: If we don't have a GstAudioAggregatorConvertPad, don't assume that we can actually convert

4 years agoaudioaggregator: always use downstream's rate requirements
Mathieu Duponchelle [Mon, 15 Jul 2019 14:08:34 +0000 (16:08 +0200)]
audioaggregator: always use downstream's rate requirements

We were previously only fixating the rate in the getcaps
implementation when downstream was requiring a discrete value,
causing negotiation to fail when upstream was capable of rate
conversion, but not made aware that it had to occur.

Instead of fixating the rate, we can simply update our sink
template caps with whatever GValue the downstream caps are holding
as their rate field.

Allows negotiation to successfully complete with pipelines such as:

audiotestsrc ! audio/x-raw, rate=48000 ! audioresample ! audiomixer name=m ! \
audio/x-raw, rate={800, 1000} ! autoaudiosink \
audiotestsrc ! audio/x-raw, rate=44100 ! audioresample ! m.

4 years agomeson: Don't generate doc cache when no plugins are enabled
Nirbheek Chauhan [Wed, 17 Jul 2019 13:41:12 +0000 (19:11 +0530)]
meson: Don't generate doc cache when no plugins are enabled

Fixes gst-build with -Dauto-features=disabled

4 years agovideo-color: Enhance documentation of gst_video_colorimetry_to_string()
Seungha Yang [Tue, 16 Jul 2019 17:44:12 +0000 (02:44 +0900)]
video-color: Enhance documentation of gst_video_colorimetry_to_string()

It could return null string. So need to clarify when it will be null.

4 years agotests: video: Add test conversion between colorimetry and ISO/IEC 23001-8 values
Seungha Yang [Wed, 10 Jul 2019 03:46:17 +0000 (12:46 +0900)]
tests: video: Add test conversion between colorimetry and ISO/IEC 23001-8 values

Test forward/backword conversion of color{matrix,transfer,primaries}.

4 years agovideo-color: Add util functions for conversion from/to ISO/IEC 23001-8
Seungha Yang [Tue, 9 Jul 2019 15:16:58 +0000 (00:16 +0900)]
video-color: Add util functions for conversion from/to ISO/IEC 23001-8

... and also as known as ITU-T H.273.

The conversion has been handled per plugin for now. That causes
code duplication a lot also some plugins might not be updated with newly introduced
color{matrix,transfer,primaries} enum value(s).

Instead of handling it per plugin, centralized handling can remove such
code duplication and make plugins be up-to-dated.

4 years agosdp: Add support for parsing the extmap attribute from caps and storing inside caps
Sebastian Dröge [Tue, 9 Jul 2019 11:28:46 +0000 (14:28 +0300)]
sdp: Add support for parsing the extmap attribute from caps and storing inside caps

The extmap attribute allows mapping RTP extension header IDs to
well-known RTP extension header specifications. See RFC8285 for details.

We store the extmap attribute either as string in the caps
  extmap-X=extensionname
where X is the integer extension header ID, or as 3-tuple of strings
  extmap-X=<direction,extensionname,extensionattributes>
where direction or extensionattributes are allowed to be the empty
string.

Both formats are allowed because usually only the extension name is
given and it's much simpler to handle in caps.

4 years agoRevert "typefind: Hold off making suggestions too early for MPEG based formats"
Thibault Saunier [Wed, 10 Jul 2019 21:57:13 +0000 (21:57 +0000)]
Revert "typefind: Hold off making suggestions too early for MPEG based formats"

This reverts commit 36319169d06f778acee2b33d728d2089d15370d6

4 years agotypefind: Hold off making suggestions too early for MPEG based formats
Thomas Bluemel [Wed, 26 Jun 2019 21:53:11 +0000 (15:53 -0600)]
typefind: Hold off making suggestions too early for MPEG based formats

By suggesting possible detection too early, it's possible that
the wrong format is detected. Hold off making suggestions until one
of the following conditions is met:
* Probability > GST_TYPE_FIND_LIKELY
* At least MPEG_MIN_PROBE_LENGTH bytes have been examined
* EOS, in which case the best guess wins

Fixes #628

4 years agoexamples: win32-videooverlay: Fix C2440 build error
Seungha Yang [Tue, 9 Jul 2019 16:27:43 +0000 (01:27 +0900)]
examples: win32-videooverlay: Fix C2440 build error

Follow WNDPROC define to avoid implicit type conversion.

4 years agogstgldisplay: Add public foreign_display property
Dylan McCall [Wed, 26 Jun 2019 02:15:29 +0000 (19:15 -0700)]
gstgldisplay: Add public foreign_display property

We use this property in gst_gl_display_egl_from_gl_display, to set
foreign_display for the new GstGLDisplayEGL instance. This fixes a
problem where gst_gl_display_egl_finalize calls EglTerminate on a
pre-existing EGL connection.

4 years agotag: Add tags for acoustid id & acoustid fingerprint
Sumaid Syed [Fri, 5 Jul 2019 14:44:34 +0000 (20:14 +0530)]
tag: Add tags for acoustid id & acoustid fingerprint

Mapping followed: https://picard.musicbrainz.org/docs/mappings/

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/612

4 years agotag: Repair support for MusicBrainz IDs
Sumaid [Wed, 22 May 2019 08:56:42 +0000 (14:26 +0530)]
tag: Repair support for MusicBrainz IDs

Add missing release group ID and track ID
Mapping Followed:
https://picard.musicbrainz.org/docs/mappings/

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/612

4 years agoexamples: Add a video overlay example for WIN32 videosink elements
Seungha Yang [Sat, 6 Jul 2019 08:02:27 +0000 (17:02 +0900)]
examples: Add a video overlay example for WIN32 videosink elements

User can set the target WIN32 video element via "videosink" command line
option. Default is glimagesink.

4 years agoegl: wl_egl_window is not wl_proxy
Marc Leeman [Wed, 3 Jul 2019 09:07:06 +0000 (09:07 +0000)]
egl: wl_egl_window is not wl_proxy

It seems that eglCreatePlatformWindowSurfaceEXT is failing (with
EGL_BAD_ALLOC) because it thinks an EGL surface has already been created
for the wl_egl_window. The reason is that the "driver_private" field of
the wl_egl_window is getting clobbered by the function
wl_proxy_set_queue().

Since a wl_egl_window is not a wl_proxy, it shouldn't be passed to
wl_proxy_set_queue(). It just wraps a wl_surface (which is a wl_proxy).
And it looks like the queue for that surface is getting set earlier on
in the function anyway.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/621#note_184582

5 years agogst-play: Handle "space" key event correctly on Windows
Seungha Yang [Sun, 30 Jun 2019 04:10:50 +0000 (13:10 +0900)]
gst-play: Handle "space" key event correctly on Windows

The key name string given by GetKeyNameText() can have uppercase letter.

5 years agortspconnection: data-offset increase not set
Göran Jönsson [Fri, 28 Jun 2019 05:22:17 +0000 (07:22 +0200)]
rtspconnection: data-offset increase not set