platform/upstream/gstreamer.git
6 years agoapp: GST_EXPORT -> GST_APP_API
Tim-Philipp Müller [Tue, 13 Mar 2018 10:28:21 +0000 (10:28 +0000)]
app: GST_EXPORT -> GST_APP_API

We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.

6 years agoallocators: GST_EXPORT -> GST_ALLOCATORS_API
Tim-Philipp Müller [Tue, 13 Mar 2018 10:19:16 +0000 (10:19 +0000)]
allocators: GST_EXPORT -> GST_ALLOCATORS_API

We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.

6 years agoaudioaggregator: fix channel-mask negotiation
Mathieu Duponchelle [Mon, 12 Mar 2018 15:23:02 +0000 (16:23 +0100)]
audioaggregator: fix channel-mask negotiation

When outputting more than two channels, a channel-mask has to be
specified in the output caps.

We follow the same heuristic as other cases, when downstream
does not specify a channel-mask, we use that of the first
configured pad, and if there was none we generate a fallback
mask.

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

6 years agoplayback: Remove subtitle-encoding property on uridecodebin3
Edward Hervey [Mon, 12 Mar 2018 12:38:07 +0000 (13:38 +0100)]
playback: Remove subtitle-encoding property on uridecodebin3

For now, until we found a more future-proof solution

6 years agodocs: video: fix typo and add since marker
Tim-Philipp Müller [Sun, 11 Mar 2018 22:57:02 +0000 (22:57 +0000)]
docs: video: fix typo and add since marker

6 years agodocs: libs: add another missing symbol
Tim-Philipp Müller [Sun, 11 Mar 2018 22:45:32 +0000 (22:45 +0000)]
docs: libs: add another missing symbol

6 years agodocs: add video region of interest add/get parameter api to docs
Tim-Philipp Müller [Sun, 11 Mar 2018 19:06:45 +0000 (19:06 +0000)]
docs: add video region of interest add/get parameter api to docs

6 years agoaudio: Add audioaggregator.h in audio.h
Thibault Saunier [Sun, 11 Mar 2018 15:13:32 +0000 (12:13 -0300)]
audio: Add audioaggregator.h in audio.h

6 years agodocs: add GstPhysMemoryAllocator to docs
Tim-Philipp Müller [Thu, 8 Mar 2018 01:01:53 +0000 (01:01 +0000)]
docs: add GstPhysMemoryAllocator to docs

6 years agoRevert "alsasrc: lock calls to snd_pcm_delay() with mutex as in alsasink"
Tim-Philipp Müller [Wed, 7 Mar 2018 18:50:05 +0000 (18:50 +0000)]
Revert "alsasrc: lock calls to snd_pcm_delay() with mutex as in alsasink"

This reverts commit 4f88125b3ddc15367d528e850cc27739f5bb27fa.

This seems to have undesirable side-effects and needs more
investigation first.

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

6 years agogl: only enable gbm backend if gudev is available
Tim-Philipp Müller [Mon, 5 Mar 2018 19:57:55 +0000 (19:57 +0000)]
gl: only enable gbm backend if gudev is available

gudev/gudev.h is included unconditionally, so only enable
the gbm backend if gudev was actually found. This also
matches the meson build behaviour.

Should fix build on GNOME SDK builder.

6 years agoRelease 1.13.90
Tim-Philipp Müller [Sat, 3 Mar 2018 22:07:15 +0000 (22:07 +0000)]
Release 1.13.90

6 years agoUpdate docs
Tim-Philipp Müller [Sat, 3 Mar 2018 22:07:15 +0000 (22:07 +0000)]
Update docs

6 years agopkgconfig: Add private zlib dependency for libgsttag
Edward Hervey [Fri, 2 Mar 2018 14:21:25 +0000 (15:21 +0100)]
pkgconfig: Add private zlib dependency for libgsttag

Fixes issues with static application builds (which might not know
they need to link with zlib when using a libgsttag that was compiled
with it).

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

6 years agomeson: enable more warnings
Mathieu Duponchelle [Thu, 1 Mar 2018 17:07:37 +0000 (18:07 +0100)]
meson: enable more warnings

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

6 years agovideodecoder: Reset QoS time after pushing segment
Nicolas Dufresne [Thu, 1 Mar 2018 04:12:39 +0000 (23:12 -0500)]
videodecoder: Reset QoS time after pushing segment

This fixes playbin gapless playback. An ancient QoS time was used and
would lead to all frames being dropped.

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

6 years agoPort to latest GstAggregator segment API
Mathieu Duponchelle [Wed, 28 Feb 2018 23:34:06 +0000 (00:34 +0100)]
Port to latest GstAggregator segment API

The aggregator segment is now exposed on the src pad

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

6 years agoaudioaggregator: remove GstAudioAggregator->info
Mathieu Duponchelle [Wed, 28 Feb 2018 21:12:57 +0000 (22:12 +0100)]
audioaggregator: remove GstAudioAggregator->info

As we now require subclasses to use a subclass of
GstAudioAggregatorPad, we can reuse its info field

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

6 years agotests: tags: add unit test for ID3 v2.4 extended headers
Tim-Philipp Müller [Thu, 1 Mar 2018 12:43:25 +0000 (12:43 +0000)]
tests: tags: add unit test for ID3 v2.4 extended headers

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

6 years agoid3v2: re-fix handling of v2.4 extended headers
Edward Hervey [Mon, 12 Feb 2018 15:26:01 +0000 (16:26 +0100)]
id3v2: re-fix handling of v2.4 extended headers

The various id3v2 specs handle the extended header sizes differently
(because hey, it wouldn't be fun otherwise).

http://id3.org/id3v2.3.0 states:
"Where the 'Extended header size', currently 6 or 10 bytes, excludes
 itself."

http://id3.org/id3v2.4.0-structure states:
  Extended header size   4 * %0xxxxxxx
     Number of flag bytes       $01
     Extended Flags             $xx

   Where the 'Extended header size' is the size of the whole extended
   header, stored as a 32 bit synchsafe integer. An extended header can
   thus never have a size of fewer than six bytes.

So in id3v2.4.0 it's the *whole* extended header size (a-la ISOBMFF
atom), whereas in id3v2.3.0 it's the extended header size *excluding*
those 4 initial bytes.

And for other versions, god knows..

Fixes regression introduced in commit da607005.

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

6 years agoaudioaggregator: refactor conversion API
Mathieu Duponchelle [Wed, 28 Feb 2018 17:13:10 +0000 (18:13 +0100)]
audioaggregator: refactor conversion API

For the rationale, see:

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

Also test audiomixer conversion of current output buffer

6 years agoglcolorconvert: Fix a typo in a debug message
Jan Schmidt [Tue, 27 Feb 2018 12:34:03 +0000 (23:34 +1100)]
glcolorconvert: Fix a typo in a debug message

6 years agoglfilter: Support non-2D texture targets
Jan Schmidt [Tue, 27 Feb 2018 07:28:16 +0000 (18:28 +1100)]
glfilter: Support non-2D texture targets

Allow for sub-classes to change pad templates to
support other texture targets, and bind input textures
accordingly.

When setting the caps, also store the texture target.

By default, glfilter only reports 2D texture targets
in the default caps, but sub-classes can change that
and it would be nice if they could easily find out
which texture targets were negotiated.

This adds 2 fields to the public struct, but since
it's unreleased -base API, it's not an ABI break.

6 years agoaudioaggregator: Document that the pad's audio info is read-only and needs the object...
Sebastian Dröge [Wed, 28 Feb 2018 13:22:38 +0000 (15:22 +0200)]
audioaggregator: Document that the pad's audio info is read-only and needs the object lock

Also fix indentation in the header a bit.

6 years agom4: fix variable value access
Víctor Manuel Jáquez Leal [Tue, 27 Feb 2018 20:07:33 +0000 (14:07 -0600)]
m4: fix variable value access

6 years agoroi-meta: duplicate params when copying meta
Víctor Manuel Jáquez Leal [Tue, 27 Feb 2018 15:48:23 +0000 (09:48 -0600)]
roi-meta: duplicate params when copying meta

When copying the meta the params list should be copy too into the
new meta.

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

6 years agomeson: Don't install GL GBM headers
Nicolas Dufresne [Tue, 27 Feb 2018 18:14:26 +0000 (13:14 -0500)]
meson: Don't install GL GBM headers

6 years agogl: Move DRM_CFLAGS into gst-gl.m4
Nicolas Dufresne [Tue, 27 Feb 2018 18:12:59 +0000 (13:12 -0500)]
gl: Move DRM_CFLAGS into gst-gl.m4

6 years agogl: Add missing gbm directory to dist dir
Nicolas Dufresne [Mon, 26 Feb 2018 12:46:26 +0000 (07:46 -0500)]
gl: Add missing gbm directory to dist dir

This fixes make distcheck

6 years agogl: Add DRM cflags
Carlos Rafael Giani [Sun, 25 Feb 2018 13:16:44 +0000 (14:16 +0100)]
gl: Add DRM cflags

This prevents cross compilation errors like:

usr/include/xf86drm.h:40:10: fatal error: drm.h: No such file or directory

These are caused because gstgldisplay_gbm.h includes xf86drm.h .

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

6 years agopbutils: Fix compilation of last commit
Sebastian Dröge [Mon, 26 Feb 2018 09:55:46 +0000 (11:55 +0200)]
pbutils: Fix compilation of last commit

6 years agopbutils: Move locale dir initialization to a separate function and do lazy initialization
Thiago Santos [Sun, 25 Feb 2018 18:52:46 +0000 (10:52 -0800)]
pbutils: Move locale dir initialization to a separate function and do lazy initialization

It is the only thing gst_pb_utils_init()  does and it could be
automatically called from the places in pbutils it is needed.

After 1.14 we should deprecate gst_pb_utils_init().

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

6 years agogl: Add meson support for GBM backend
Nicolas Dufresne [Fri, 23 Feb 2018 21:39:32 +0000 (16:39 -0500)]
gl: Add meson support for GBM backend

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

6 years agogl: Add Mesa3D GBM backend
Carlos Rafael Giani [Fri, 23 Feb 2018 18:59:45 +0000 (19:59 +0100)]
gl: Add Mesa3D GBM backend

This makes it possible to use the GStreamer OpenGL elements without a
windowing system if a libdrm- and Mesa3D-supported GPU is present

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

6 years agoconfigure: Add configure checks for libdrm and gudev
Carlos Rafael Giani [Fri, 23 Feb 2018 16:09:49 +0000 (17:09 +0100)]
configure: Add configure checks for libdrm and gudev

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

6 years agoglimagesink: Correct PAR in output caps when transforming
Jan Schmidt [Fri, 23 Feb 2018 08:36:42 +0000 (19:36 +1100)]
glimagesink: Correct PAR in output caps when transforming

When doing a 3D/multiview transformation and rescaling to
match the output window size, the resulting PAR may
not match the input any more and needs recalculating,
or else the GstSample reported to client-draw has the
wrong PAR.

6 years agoroi-meta: Fix bad doc comment syntax
Nicolas Dufresne [Thu, 22 Feb 2018 21:11:20 +0000 (16:11 -0500)]
roi-meta: Fix bad doc comment syntax

6 years agovideometa: add support for downstream parameters to ROI meta
Guillaume Desmottes [Fri, 9 Feb 2018 13:45:08 +0000 (14:45 +0100)]
videometa: add support for downstream parameters to ROI meta

The current GstVideoRegionOfInterestMeta API allows elements to detect
and name ROI but doesn't tell anything about how this information is
meant to be consumed by downstream elements.
Typically, encoders may want to tweak their encoding settings for a
given ROI to increase or decrease their quality.
Each encoder has its own set of settings so that's not something that
can be standardized.

This patch adds encoder-specific parameters to the meta which can be
used to configure the encoding of a specific ROI.

A typical use case would be: source ! roi-detector ! encoder
with a buffer probe on the encoder sink pad set by the application.
Thanks to the probe the application will be able to tell to the encoder
how this specific region should be encoded.

Users could also develop their specific roi detectors meant to be used with a
specific encoder and directly putting the encoder parameters when
detecting the ROI.

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

6 years agortpbuffer.h: Add new RTPBuffer flags
Mikhail Fludkov [Fri, 17 Nov 2017 01:05:33 +0000 (02:05 +0100)]
rtpbuffer.h: Add new RTPBuffer flags

These flags will be used for Forward Error Correction purposes

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

6 years agomeson: fix multi-line string
Tim-Philipp Müller [Tue, 20 Feb 2018 11:52:43 +0000 (11:52 +0000)]
meson: fix multi-line string

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

6 years agopbutils: add some missing gi annotations
Thiago Santos [Mon, 19 Feb 2018 17:57:48 +0000 (09:57 -0800)]
pbutils: add some missing gi annotations

For allow-none parameters

6 years agotests: videoscale: simplify test and make it more robust
Tim-Philipp Müller [Mon, 19 Feb 2018 17:50:51 +0000 (17:50 +0000)]
tests: videoscale: simplify test and make it more robust

test_negotiation would occasionally time out, for unknown reasons.
Simplify the test setup and get rid of the main loop, busses, and
notify signals. With this I can no longer easily reproduce the
timeout. Fingers crossed.

6 years agoappsrc: don't signal the GCond if no one is waiting on it
Tim-Philipp Müller [Thu, 1 Feb 2018 19:25:49 +0000 (19:25 +0000)]
appsrc: don't signal the GCond if no one is waiting on it

Performance optimisation: Keep track whenever the streaming
thread or the application thread are waiting on the GCond for
more space or new data, and only signal on the GCond if someone
is actually waiting. Avoids unnecessary syscalls and thus
context switches.

6 years agoappsrc: use GstQueueArray instead of GQueue for internal item queue
Tim-Philipp Müller [Thu, 1 Feb 2018 01:22:21 +0000 (01:22 +0000)]
appsrc: use GstQueueArray instead of GQueue for internal item queue

Performance optimisation.

Avoids alloc/free churn for the queue's list nodes.

Depends on new API in GstQueueArray in core.

6 years agoappsink: don't signal the GCond if no one is waiting on it
Tim-Philipp Müller [Wed, 31 Jan 2018 20:19:47 +0000 (20:19 +0000)]
appsink: don't signal the GCond if no one is waiting on it

Performance optimisation: Keep track whenever the streaming
thread or the application thread are waiting on the GCond
for more space or new data, and only signal on the GCond if
someone is actually waiting. Avoids unnecessary syscalls and
thus context switches.

6 years agoappsink: use GstQueueArray instead of GQueue for internal item queue
Tim-Philipp Müller [Wed, 31 Jan 2018 20:11:41 +0000 (20:11 +0000)]
appsink: use GstQueueArray instead of GQueue for internal item queue

Performance optimisation.

Avoids alloc/free churn for the queue's list nodes.

6 years agoicles: add appsink and appsrc benchmarks
Tim-Philipp Müller [Wed, 31 Jan 2018 20:07:06 +0000 (20:07 +0000)]
icles: add appsink and appsrc benchmarks

These are very much artificial of course, but got to
measure something. appsink one contains lots of buffer
creation/free overhead, while appsrc one does not.

6 years agom4: gmodule-no-export-2.0 is needed for everything using the g_module_*() API
Sebastian Dröge [Sun, 18 Feb 2018 09:38:25 +0000 (11:38 +0200)]
m4: gmodule-no-export-2.0 is needed for everything using the g_module_*() API

While it is pulled in via the GLib check, GLIB_LIBS is not pulled into
any of the places using the API.

6 years agogl: Link to libgstallocators for the dmabuf allocator
Sebastian Dröge [Sat, 17 Feb 2018 16:34:58 +0000 (18:34 +0200)]
gl: Link to libgstallocators for the dmabuf allocator

6 years agogl/wayland: Memory leak when display couldn't connect
Víctor Manuel Jáquez Leal [Thu, 15 Feb 2018 10:21:34 +0000 (11:21 +0100)]
gl/wayland: Memory leak when display couldn't connect

When trying to create a wayland display, it may fail because there
is not actually display to connect. It this case NULL is returned
but the created instance is not freed.

This patch unrefs the failed display.

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

6 years agoaudio-converter: fix declaration-after-statement
Mathieu Duponchelle [Thu, 15 Feb 2018 20:08:08 +0000 (21:08 +0100)]
audio-converter: fix declaration-after-statement

6 years agoaudio-converter: add a convenience conversion method
Mathieu Duponchelle [Thu, 15 Feb 2018 19:00:42 +0000 (20:00 +0100)]
audio-converter: add a convenience conversion method

This is useful from python bindings

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

6 years agogst_audio_converter_new: update annotations
Mathieu Duponchelle [Thu, 15 Feb 2018 18:57:44 +0000 (19:57 +0100)]
gst_audio_converter_new: update annotations

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

6 years agoAudioConverter: register as boxed type
Mathieu Duponchelle [Thu, 15 Feb 2018 18:56:46 +0000 (19:56 +0100)]
AudioConverter: register as boxed type

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

6 years agoaudio-info: annotate gst_audio_info_set_format
Mathieu Duponchelle [Thu, 15 Feb 2018 18:54:34 +0000 (19:54 +0100)]
audio-info: annotate gst_audio_info_set_format

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

6 years agoBack to development
Tim-Philipp Müller [Thu, 15 Feb 2018 19:44:17 +0000 (19:44 +0000)]
Back to development

6 years agoRelease 1.13.1
Tim-Philipp Müller [Thu, 15 Feb 2018 17:01:15 +0000 (17:01 +0000)]
Release 1.13.1

6 years agodocs: update plugin docs
Tim-Philipp Müller [Thu, 15 Feb 2018 16:58:17 +0000 (16:58 +0000)]
docs: update plugin docs

6 years agoconfigure: fix build with --disable-external
Tim-Philipp Müller [Thu, 15 Feb 2018 12:51:10 +0000 (12:51 +0000)]
configure: fix build with --disable-external

6 years agopo: update translations
Tim-Philipp Müller [Thu, 15 Feb 2018 11:37:46 +0000 (11:37 +0000)]
po: update translations

6 years agoUpdate disted backup ORC files
Edward Hervey [Thu, 15 Feb 2018 06:14:20 +0000 (07:14 +0100)]
Update disted backup ORC files

6 years agogstaudiopack.orc: pack_u32be_swap: actually swap
Mathieu Duponchelle [Thu, 15 Feb 2018 00:14:52 +0000 (01:14 +0100)]
gstaudiopack.orc: pack_u32be_swap: actually swap

Fixes:

gst-launch-1.0 audiotestsrc ! audio/x-raw, format=U32BE ! \
audioconvert ! autoaudiosink

6 years agodoc: Remove obsolete Since 0.10.X marks
Nicolas Dufresne [Wed, 14 Feb 2018 19:39:32 +0000 (14:39 -0500)]
doc: Remove obsolete Since 0.10.X marks

6 years agodoc: Add per version newly added API indexes
Nicolas Dufresne [Wed, 14 Feb 2018 19:37:52 +0000 (14:37 -0500)]
doc: Add per version newly added API indexes

6 years agodoc: Fix since marker in dmabuf to match a stable release
Nicolas Dufresne [Wed, 14 Feb 2018 19:16:14 +0000 (14:16 -0500)]
doc: Fix since marker in dmabuf to match a stable release

6 years agodoc: Remove extra . after Since marker
Nicolas Dufresne [Wed, 14 Feb 2018 19:11:47 +0000 (14:11 -0500)]
doc: Remove extra . after Since marker

6 years agodoc: Fix Since 1.X marker on new video formats
Nicolas Dufresne [Wed, 14 Feb 2018 19:10:22 +0000 (14:10 -0500)]
doc: Fix Since 1.X marker on new video formats

6 years agodoc: Include new GstVideoOverlay API
Nicolas Dufresne [Wed, 14 Feb 2018 19:07:54 +0000 (14:07 -0500)]
doc: Include new GstVideoOverlay API

6 years agoplaybin3: fix source-setup signal emission
Philippe Normand [Wed, 14 Feb 2018 10:21:49 +0000 (10:21 +0000)]
playbin3: fix source-setup signal emission

Previous code would pass 0 as source element.

6 years agovorbisparse: error out when headers are missing
Tim-Philipp Müller [Wed, 14 Feb 2018 00:22:38 +0000 (00:22 +0000)]
vorbisparse: error out when headers are missing

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

6 years agoaudioaggregator: remove declaration for function that doesn't exist
Tim-Philipp Müller [Tue, 13 Feb 2018 17:16:53 +0000 (17:16 +0000)]
audioaggregator: remove declaration for function that doesn't exist

6 years agodocs: add GstAudioAggregator to docs
Tim-Philipp Müller [Tue, 13 Feb 2018 17:10:22 +0000 (17:10 +0000)]
docs: add GstAudioAggregator to docs

6 years agodocs: add audiomixer + audiointerleave to plugin docs
Tim-Philipp Müller [Tue, 13 Feb 2018 16:43:44 +0000 (16:43 +0000)]
docs: add audiomixer + audiointerleave to plugin docs

6 years agodocs: update plugin docs for recent changes
Tim-Philipp Müller [Tue, 13 Feb 2018 16:40:19 +0000 (16:40 +0000)]
docs: update plugin docs for recent changes

6 years agoaudiomixer, audiointerleave: add to build
Tim-Philipp Müller [Tue, 13 Feb 2018 16:38:32 +0000 (16:38 +0000)]
audiomixer, audiointerleave: add to build

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

6 years agoGstAudioAggregator: hook up to build
Tim-Philipp Müller [Tue, 13 Feb 2018 16:09:09 +0000 (16:09 +0000)]
GstAudioAggregator: hook up to build

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

6 years agoaudioaggregator, audiomixer, audiointerleave: move from -bad to -base
Tim-Philipp Müller [Tue, 13 Feb 2018 15:56:49 +0000 (15:56 +0000)]
audioaggregator, audiomixer, audiointerleave: move from -bad to -base

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

6 years agovorbisdec: Improve "new headers while initialized" handling
Edward Hervey [Tue, 13 Feb 2018 07:36:30 +0000 (08:36 +0100)]
vorbisdec: Improve "new headers while initialized" handling

If new headers arrive after we are initialized, we need to make
sure that they are indeed valid.

A vorbis bitstream always begins with three header packets and must
be in order.

Also some streams have unframed (invalid?) headers that might
confuse and disrupt the decoding process.

Therefore if ever we see new headers, we accumulate them and once
we get a non-header packet we check them to make sure that:
* We have at least 3 headers
* They are the expected ones (identification, comments and setup)
* They are in order
* Any other "header" is ignored

If those conditions are met, we reset and reconfigure the decoder

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

6 years agoplaybin3: Re-enable buffering message handling
Edward Hervey [Sat, 10 Feb 2018 14:41:10 +0000 (15:41 +0100)]
playbin3: Re-enable buffering message handling

Buffering messages are only sent for the active group (in case there
is more than one).

If the inactive group posts buffering messages we keep the last one
around and will post it once it becomes the playing one.

6 years agodecodebin3: high cpu usage after eos
François Laignel [Fri, 19 Jan 2018 17:40:53 +0000 (18:40 +0100)]
decodebin3: high cpu usage after eos

After eos, decodebin3 enters a loop sending eos events which causes high cpu usage.

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

6 years agodecodebin3: Handle dual-output of STREAM_START/EOS
Edward Hervey [Fri, 8 Dec 2017 15:46:21 +0000 (16:46 +0100)]
decodebin3: Handle dual-output of STREAM_START/EOS

In order to flush out multiqueue, we send again a STREAM_START and
then a EOS event.

The problem was that was that we might end up pushing out on the
output of multiqueue (and therefore decodebin3) a series of:
* EOS / STREAM_START / EOS

Apart from the uglyness of such output, If decodebin3 is used with
elements such as concat on their output, they might potentially
block on that second STREAM_START.

In order to make sure we don't end up in that situation we send
a custom STREAM_START event when refreshing multiqueue (which we
drop on the output) and we don't special case EOS events on streams
on which we already got EOS.

At worst we now end up sending at most two EOS on the output of
multiqueue (and decodebin3).

6 years agoplaybin3: Implement gapless playback
Edward Hervey [Fri, 10 Nov 2017 13:32:13 +0000 (14:32 +0100)]
playbin3: Implement gapless playback

Similar in vein to the playbin2 architecture except that uridecodebin3
are prerolled much earlier and all streams of the same type are
fed through a 'concat' element.

This keeps the philosphy of having all elements connected as soon
as possible.

The 'about-to-finish' signal is emitted whenever one of the uridecodebin
is about to finish, allowing the users to set the next uri/suburi.

The notion of a group being active has changed. It now means that the
uridecodebin3 has been activated, but doesn't mean it is the one
currently being outputted by the sinks (i.e. curr_group and next_group).
This is done via detecting GST_MESSAGE_STREAM_START emission by playsink
and figuring out which group is really playing.

When the current group changes, a new thread is started to deactivate
the previous one and optionnaly fire 'about-to-finish'.

6 years agoplaybin3: Use uridecodebin3 and link/reconfigure immediately
Edward Hervey [Thu, 9 Nov 2017 10:17:13 +0000 (11:17 +0100)]
playbin3: Use uridecodebin3 and link/reconfigure immediately

Apologies for the big commit, but it wasn't really possible to split it
in anything smaller.

* Switch to uridecodebin3 instead of managing urisourcebin and decodebin3
ourselves. No major architectural change with this.

* Reconfigure sinks/outputs when needed. This is possible thanks to the
various streams-related API. Instead of blocking new pads and waiting
for a (fake) no-more-pads to decide what to connect, we instead reconfigure
playsink and the combiners to whatever types are currently selected. All of
this is done in reconfigure_output().
  New pads are immediately connected to (combiners and) sinks, allowing
immediate negotiation and usage.

* Since elements are always connected, the "cached-duration" feature is gone
and queries can reach the target elements.

* The auto-plugging related code is currently disabled entirely until
we get the new proper API.

* Store collections at the GstSourceGroup level and not globally

* And more comments a bit everywhere

NOTE: gapless is still not functional, but this opens the way to be able
to handle it in a streams-aware fashion (where several uridecodebin3 can
be active at the same time).

6 years agourisourcebin: Add 'about-to-finish' signal
Edward Hervey [Thu, 9 Nov 2017 09:53:24 +0000 (10:53 +0100)]
urisourcebin: Add 'about-to-finish' signal

With push-based sources, urisourcebin will emit this signal when
the stream has been fully consumed.

This signal can be used to know when the source is done providing
data.

6 years agoplayback: New uridecodebin3 element
Edward Hervey [Thu, 9 Nov 2017 09:45:37 +0000 (10:45 +0100)]
playback: New uridecodebin3 element

In the same vein as old uridecodebin except that it also
accepts a suburi and uses urisourcebin and decodebin3 internally

6 years agoplaybin3: Remove wrong 'notify'
Edward Hervey [Thu, 9 Nov 2017 10:16:20 +0000 (11:16 +0100)]
playbin3: Remove wrong 'notify'

Those properties doesn't exist on playbin3, don't emit a notify for that

6 years agoplaybin3: Remove setting 'subtitle-encoding' on decodebin
Edward Hervey [Thu, 9 Nov 2017 10:14:29 +0000 (11:14 +0100)]
playbin3: Remove setting 'subtitle-encoding' on decodebin

That property doesn't exist

6 years agoplaybin3: Clarify documentation of combiner properties
Edward Hervey [Thu, 9 Nov 2017 10:12:08 +0000 (11:12 +0100)]
playbin3: Clarify documentation of combiner properties

6 years agoplaybin3: Remove unused define
Edward Hervey [Thu, 9 Nov 2017 10:11:12 +0000 (11:11 +0100)]
playbin3: Remove unused define

6 years agodecodebin3: Use GST_GROUP_ID_INVALID
Edward Hervey [Thu, 7 Dec 2017 14:23:17 +0000 (15:23 +0100)]
decodebin3: Use GST_GROUP_ID_INVALID

6 years agodecodebin3: Don't forward already-handling SELECT_STREAMS
Edward Hervey [Fri, 10 Nov 2017 14:01:04 +0000 (15:01 +0100)]
decodebin3: Don't forward already-handling SELECT_STREAMS

Upstream might respond negatively to the event, whereas we actually
handled it.

6 years agodecodebin3: Add new about-to-finish signal
Edward Hervey [Fri, 8 Dec 2017 16:01:05 +0000 (17:01 +0100)]
decodebin3: Add new about-to-finish signal

6 years agodecodebin3: Remove unused definition
Edward Hervey [Thu, 9 Nov 2017 09:46:31 +0000 (10:46 +0100)]
decodebin3: Remove unused definition

6 years agodecodebin3: Don't take the lock when creating a new input
Edward Hervey [Wed, 4 Oct 2017 15:42:45 +0000 (17:42 +0200)]
decodebin3: Don't take the lock when creating a new input

We only need to take the input lock when adding/removing
inputs from the list.

6 years agoplaybin3: Remove unused variable
Edward Hervey [Mon, 25 Sep 2017 13:24:08 +0000 (15:24 +0200)]
playbin3: Remove unused variable

The lock is never used

6 years agourisourcebin: Remove auto-plugging signals
Edward Hervey [Thu, 9 Nov 2017 09:52:38 +0000 (10:52 +0100)]
urisourcebin: Remove auto-plugging signals

They were never used and we need a better system

6 years agourisourcebin: Remove ASYNC behaviour
Edward Hervey [Thu, 9 Nov 2017 09:50:30 +0000 (10:50 +0100)]
urisourcebin: Remove ASYNC behaviour

It is not needed in the new streams-aware world

6 years agourisourcebin: Remove 'unknown-type' signal
Edward Hervey [Fri, 22 Sep 2017 15:20:35 +0000 (17:20 +0200)]
urisourcebin: Remove 'unknown-type' signal

It was never used and makes no sense in the new streams-based world

6 years agoplaybin3: Disable autoplug-related code
Edward Hervey [Fri, 22 Sep 2017 15:13:14 +0000 (17:13 +0200)]
playbin3: Disable autoplug-related code

The signals were never emitted from decodebin3. This needs
switching to a new signalling system

6 years agoplaybin3: fix "no-more-pads" handling
Edward Hervey [Fri, 22 Sep 2017 15:09:43 +0000 (17:09 +0200)]
playbin3: fix "no-more-pads" handling

That signal is never emitted by decodebin3 and is handled differently