platform/upstream/gstreamer.git
5 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.

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

5 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__);                             \
                              ^~~~~~~~~~~

5 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;
                      ^~~~~~~~~~~~~~~~~~

5 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;
                   ^

5 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.

5 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.

5 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

5 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

5 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.

5 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.

5 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

5 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.

5 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

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

5 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

5 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.

5 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.

5 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.

5 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.

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

5 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

5 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.

5 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

5 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.

5 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.

5 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

5 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.

5 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.

5 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().

5 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

5 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

5 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

5 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.

5 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.

5 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

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

5 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

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.

5 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

5 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.

5 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

5 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.

5 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}.

5 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.

5 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.

5 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

5 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

5 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.

5 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.

5 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

5 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

5 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.

5 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

5 years agortpsconnection: Fix number of n_vectors
Göran Jönsson [Thu, 27 Jun 2019 06:04:07 +0000 (08:04 +0200)]
rtpsconnection: Fix number of n_vectors

Body_offset mean that so much data have been written.

Without this patch n_vectors somtimes  becomes one more than it should
and then there will be an vector that have a random size causing
writev_bytes to cause a "Bad address" error.

5 years agovideo-color: Add compile-time assert for ColorimetryInfo enum
Nirbheek Chauhan [Wed, 26 Jun 2019 11:35:04 +0000 (17:05 +0530)]
video-color: Add compile-time assert for ColorimetryInfo enum

A comment is not sufficient because this will break when
cherry-picking or backporting commits.

5 years agoaudiodecoder: Fix leak on failed audio gaps
Doug Nazar [Wed, 26 Jun 2019 07:39:54 +0000 (03:39 -0400)]
audiodecoder: Fix leak on failed audio gaps

If we fail to process the gap event we need to unref the event or
we end up with a leak.

5 years agocompositor: fix compiler warning due to c99-ism
Tim-Philipp Müller [Mon, 24 Jun 2019 09:44:29 +0000 (09:44 +0000)]
compositor: fix compiler warning due to c99-ism

5 years agoglupload: Keep track of cached EGLImage texture format
Philippe Normand [Sun, 23 Jun 2019 10:34:49 +0000 (11:34 +0100)]
glupload: Keep track of cached EGLImage texture format

This patch fixes the following critical warning:

CRITICAL **: 11:33:32.843: Unknown GL format 0x0 provided

It would happen during the setup of a second pipeline involving the DMABuf
uploader, typically with a v4l2src element. The warning was raised because the
uploader had a cached EGLImage already filled but the formats were not
synchronized accordingly.

5 years agovideo-info: parse field-order for all interleaved formats
Marco Felsch [Mon, 19 Nov 2018 16:19:33 +0000 (17:19 +0100)]
video-info: parse field-order for all interleaved formats

The "field-order" is related for all interlace_mode modes except the
"progressive" mode. So instead of or'ing each mode we can use the
already supported GST_VIDEO_INFO_IS_INTERLACED macro.

5 years agoglimagesink: add support for P010 variants
Haihao Xiang [Thu, 13 Jun 2019 05:07:06 +0000 (13:07 +0800)]
glimagesink: add support for P010 variants

This makes a pipeline below works:

little endian:
gst-launch-1.0 videotestsrc ! video/x-raw,format=P010_10LE ! glimagesink

big endian:
gst-launch-1.0 videotestsrc ! video/x-raw,format=P010_10BE ! glimagesink

5 years agoglcolorconvert: rename the NV12/NV12 shader to semi planar
Haihao Xiang [Tue, 18 Jun 2019 08:14:33 +0000 (16:14 +0800)]
glcolorconvert: rename the NV12/NV12 shader to semi planar

This shader can be used for other semi planar formats, e.g. P010_10LE

5 years agoplaysink: Set ts-offset to text sink.
Song Bing [Mon, 17 Jun 2019 23:46:21 +0000 (16:46 -0700)]
playsink: Set ts-offset to text sink.

Find right text sink to set the ts-offset.

5 years agoglimagesink: add support for BGR10A2_LE / RGB10A2_LE
Haihao Xiang [Wed, 5 Jun 2019 01:26:08 +0000 (09:26 +0800)]
glimagesink: add support for BGR10A2_LE / RGB10A2_LE

This makes a pipeline below work:

gst-launch-1.0 videotestsrc ! video/x-raw,format={BGR10A2_LE, \
RGB10A2_LE} ! glimagesink

5 years agoglformat: removde dead break after return
Haihao Xiang [Fri, 14 Jun 2019 06:53:56 +0000 (14:53 +0800)]
glformat: removde dead break after return

5 years agovideo-and: Fix buffer overflow detected by asan
Roman Sivriver [Tue, 18 Jun 2019 01:57:33 +0000 (21:57 -0400)]
video-and: Fix buffer overflow detected by asan

gst_meta_api_type_register() assumes that the last tags element is null, but it wasn't

==17422==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7f4e2a67c998 at pc 0x7f4e2a0c92ac bp 0x7ffcc41f80b0 sp 0x7ffcc41f80a0
READ of size 8 at 0x7f4e2a67c998 thread T0
    #0 0x7f4e2a0c92ab in gst_meta_api_type_register ../subprojects/gstreamer/gst/gstmeta.c:94
    #1 0x7f4e2a5582c3 in gst_video_afd_meta_api_get_type ../subprojects/gst-plugins-base/gst-libs/gst/video/video-anc.c:1146
    #2 0x404c7c in invoke_get_type (/home/ubuntu/gst-build/build/tmp-introspect5gv1rovo/GstVideo-1.0+0x404c7c)
    #3 0x406b5c in dump_irepository (/home/ubuntu/gst-build/build/tmp-introspect5gv1rovo/GstVideo-1.0+0x406b5c)
    #4 0x407089 in main (/home/ubuntu/gst-build/build/tmp-introspect5gv1rovo/GstVideo-1.0+0x407089)
    #5 0x7f4e295b4b6a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26b6a)
    #6 0x404479 in _start (/home/ubuntu/gst-build/build/tmp-introspect5gv1rovo/GstVideo-1.0+0x404479)

0x7f4e2a67c998 is located 40 bytes to the left of global variable 'tags' defined in '../subprojects/gst-plugins-base/gst-libs/gst/video/video-anc.c:1232:25' (0x7f4e2a67c9c0) of size 24
0x7f4e2a67c998 is located 0 bytes to the right of global variable 'tags' defined in '../subprojects/gst-plugins-base/gst-libs/gst/video/video-anc.c:1141:25' (0x7f4e2a67c980) of size 24
SUMMARY: AddressSanitizer: global-buffer-overflow ../subprojects/gstreamer/gst/gstmeta.c:94 in gst_meta_api_type_register

5 years agotests: pbutils: Add test parsing H265 profiles
Seungha Yang [Mon, 15 Oct 2018 13:35:09 +0000 (22:35 +0900)]
tests: pbutils: Add test parsing H265 profiles

5 years agocodec-utils: Add parsing H265 range extensions profiles
Seungha Yang [Mon, 15 Oct 2018 12:16:56 +0000 (21:16 +0900)]
codec-utils: Add parsing H265 range extensions profiles

Add support all h265 profiles defined by ITU-T H.264 (02/2018) revision

5 years agoappsrc: Fix typo in documentation
Wonchul Lee [Sat, 15 Jun 2019 05:33:32 +0000 (14:33 +0900)]
appsrc: Fix typo in documentation

5 years agovideodecoder: Fix typo in documentation
Wonchul Lee [Sat, 15 Jun 2019 01:41:29 +0000 (10:41 +0900)]
videodecoder: Fix typo in documentation

5 years agomeson.build: use join_paths() on prefix
Håvard Graff [Tue, 10 Oct 2017 13:45:14 +0000 (15:45 +0200)]
meson.build: use join_paths() on prefix

So that "/" are correct on Windows.

5 years agoglcontext_egl: check if eglChooseConfig has a matching config
Adrian Negreanu [Wed, 29 May 2019 10:24:04 +0000 (13:24 +0300)]
glcontext_egl: check if eglChooseConfig has a matching config

The specs recommends to also check the num_config parameter.

5 years agocompositor: Copy frames as-is when possible
Nirbheek Chauhan [Thu, 13 Jun 2019 21:02:50 +0000 (02:32 +0530)]
compositor: Copy frames as-is when possible

The blend functions for alpha formats need to do more work than just
doing a memcpy, so we can do a memcpy when we know that a blend is not
actually needed.

1080p AYUV ! compositor background=transparent ! fakesink - 56% faster

Specifically, when we don't draw the background and the first pad we
draw completely covers the output frame, we can just copy it as-is.
The rest of the pads (if any) will get composited on top normally.

5 years agortpbasedepayload: Add max-reorder property
Stian Selnes [Thu, 13 Jun 2019 08:36:05 +0000 (10:36 +0200)]
rtpbasedepayload: Add max-reorder property

Add max-reorder property to make the old hard coded reordering limit of
100 configurable. It's particularly useful in some scenarios to set
max-reorder=0 to disable the behavior that the depayloader will drop
packets.

Note that although the default value is 100, the default limit has
increased with one because of the changed if-test. This was done to
allow the max-reorder value to be more intuitive. See tests.

5 years agocompositor: Sprinkle some const in prototypes
Nirbheek Chauhan [Thu, 13 Jun 2019 15:00:03 +0000 (20:30 +0530)]
compositor: Sprinkle some const in prototypes

These helper functions don't edit the rectangles passed in.

5 years agocompositor: Skip background if transparent and obscured
Nirbheek Chauhan [Sun, 26 May 2019 15:47:20 +0000 (17:47 +0200)]
compositor: Skip background if transparent and obscured

If the background is transparent and obscured by a pad that may or may
not have alpha, we can still skip drawing it entirely

AYUV 1080p ! compositor background=transparent ! fakesink - 75% faster

5 years agocompositor: Skip the background when not visible
Nirbheek Chauhan [Sun, 26 May 2019 15:30:12 +0000 (17:30 +0200)]
compositor: Skip the background when not visible

We don't need to waste time drawing the background when one of the
pads completely covers the output and there's no alpha on the pad or
in the video format. Speedups:

I420 1080p ! compositor ! fakesink - 72% faster
I420 1080p ! compositor background=black ! fakesink - 45% faster

5 years agocompositor: Don't log per-frame under GST_INFO
Nirbheek Chauhan [Sun, 26 May 2019 16:28:18 +0000 (18:28 +0200)]
compositor: Don't log per-frame under GST_INFO

5 years agocompositor: Factor-out rectangle-obscuring check
Nirbheek Chauhan [Sun, 26 May 2019 15:29:23 +0000 (17:29 +0200)]
compositor: Factor-out rectangle-obscuring check

We're going to use this for checking if one of the pads obscures the
background.

5 years agocompositor: Add some comments, remove outdated ones
Nirbheek Chauhan [Sun, 26 May 2019 13:23:25 +0000 (15:23 +0200)]
compositor: Add some comments, remove outdated ones

5 years agocompositor: Remove unused function argument
Nirbheek Chauhan [Sun, 26 May 2019 13:23:06 +0000 (15:23 +0200)]
compositor: Remove unused function argument

5 years agotests/gl-launch-lines: gltestsrc works on gles2/opengl3 now
Matthew Waters [Wed, 5 Jun 2019 08:23:16 +0000 (18:23 +1000)]
tests/gl-launch-lines: gltestsrc works on gles2/opengl3 now

There's no need to feature gate the gltestsrc pipelines anymore

5 years agoglvideomixer: perform _get_highest_precision on the GL thread
Matthew Waters [Wed, 5 Jun 2019 08:17:35 +0000 (18:17 +1000)]
glvideomixer: perform _get_highest_precision on the GL thread

gst_gl_shader_string_get_highest_precision needs to make an OpenGL call
so execution outside the OpenGL thread and context results in undefined
behaviour.

5 years agoglmosaic: port to opengl3/gles2
Matthew Waters [Wed, 5 Jun 2019 08:06:57 +0000 (18:06 +1000)]
glmosaic: port to opengl3/gles2

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

5 years agoglcontext: add a couple of preconditions of invalid usage
Matthew Waters [Thu, 13 Jun 2019 05:36:56 +0000 (15:36 +1000)]
glcontext: add a couple of preconditions of invalid usage

5 years agogl: detect possible GL version prefix
Víctor Manuel Jáquez Leal [Wed, 12 Jun 2019 15:20:10 +0000 (17:20 +0200)]
gl: detect possible GL version prefix

Instead of checking if the requested GL API is GLES2 (because ANY can
be set) the string is matched with the GLES2 prefix, and if so, then
the string is offset.

5 years agomeson: add rtpmeta-tests
Havard Graff [Tue, 16 Oct 2018 14:56:26 +0000 (16:56 +0200)]
meson: add rtpmeta-tests

5 years agortpbasepayload: don't use GINT_TO_POINTER with GType
Havard Graff [Wed, 12 Jun 2019 12:32:03 +0000 (14:32 +0200)]
rtpbasepayload: don't use GINT_TO_POINTER with GType

GType can (and will) be 64bit. GINT_TO_POINTER is not.
This will result in the api-type checked for being a different one than
it actually is...

5 years agortpbasedepayload: don't consider existing GstRTPSourceMeta
Havard Graff [Wed, 12 Jun 2019 12:31:09 +0000 (14:31 +0200)]
rtpbasedepayload: don't consider existing GstRTPSourceMeta

The meta should always be generated based on what is present in the
rtp-header.

5 years agogstrtppayloads: add vp8/vp9/opus encoding-name
Marc Leeman [Wed, 12 Jun 2019 12:32:33 +0000 (12:32 +0000)]
gstrtppayloads: add vp8/vp9/opus encoding-name

Adding these encoding names allows easy lookup of the caps based on the
encoding-name.

5 years agortspconnection: Start CSeq at 1
Eike Hein [Tue, 11 Jun 2019 19:45:09 +0000 (04:45 +0900)]
rtspconnection: Start CSeq at 1

RFC 7826 recommends (but does not require) starting at 0,
but at least one known server implementation fails to copy
request sequence numbers <1 into responses due to an
incorrect null check.

The server known to exhibit this behavior is the Parrot
Streaming Server, serving video from their UAV devices.
A fix has been submitted upstream as well:
https://github.com/Parrot-Developers/librtsp/pull/2

The Parrot developers are known to have tested with LibVLC.
In WireShark debugging, LibVLC appears to start with a CSeq
of 2, which is likely why this bug went unnoticed.

This reverts 487595a7d6e2d, which set this to 0 citing the
RFC. The switch to 0 was thus a recent one; it's therefore
possible server implementors relied on the previous
GStreamer client behavior in their tests as well.

Fixes #624.

5 years agoviv-fb: fix build break for GST_GL_API
Haihua Hu [Mon, 3 Jun 2019 07:51:02 +0000 (15:51 +0800)]
viv-fb: fix build break for GST_GL_API

Need include config.h in gstglwindow_viv_fb_egl.c

5 years agodiscoverer: Plug some leaks in the cache loading path
Thibault Saunier [Sat, 8 Jun 2019 02:29:10 +0000 (22:29 -0400)]
discoverer: Plug some leaks in the cache loading path