platform/upstream/gstreamer.git
4 years agoplugins: uddate gst_type_mark_as_plugin_api() calls
Mathieu Duponchelle [Fri, 5 Jun 2020 22:41:17 +0000 (00:41 +0200)]
plugins: uddate gst_type_mark_as_plugin_api() calls

4 years agovideoencoder: Add test for min-force-key-unit-interval property
Sebastian Dröge [Thu, 4 Jun 2020 13:25:12 +0000 (16:25 +0300)]
videoencoder: Add test for min-force-key-unit-interval property

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/684>

4 years agovideoencoder: Also don't request a new key-unit if we already got one after the reque...
Sebastian Dröge [Thu, 4 Jun 2020 12:19:18 +0000 (15:19 +0300)]
videoencoder: Also don't request a new key-unit if we already got one after the requested running time

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/684>

4 years agovideoencoder: Don't request another keyunit if another one is pending or we requested...
Sebastian Dröge [Thu, 4 Jun 2020 12:10:12 +0000 (15:10 +0300)]
videoencoder: Don't request another keyunit if another one is pending or we requested one for a future time already

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/684>

4 years agovideoencoder: Add min-force-key-unit-interval property
Sebastian Dröge [Wed, 3 Jun 2020 18:46:38 +0000 (21:46 +0300)]
videoencoder: Add min-force-key-unit-interval property

This allows configuring the minimum interval between subsequent
force-key-unit requests and prevents a big bitrate increase if a lot of
key-units are requested.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/684>

4 years agovideoencoder: Add test for correct force-keyunit event handling
Sebastian Dröge [Wed, 3 Jun 2020 17:49:12 +0000 (20:49 +0300)]
videoencoder: Add test for correct force-keyunit event handling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/684>

4 years agovideoencoder: Fix force-keyunit handling in test
Sebastian Dröge [Wed, 3 Jun 2020 17:26:33 +0000 (20:26 +0300)]
videoencoder: Fix force-keyunit handling in test

This now behaves according to the videoencoder API instead of some other
signalling.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/684>

4 years agovideoencoder: When pushing headers as part of a keyframe mark the first header as...
Sebastian Dröge [Wed, 3 Jun 2020 19:38:07 +0000 (22:38 +0300)]
videoencoder: When pushing headers as part of a keyframe mark the first header as keyframe

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/684>

4 years agovideoencoder: Handle all matching force-keyunit events at once
Sebastian Dröge [Wed, 3 Jun 2020 17:17:06 +0000 (20:17 +0300)]
videoencoder: Handle all matching force-keyunit events at once

Previously we only handled one event at a time, which could lead to the
following two suboptimal situations:
- frame 0 at 20ms, frame 1 at 40ms and two force-keyunit events at 10ms
  and 15ms. We would create a new keyframe for both of the frames.
- 100 force-keyunit events with running-time NONE would cause all
  following 100 frames to be made into a keyframe.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/684>

4 years agovideoencoder: Sort force-keyunit-events by their running time
Sebastian Dröge [Wed, 3 Jun 2020 16:59:03 +0000 (19:59 +0300)]
videoencoder: Sort force-keyunit-events by their running time

That way we can more easily work with the whole list without iterating
over all of the elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/684>

4 years agouridecodebin: Dont link random pads
Edward Hervey [Wed, 3 Jun 2020 09:29:09 +0000 (11:29 +0200)]
uridecodebin: Dont link random pads

When linking source pads to decodebin, make sure we use the *specified* new
source pad and not some random one.

This avoids ending up with source pads being unlinked.

Main cause of random timeouts with rtsp change_state_intensive validate tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/687>

4 years agovideo-hdr: fix memset warning
Stéphane Cerveau [Thu, 4 Jun 2020 08:41:13 +0000 (10:41 +0200)]
video-hdr: fix memset warning

Fix warning on fedora arm64 target

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/685>

4 years agovideo: Fix NV12_64Z32 number of component
Nicolas Dufresne [Thu, 4 Jun 2020 15:22:00 +0000 (11:22 -0400)]
video: Fix NV12_64Z32 number of component

This format has 3 components, just like NV12.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/686>

4 years agodoc: Add a minimal GstVideoMultiviewFlagsSet documentation
Thibault Saunier [Thu, 4 Jun 2020 00:50:05 +0000 (20:50 -0400)]
doc: Add a minimal GstVideoMultiviewFlagsSet documentation

4 years agodoc: Require hotdoc >= 0.11.0
Thibault Saunier [Wed, 3 Jun 2020 22:38:38 +0000 (18:38 -0400)]
doc: Require hotdoc >= 0.11.0

4 years agodocs: Update gst_plugins_cache.json
Sebastian Dröge [Wed, 27 May 2020 13:00:48 +0000 (16:00 +0300)]
docs: Update gst_plugins_cache.json

4 years agoplugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types
Mathieu Duponchelle [Fri, 29 May 2020 00:43:59 +0000 (02:43 +0200)]
plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types

4 years agovideoencoder: Simplify header buffer metadata updating
Sebastian Dröge [Wed, 3 Jun 2020 12:06:08 +0000 (15:06 +0300)]
videoencoder: Simplify header buffer metadata updating

Instead of doing a shallow copy of the list just to call make_writable()
on each buffer, do that inline in the same loop and modify the list
contents.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/683>

4 years agovideo: Use GQueue instead of plain GList in a few places
Sebastian Dröge [Wed, 3 Jun 2020 11:37:00 +0000 (14:37 +0300)]
video: Use GQueue instead of plain GList in a few places

Also not optimal but at least simplifies the code a bit and doesn't
require g_list_length() and g_list_append() in a few places.

For 2.0 there are some more candidates to change but unfortunately
they're currently part of the API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/683>

4 years agovideo-format: RGB16/15 are not 16 bit per component but only 5.333 and 5
Sebastian Dröge [Tue, 2 Jun 2020 13:56:44 +0000 (16:56 +0300)]
video-format: RGB16/15 are not 16 bit per component but only 5.333 and 5

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/682>

4 years agoaudio: add gst_audio_make_raw_caps()
Guillaume Desmottes [Wed, 27 May 2020 13:41:43 +0000 (15:41 +0200)]
audio: add gst_audio_make_raw_caps()

More binding friendly version of GST_AUDIO_CAPS_MAKE().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/676>

4 years agoaudio-format: remove empty space prefix from GST_AUDIO_FORMATS_ALL
Guillaume Desmottes [Mon, 1 Jun 2020 13:24:32 +0000 (15:24 +0200)]
audio-format: remove empty space prefix from GST_AUDIO_FORMATS_ALL

This space prevent deserialization using gst_value_deserialize().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/676>

4 years agoaudio-format: add gst_audio_formats_raw()
Guillaume Desmottes [Wed, 27 May 2020 13:05:37 +0000 (15:05 +0200)]
audio-format: add gst_audio_formats_raw()

The existing GST_AUDIO_FORMATS_ALL macro is not binding friendly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/676>

4 years agovideo: add gst_video_make_raw_caps()
Guillaume Desmottes [Wed, 27 May 2020 13:41:43 +0000 (15:41 +0200)]
video: add gst_video_make_raw_caps()

More binding friendly version of GST_VIDEO_CAPS_MAKE().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/676>

4 years agovideo-format: add gst_video_formats_raw()
Guillaume Desmottes [Wed, 27 May 2020 13:05:37 +0000 (15:05 +0200)]
video-format: add gst_video_formats_raw()

The existing GST_VIDEO_FORMATS_ALL macro is not binding friendly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/676>

4 years agoglcontext/eagl: handle sending one message during shutdown
Matthew Waters [Fri, 29 May 2020 09:08:51 +0000 (19:08 +1000)]
glcontext/eagl: handle sending one message during shutdown

gst_gl_window_quit() will attempt to send a message but will be called
from GstGLContext's finalize handler and so the weak ref that backs
gst_gl_window_get_context will return NULL as it has already been
cleared.  We need that context in send_message_async to decide whether
to run the provided callback immediately or queue in GCD

This is the equivalent commit for iOS as:
7f59cefafb1cd733cf527fb935b2cd32418fcbe2
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/618

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/681>

4 years agogl/eagl: don't access UIkit objects on the main thread
Matthew Waters [Fri, 29 May 2020 05:44:55 +0000 (15:44 +1000)]
gl/eagl: don't access UIkit objects on the main thread

This means we cannot access [view layer] or view.bounds from the OpenGL
thread.  This also means that we need to call the main thread when
setting the window handle.  However, we cannot perform that
synchronously as that may deadlock with the application performing the
set_window_handle() call.

We need to defer the actual update and run it asynchronously and wait
for the window handle update internally at each point it is needed.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/372
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/681>

4 years agogl/ios: fix typo GS_GL -> GST_GL
Matthew Waters [Fri, 29 May 2020 04:12:38 +0000 (14:12 +1000)]
gl/ios: fix typo GS_GL -> GST_GL

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/681>

4 years agovideorate: Update QoS events taking into account our rate
Thibault Saunier [Fri, 29 May 2020 20:21:11 +0000 (16:21 -0400)]
videorate: Update QoS events taking into account our rate

Otherwise there is a mismatch between the QoS values and what upstream
would expect, leading to too much buffer dropping in video decoders in
case rate < 1.0 or not enough buffer dropping in case rate > 1.0

Adding validate tests with and without decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/679>

4 years agovideorate: Fix changing `rate` property during playback
Thibault Saunier [Sun, 31 May 2020 04:27:14 +0000 (00:27 -0400)]
videorate: Fix changing `rate` property during playback

We need to take into account the base_ts to compute next_ts and it needs
to be updated on rate change.

This introduces `pending_rate` so that change rate is properly handled
in the streaming thread in a safe way.

Added tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/679>

4 years agotests:validate: Run all test using a simple fakesink
Thibault Saunier [Thu, 28 May 2020 17:42:22 +0000 (13:42 -0400)]
tests:validate: Run all test using a simple fakesink

`fakevideosink` is in -bad and thus not available here.

Update the expectation files as video metas are not negotiated anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/677>

4 years agolibs: gl: silence gir compiler
Víctor Manuel Jáquez Leal [Fri, 29 May 2020 09:39:57 +0000 (11:39 +0200)]
libs: gl: silence gir compiler

There were a couple complains of the gir compiler on these gstgl
files.

* Added namespace to public macros, even if they are helpers.
* Removed a misused private tag

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/678>

4 years agovideoscale: reorder code to avoid indent missmatches
Michael Gruner [Thu, 23 Jan 2020 18:38:44 +0000 (12:38 -0600)]
videoscale: reorder code to avoid indent missmatches

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/548>

4 years agovideoscale: transform size sensitive metas
Michael Gruner [Thu, 23 Jan 2020 17:02:52 +0000 (11:02 -0600)]
videoscale: transform size sensitive metas

Currently, videoscale just drops all metas that have other tags
besides video. However videoscale wont change the colorspace or
the orientation of the video so metas tagged as such may be
copied safely. Additionaly, given that videoscale will change
the frame size, we invoke the meta transform implementation
to give it the opportunity to scale accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/548>

4 years agotests: audiosink: Test class extension struct
Seungha Yang [Wed, 22 Jan 2020 13:30:11 +0000 (22:30 +0900)]
tests: audiosink: Test class extension struct

Test a vfunc which belongs to GstAudioSinkExtension struct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/547>

4 years agoaudiosink: Keep baseclass extensible
Seungha Yang [Tue, 21 Jan 2020 15:14:14 +0000 (00:14 +0900)]
audiosink: Keep baseclass extensible

Add a structure for future extension.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/716
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/547>

4 years agodecodebin: only emit 'drained' signal when top chain is drained
uno20001 [Wed, 27 May 2020 13:11:17 +0000 (15:11 +0200)]
decodebin: only emit 'drained' signal when top chain is drained

Without this, decodebin emits 'drained' multiple times which then
causes (uri)playbin to emit 'about-to-finish' multiple times for
for file types.

Fixes #751

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/673>

4 years agoaudioresample: Add new test that checks for downstream renegotiation
Sebastian Dröge [Wed, 27 May 2020 16:59:56 +0000 (19:59 +0300)]
audioresample: Add new test that checks for downstream renegotiation

This test always consumes 48kHz and outputs different sample rates based
on downstream renegotiation. Previously this would produce completely
wrong timestamps and not output all samples.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/670>

4 years agoaudioresample: Fix up test_live_switch
Sebastian Dröge [Wed, 27 May 2020 16:08:45 +0000 (19:08 +0300)]
audioresample: Fix up test_live_switch

Actually check that we get back all samples, which we didn't before
because no draining was happening. Also remove commented out 0.10 code
and related comments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/670>

4 years agoaudioresample: Drain resampler on discontinuities
Sebastian Dröge [Tue, 26 May 2020 19:51:06 +0000 (22:51 +0300)]
audioresample: Drain resampler on discontinuities

Otherwise we would lose the last few samples when resetting the
resampler.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/670>

4 years agoaudioresample: Drain resampler and reset timestamp tracking on stream-start event too
Sebastian Dröge [Tue, 26 May 2020 19:49:44 +0000 (22:49 +0300)]
audioresample: Drain resampler and reset timestamp tracking on stream-start event too

And also reset timestamp tracking on EOS events as more data might come
afterwards with a new stream-start event. This keeps the code the same.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/670>

4 years agoaudioresample: Drain the resampler and reset timestamp tracking on caps changes
Sebastian Dröge [Tue, 26 May 2020 19:45:41 +0000 (22:45 +0300)]
audioresample: Drain the resampler and reset timestamp tracking on caps changes

Especially when changing the sample rate our timestamp tracking will be
completely off, but even otherwise we would usually lose the last few
samples if we don't drain here as the resampler gets reset if anything
but the sample rate changes.

This is usually not a problem as the first buffer after a caps event
usually has the discont flag set, but can cause problems if
 - the caps event is followed by a segment event, which then causes
   draining according to the new sample rate
 - the caps were changed because of rengotiation due to a reconfigure
   event and there is not discontinuity from upstream

In both cases we would output buffers with completely wrong timestamps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/670>

4 years agovideo-anc: init type before g_once_init_enter
Stéphane Cerveau [Fri, 8 May 2020 09:19:24 +0000 (11:19 +0200)]
video-anc: init type before g_once_init_enter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/675>

4 years agovideo-hdr: fix typo
Stéphane Cerveau [Fri, 8 May 2020 09:03:52 +0000 (11:03 +0200)]
video-hdr: fix typo

fix typo in video_hdr_ascii_string_to_unsigned
method name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/675>

4 years agoglimagesink: Correct signals gtkdoc
Niels De Graef [Tue, 26 May 2020 16:51:03 +0000 (18:51 +0200)]
glimagesink: Correct signals gtkdoc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/669>

4 years agovideorate: Fix buffer selection logic in reverse playback
Thibault Saunier [Mon, 25 May 2020 20:59:53 +0000 (16:59 -0400)]
videorate: Fix buffer selection logic in reverse playback

Stop comparing all timestamps from buffers that are before the segment
with the segment.stop and compare with the actual end times.

Comparing to segment.stop for all the buffers that where before
the segment.stop was incorrect and leading to consuming wrong buffers
and not respecting segment.stop, this is now properly tested.

Expectations for `reverse.10_to_1fps.validatetest` have been fixed to
take that into account and comparing the checksums of the sinkpad and
srcpad expectations makes pretty clear how wrong that was.

(we can see in the expectations that videotestsrc outputs an extra
buffer with pts == segment.stop and this one is now properly dropped
by videorate as bec7f4ad5ed4bb1abfb92db946e654338766562b aimed at
doing)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/668>

4 years agovideorate: Factor out a method for the`max-duplication-time` property
Thibault Saunier [Mon, 25 May 2020 20:29:15 +0000 (16:29 -0400)]
videorate: Factor out a method for the`max-duplication-time` property

Sensibly simplifying gst_video_rate_transform_ip

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/668>

4 years agovideorate: Use CLOCK_TIME_IS_VALID instead of checking CLOCK_TIME_NONE
Thibault Saunier [Mon, 25 May 2020 18:48:04 +0000 (14:48 -0400)]
videorate: Use CLOCK_TIME_IS_VALID instead of checking CLOCK_TIME_NONE

Making it more consistency with the rest of the code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/668>

4 years agovideorate: Factor out a method to reset mode
Thibault Saunier [Mon, 25 May 2020 18:33:54 +0000 (14:33 -0400)]
videorate: Factor out a method to reset mode

Working on simplifying gst_video_rate_transform_ip

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/668>

4 years agovideorate: Do not push an extra buffer on EOS when we are done pushing already
Thibault Saunier [Mon, 25 May 2020 16:31:32 +0000 (12:31 -0400)]
videorate: Do not push an extra buffer on EOS when we are done pushing already

There is no reason that when we have already pushed all the buffers in
a segment we push a new one on EOS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/668>

4 years agoaudiotestsrc: Fix the way we compute EOS in reverse playback
Thibault Saunier [Sat, 23 May 2020 03:24:55 +0000 (23:24 -0400)]
audiotestsrc: Fix the way we compute EOS in reverse playback

In reverse playback we were not taking into account the current buffer
samples to check if we had reached EOS which was leading to a buffer
with PTS = CLOCK_TIME_NONE containing too many frames followed by a
useless buffer with pts=0 duration=0, and a g_critical issue in
gst_object_sync_values.

Also add a validate based test case.
Without that patch this is how the expectation fails:

``` diff
--- log-asink-sink-expected       2020-05-22 23:22:42.654384579 -0400
+++ log-asink-sink-actual  2020-05-22 23:29:35.671586380 -0400
@@ -27,5 +27,6 @@
 buffer: pts=0:00:00.058820861, due=0:00:00.023219955, flags=discont
 buffer: pts=0:00:00.035600907, due=0:00:00.023219954, flags=discont
 buffer: pts=0:00:00.012380952, due=0:00:00.023219955, flags=discont
-buffer: pts=0:00:00.000000000, due=0:00:00.012380952, flags=discont
+buffer: due=0:00:00.012380953, flags=discont
+buffer: pts=0:00:00.000000000, flags=discont
 event eos: (no structure)
 ```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/667>

4 years agogl: egl: fix gtk-doc doc start code
Guillaume Desmottes [Wed, 13 May 2020 13:28:33 +0000 (15:28 +0200)]
gl: egl: fix gtk-doc doc start code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/664>

4 years agogl: workaround gir warning
Guillaume Desmottes [Wed, 13 May 2020 12:50:22 +0000 (14:50 +0200)]
gl: workaround gir warning

The gir generator wrongly assume that the vfunc
GstGLFilterClass.filter() and the method gst_gl_filter_filter_texture()
are related. As a result it complains about not matching argument names.

Workaround this by naming both of their arguments input and output.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/664>

4 years agogl: egl: add missing gir annotations
Guillaume Desmottes [Wed, 13 May 2020 08:08:25 +0000 (10:08 +0200)]
gl: egl: add missing gir annotations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/664>

4 years agogl: x11: skip gst_gl_display_x11_new_with_display() from gir
Guillaume Desmottes [Wed, 13 May 2020 08:13:04 +0000 (10:13 +0200)]
gl: x11: skip gst_gl_display_x11_new_with_display() from gir

The X11 Display type is not usable in gir.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/664>

4 years agoriff-media: add H.265
Nicola Murino [Fri, 25 Jan 2019 21:48:17 +0000 (22:48 +0100)]
riff-media: add H.265

Closes #359

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/43>

4 years agoglcolorscale: fix documentation
Mathieu Duponchelle [Tue, 5 May 2020 15:39:04 +0000 (17:39 +0200)]
glcolorscale: fix documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/653>

4 years agogl/display/egl: ensure debug category is initialized
Matthew Waters [Thu, 14 May 2020 04:00:22 +0000 (14:00 +1000)]
gl/display/egl: ensure debug category is initialized

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/662>

4 years agomeson: Pass native: false to add_languages()
Nirbheek Chauhan [Mon, 11 May 2020 23:28:24 +0000 (04:58 +0530)]
meson: Pass native: false to add_languages()

This is needed for cross-compiling without a build machine compiler
available. The option was added in 0.54, but we only need this in
Cerbero and it doesn't affect older versions so it should be ok.
Will only cause a spurious warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/660>

4 years agocheck: verify gst_gl_display_add_context()
Edward Hervey [Sat, 9 May 2020 05:31:04 +0000 (07:31 +0200)]
check: verify gst_gl_display_add_context()

As is done almost everywhere else. Doesn't cost anything.

CID #1462817

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/657>

4 years agotests/gl: add test for GL context removal
Matthew Waters [Fri, 8 May 2020 05:10:17 +0000 (15:10 +1000)]
tests/gl: add test for GL context removal

Tests functionality fixed by:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/654

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/656>

4 years agovideorate: Fix buffer timestamp underflow in reverse playback
Thibault Saunier [Mon, 27 Apr 2020 13:57:30 +0000 (09:57 -0400)]
videorate: Fix buffer timestamp underflow in reverse playback

And fix reverse playback buffer duration computation as in reverse
playback, buffer duration is prev_buffer.pts - buffer.pts not pts -
next_pts (buffers are displayed from buffer.pts + buffer.duration for
a duration of buffers.duration).

This is now tested with the `validate.test.clock_sync.videorate.*`
tests in the default integration testsuite where we check the exact
data flow and the synchronization on the clock behaviour with a
TestClock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/646>

4 years agovideotestsrc: Fix buffer duration in reverse playback
Thibault Saunier [Fri, 24 Apr 2020 00:35:39 +0000 (20:35 -0400)]
videotestsrc: Fix buffer duration in reverse playback

In reverse playback, buffers have to be displayed at buffer.stop running
time, meaning:

    buffer.pts + buffer.duration = prev_buffer.pts
    =>
    buffer.duration = prev_buffer.pts - buffer.pts

We were setting buffer.duration = next_buffer.pts - buffer.pts which
is not correct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/646>

4 years agogldisplay: Fix context leak when removing a context from the display
Sebastian Dröge [Wed, 6 May 2020 13:13:11 +0000 (16:13 +0300)]
gldisplay: Fix context leak when removing a context from the display

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/654>

4 years agogldisplay: Fix list iteration
Edward Hervey [Wed, 6 May 2020 07:26:35 +0000 (09:26 +0200)]
gldisplay: Fix list iteration

We were never moving past the first entry it seems...

CID #1461275

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/654>

4 years agotests: fix meson test env setup to make sure we use the right gst-plugin-scanner
Tim-Philipp Müller [Thu, 27 Feb 2020 00:05:52 +0000 (00:05 +0000)]
tests: fix meson test env setup to make sure we use the right gst-plugin-scanner

If core is built as a subproject (e.g. as in gst-build), make sure to use
the gst-plugin-scanner from the built subproject. Without this, gstreamer
might accidentally use the gst-plugin-scanner from the install prefix if
that exists, which in turn might drag in gst library versions we didn't
mean to drag in. Those gst library versions might then be older than
what our current build needs, and might cause our newly-built plugins
to get blacklisted in the test registry because they rely on a symbol
that the wrongly-pulled in gst lib doesn't have.

This should fix running of unit tests in gst-build when invoking
meson test or ninja test from outside the devenv for the case where
there is an older or different-version gst-plugin-scanner installed
in the install prefix.

In case no gst-plugin-scanner is installed in the install prefix, this
will fix "GStreamer-WARNING: External plugin loader failed. This most
likely means that the plugin loader helper binary was not found or
could not be run. You might need to set the GST_PLUGIN_SCANNER
environment variable if your setup is unusual." warnings when running
the unit tests.

In the case where we find GStreamer core via pkg-config we use
a newly-added pkg-config var "pluginscannerdir" to get the right
directory. This has the benefit of working transparently for both
installed and uninstalled pkg-config files/setups.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/582>

4 years agotests: don't look for plugins in -base installdir for tests
Tim-Philipp Müller [Wed, 26 Feb 2020 23:46:57 +0000 (23:46 +0000)]
tests: don't look for plugins in -base installdir for tests

-base plugins will always be found in the build directory, and
core plugins will be found either also via the build directory
(if both core and -base are a subproject) or by getting the
pluginsdir via pkg-config if core is installed.

The GST_PLUGIN_LOADING_WHITELIST env var will make sure we only
pick up plugins from core/base and base plugins only from the
builddir.

There is no reason to look for -base plugins in the install dir.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/582>

4 years agotcpserversrc: Add stats property
Vivia Nikolaidou [Thu, 12 Mar 2020 07:38:58 +0000 (09:38 +0200)]
tcpserversrc: Add stats property

Like in tcpclientsrc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/651>

4 years agodiscoverer: Check sinkpad existence before retrieving caps
Sebastian Dröge [Wed, 6 May 2020 08:52:20 +0000 (11:52 +0300)]
discoverer: Check sinkpad existence before retrieving caps

Otherwise we would error out without releasing the caps first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/655>

4 years agodiscoverer: Ensure that we have fixed, non-empty caps before passing passing to is_su...
Sebastian Dröge [Wed, 6 May 2020 08:44:39 +0000 (11:44 +0300)]
discoverer: Ensure that we have fixed, non-empty caps before passing passing to is_subtitle_caps()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/655>

4 years agodiscoverer: Try to get negotiated caps first on pad-added and only then fall back...
Sebastian Dröge [Wed, 6 May 2020 08:42:05 +0000 (11:42 +0300)]
discoverer: Try to get negotiated caps first on pad-added and only then fall back to a caps query

The negotiated caps will be more accurate and are fixed caps in any
case.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/498

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/655>

4 years agogloverlaycompositor: Don't leak caps feature
Edward Hervey [Tue, 5 May 2020 15:17:57 +0000 (17:17 +0200)]
gloverlaycompositor: Don't leak caps feature

Only copy it if we really are going to modify and use it

CID #1439873

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/652>

4 years agovideoaggregator: Don't crash when setting pad properties after the aggregator was...
Sebastian Dröge [Fri, 1 May 2020 08:27:46 +0000 (11:27 +0300)]
videoaggregator: Don't crash when setting pad properties after the aggregator was finalized

The application might still have a strong reference to a pad and change
properties, which should work without crashing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/649>

4 years agoAdd missing colons to Since markers in the docs
Sebastian Dröge [Fri, 1 May 2020 07:08:40 +0000 (10:08 +0300)]
Add missing colons to Since markers in the docs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/648>

4 years agogl: Add since tags for new glbasesrc base class
Philippe Normand [Thu, 30 Apr 2020 16:59:45 +0000 (17:59 +0100)]
gl: Add since tags for new glbasesrc base class

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/647>

4 years agogst/gl: Add documentation for new scroll API
Philippe Normand [Thu, 30 Apr 2020 16:59:24 +0000 (17:59 +0100)]
gst/gl: Add documentation for new scroll API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/647>

4 years agonavigation: Add since tag for new API
Philippe Normand [Thu, 30 Apr 2020 16:58:43 +0000 (17:58 +0100)]
navigation: Add since tag for new API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/647>

4 years agotest: pbutils: Add check for high throughput scc.
He Junyan [Tue, 28 Apr 2020 13:27:36 +0000 (21:27 +0800)]
test: pbutils: Add check for high throughput scc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/645>

4 years agolibs: pbutils: Add High throughput scc extensions profile idc(IDC 11)
He Junyan [Tue, 28 Apr 2020 13:14:07 +0000 (21:14 +0800)]
libs: pbutils: Add High throughput scc extensions profile idc(IDC 11)

It is compitable with scc and we can use scc's function to identify it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/645>

4 years agolibs: pbutils: select extension profile by profile idc.
He Junyan [Tue, 28 Apr 2020 11:10:05 +0000 (19:10 +0800)]
libs: pbutils: select extension profile by profile idc.

the old manner does not consider the profile idc. The profile idc should
play an more important role in recognizing the profile than the other
information. And there is no need to mix profiles of different extensions
together to find the closest profile when the bits stream is not standard,
different extensions support different features and should not be mixed.

The correct way should be recognize the extension category by profile idc
firstly, and then find the closest profile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/645>

4 years agolibs: pbutils: rename the GstH265FormatRangeExtensionProfile.
He Junyan [Tue, 28 Apr 2020 10:17:30 +0000 (18:17 +0800)]
libs: pbutils: rename the GstH265FormatRangeExtensionProfile.

GstH265FormatRangeExtensionProfile declares the common bits used
for not only format range extensions profiles, but also for several
different h265 extension profiles, such as high throughput, screen
content coding extensions, etc. And So the old name is not proper.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/645>

4 years agoopusdec: prevent 'channels=0' in caps
Guillaume Desmottes [Mon, 27 Apr 2020 07:40:23 +0000 (09:40 +0200)]
opusdec: prevent 'channels=0' in caps

gst_opus_channel_positions() should fail if caps contains "channels=0".
Prevent index underflow when indexing gst_opus_channel_positions[] (CID 1462590).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/644>

4 years agoglbasesrc: avoid deadlock when querying for OpenGL context
Matthew Waters [Fri, 24 Apr 2020 12:40:10 +0000 (22:40 +1000)]
glbasesrc: avoid deadlock when querying for OpenGL context

Continuation of:
a4e49ba8c9657e2230aad32b6988bbda7a755440
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/642

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/643>

4 years agogl: fix application context querying between elements
Matthew Waters [Fri, 24 Apr 2020 12:38:32 +0000 (22:38 +1000)]
gl: fix application context querying between elements

Fixes error introduced by:
a4e49ba8c9657e2230aad32b6988bbda7a755440
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/642

Using the application GL context as the local GL context is not going to
work very well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/643>

4 years agoopusdec: add 'stats' property
Guillaume Desmottes [Thu, 23 Apr 2020 08:17:31 +0000 (10:17 +0200)]
opusdec: add 'stats' property

Allow users to retrieve the number of samples, and their duration,
generated using PLC.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/641>

4 years agogl: avoid deadlock querying for OpenGL context
Matthew Waters [Fri, 24 Apr 2020 04:44:46 +0000 (14:44 +1000)]
gl: avoid deadlock querying for OpenGL context

If there are two elements and threads attempting to query each other for
an OpenGL context. The locking may result in a deadlock.

We need to unlock each element's context_lock when querying another
element for the OpenGL context in order to allow any other element to
take the lock when the other element is querying for an OpenGL context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/642>

4 years agotests: add glviewconvert users integration unit test
Matthew Waters [Tue, 21 Apr 2020 10:09:41 +0000 (20:09 +1000)]
tests: add glviewconvert users integration unit test

Catch all smoke test for ensuring a basic pipeline can negotiate
successfully.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/638>

4 years agotextrender: Don't calculate caps on every buffer
Jan Schmidt [Tue, 21 Apr 2020 12:56:49 +0000 (22:56 +1000)]
textrender: Don't calculate caps on every buffer

Only renegotiate with downstream when the srcpad has a pending
reconfigure flag, instead of querying, fixating and sending caps
for every buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/640>

4 years agovideo-anc: Register an init function for Bar meta
Sebastian Dröge [Sun, 19 Apr 2020 15:29:18 +0000 (18:29 +0300)]
video-anc: Register an init function for Bar meta

The init function is mandatory and we keep around uninitialized memory
otherwise.

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

4 years agoglvideomixer: fix black output after display changes
Matthew Waters [Fri, 10 Apr 2020 04:08:15 +0000 (14:08 +1000)]
glvideomixer: fix black output after display changes

Partial revert of 55e80b550e4ad02aaf44b30ec8b03da9ee485ac6

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

4 years agoglvideomixer: intersect with template caps when updating
Matthew Waters [Fri, 10 Apr 2020 04:05:08 +0000 (14:05 +1000)]
glvideomixer: intersect with template caps when updating

Downstream may provide extra things when we ask it for caps that we may
need to remove.

Fixes the following pipeline warning:

gltestsrc ! glvideomixerelement ! glimagesinkelement

** (gst-launch-1.0:908581): WARNING **: 13:53:28.518: glvideomixer0: update_src_caps returned caps which are not a real subset of the filter caps

4 years agotypefind: Consider MPEG-PS PSM to be a PES type
Jan Schmidt [Fri, 10 Apr 2020 12:45:26 +0000 (22:45 +1000)]
typefind: Consider MPEG-PS PSM to be a PES type

Include the Program Stream Map packet type 0xBC in the
set of packets we treat as PES. This fixes typefinding
on MPEG-PS streams with PSM, where the PSM would previously
be considered a loss-of-sync and cause the typefind
to require more data.

4 years agouridecodebin3: Activate suburi playback item
Philippe Normand [Mon, 12 Aug 2019 09:41:31 +0000 (10:41 +0100)]
uridecodebin3: Activate suburi playback item

The suburi playback item has to be activated after the main playback item so
that playsink can properly enable text rendering.

Fixes #451

4 years agotextrender: Fix AYUV output.
Jan Schmidt [Thu, 9 Apr 2020 18:24:03 +0000 (04:24 +1000)]
textrender: Fix AYUV output.

Fix the check for whether the element is operating in ARGB mode. It
was incorrectly checking if the output format has an alpha channel,
which is true for both ARGB and AYUV, leading to the element
incorrectly outputting ARGB values into AYUV caps.

4 years agolibs: gl: Fix a context leak when display_create_context failed
He Junyan [Wed, 8 Apr 2020 07:26:23 +0000 (15:26 +0800)]
libs: gl: Fix a context leak when display_create_context failed

4 years agodiscoverer: Enhance printed information when not verbose
Thibault Saunier [Fri, 3 Apr 2020 13:36:02 +0000 (10:36 -0300)]
discoverer: Enhance printed information when not verbose

Basically print information about media tracks making without tags
nor buffers in caps making still quite small but containing all
information infos.

Stop making 'Topology' section and just print the info

before:

```
Topology:
  container: MPEG-2 Transport Stream
    audio: AC-3 (ATSC A/52)
    video: H.264 (High Profile)

Properties:
  Duration: 0:00:05.512394259
  Seekable: yes
  Live: no
  Tags:
      audio codec: AC-3 (ATSC A/52)
      bitrate: 192000
      video codec: H.264 (High Profile)
      minimum bitrate: 12947
      maximum bitrate: 12947
```

After:

```
Properties:
  Duration: 0:00:05.512394259
  Seekable: yes
  Live: no
  container: MPEG-2 Transport Stream
    audio: AC-3 (ATSC A/52)
      Stream ID: b076403d73e0c5fc13985832e8d585945603993437ba14b0799f422f9495e8ef:1/00001100
      Language: <unknown>
      Channels: 2 (front-left, front-right)
      Sample rate: 48000
      Depth: 32
      Bitrate: 192000
      Max bitrate: 0
    video: H.264 (High Profile)
      Stream ID: b076403d73e0c5fc13985832e8d585945603993437ba14b0799f422f9495e8ef:1/00001011
      Width: 1920
      Height: 1080
      Depth: 24
      Frame rate: 30000/1001
      Pixel aspect ratio: 1/1
      Interlaced: true
      Bitrate: 10363396
      Max bitrate: 12947
```

4 years agotypefindfunctions: Fix otio typefinder to actually detect otio files
Sebastian Dröge [Mon, 6 Apr 2020 12:20:39 +0000 (15:20 +0300)]
typefindfunctions: Fix otio typefinder to actually detect otio files

The string "\"OTIO_SCHEMA\":" is 14 characters and not 15. Checking for
15 characters would also check for the final '\0', which does not exist
in any otio file as the string is the key of a JSON map.

4 years agotypefindfunctions: Fix otio typefinder detecting anything with curly braces at the...
Sebastian Dröge [Mon, 6 Apr 2020 12:14:41 +0000 (15:14 +0300)]
typefindfunctions: Fix otio typefinder detecting anything with curly braces at the start

memcmp() returns 0 (aka FALSE) on match and a difference otherwise.

Previously the typefinder was matching on anything but otio files that
happened to have some curly braces in the beginning of the file.

Fixes a false positive with a MOV file.

4 years agopbutils: Add EncodingProfile serialization support
Thibault Saunier [Fri, 20 Mar 2020 13:58:19 +0000 (10:58 -0300)]
pbutils: Add EncodingProfile serialization support

4 years agopbutils: Support for variable framerate in the encoding serialization
Thibault Saunier [Thu, 19 Mar 2020 20:02:57 +0000 (17:02 -0300)]
pbutils: Support for variable framerate in the encoding serialization