platform/upstream/gstreamer.git
5 years agocaps: Add Since: 1.16 marker to gst_caps_copy()
Sebastian Dröge [Tue, 23 Apr 2019 11:39:48 +0000 (14:39 +0300)]
caps: Add Since: 1.16 marker to gst_caps_copy()

5 years agoaggregator: Mark all public structs as Since: 1.14
Sebastian Dröge [Tue, 23 Apr 2019 11:54:03 +0000 (14:54 +0300)]
aggregator: Mark all public structs as Since: 1.14

5 years agolibs: Fix various Since markers
Sebastian Dröge [Tue, 23 Apr 2019 12:07:08 +0000 (15:07 +0300)]
libs: Fix various Since markers

5 years agogst: Fix various Since markers
Sebastian Dröge [Tue, 23 Apr 2019 12:08:18 +0000 (15:08 +0300)]
gst: Fix various Since markers

5 years agoci: use template from 1.16 branch
Tim-Philipp Müller [Thu, 2 May 2019 11:35:17 +0000 (12:35 +0100)]
ci: use template from 1.16 branch

5 years agoRelease 1.16.0
Tim-Philipp Müller [Thu, 18 Apr 2019 23:15:21 +0000 (00:15 +0100)]
Release 1.16.0

5 years agoUpdate docs
Tim-Philipp Müller [Thu, 18 Apr 2019 23:15:21 +0000 (00:15 +0100)]
Update docs

5 years agoUpdate translations
Tim-Philipp Müller [Thu, 18 Apr 2019 23:15:19 +0000 (00:15 +0100)]
Update translations

5 years agobasesrc: Downgrade EOS warning
Olivier Crête [Thu, 18 Apr 2019 08:13:51 +0000 (10:13 +0200)]
basesrc: Downgrade EOS warning

In the case of pushfilesrc, this is the expected behaviour, so let's
downgrade the warning to a debug message to avoid confusing users.

5 years agotests: basesrc: unref gst_bus_timed_pop_filtered return
Mathieu Duponchelle [Wed, 17 Apr 2019 18:46:58 +0000 (20:46 +0200)]
tests: basesrc: unref gst_bus_timed_pop_filtered return

5 years agogstinfo: clean up function pointer names hashtable
Mathieu Duponchelle [Tue, 16 Apr 2019 11:29:00 +0000 (13:29 +0200)]
gstinfo: clean up function pointer names hashtable

And add strduped function pointer names to the global quark
table, so that they don't get reported as lost by valgrind.

This allows us to use GST_DEBUG when running tests under
valgrind.

5 years agoaggregator: fix doc chunk for new buffer-consumed signal
Tim-Philipp Müller [Tue, 16 Apr 2019 22:50:15 +0000 (23:50 +0100)]
aggregator: fix doc chunk for new buffer-consumed signal

Fixes 'Warning: GstBase: incorrect number of parameters in
comment block, parameter annotations will be ignored.' from
g-ir-scanner.

5 years agotracer: latency: Don't compare element name as element Id is already unique
Julian Bouzas [Fri, 12 Apr 2019 13:23:52 +0000 (09:23 -0400)]
tracer: latency: Don't compare element name as element Id is already unique

5 years agotracer: latency: Remove redundant if conditions
Julian Bouzas [Fri, 12 Apr 2019 12:38:03 +0000 (08:38 -0400)]
tracer: latency: Remove redundant if conditions

5 years agotracer: latency: Make GST_DEBUG logs consistent
Julian Bouzas [Fri, 12 Apr 2019 12:34:49 +0000 (08:34 -0400)]
tracer: latency: Make GST_DEBUG logs consistent

5 years agotracer: latency: Fix bug when dropping sub-latency probe event
Julian Bouzas [Fri, 12 Apr 2019 12:28:22 +0000 (08:28 -0400)]
tracer: latency: Fix bug when dropping sub-latency probe event

Fixes #373

5 years agoevent: fix seek event creation
Philipp Zabel [Fri, 12 Apr 2019 14:37:18 +0000 (16:37 +0200)]
event: fix seek event creation

Creating seek events segfaults on 32-bit ARM since commit 2fa15d53717c
('event: add new seek parameter, "trickmode-interval"'), which missed
casting the trickmode-interval initializer in the variable argument list
to guint64.

5 years agogst-inspect: Do not print warning if 'less' is missing
Xavier Claessens [Thu, 11 Apr 2019 19:32:51 +0000 (15:32 -0400)]
gst-inspect: Do not print warning if 'less' is missing

5 years agoRelease 1.15.90
Tim-Philipp Müller [Wed, 10 Apr 2019 23:19:11 +0000 (00:19 +0100)]
Release 1.15.90

5 years agoUpdate docs
Tim-Philipp Müller [Wed, 10 Apr 2019 23:19:11 +0000 (00:19 +0100)]
Update docs

5 years agotracer: latency: Fix typo bug
Julian Bouzas [Wed, 10 Apr 2019 13:17:01 +0000 (09:17 -0400)]
tracer: latency: Fix typo bug

5 years agotracer: latency: Fix bug when storing latency probe event
Julian Bouzas [Wed, 10 Apr 2019 13:13:53 +0000 (09:13 -0400)]
tracer: latency: Fix bug when storing latency probe event

The pad name sotred in the latency event has no longer the name of the element,
so we have to get the element Id, element name and pad name values from the data
structure and compare all 3 values.

5 years agocontrolbinding: Check if the weak pointer was cleared before explicitly removing it
Sebastian Dröge [Wed, 10 Apr 2019 07:18:54 +0000 (10:18 +0300)]
controlbinding: Check if the weak pointer was cleared before explicitly removing it

Otherwise we'll get an assertion if the object behind the weak pointer
was already destroyed in the meantime as we would pass NULL as first
argument to g_object_remove_weak_pointer().

5 years agotracer: latency: Show element id, element name and pad name
Julian Bouzas [Tue, 9 Apr 2019 12:05:09 +0000 (08:05 -0400)]
tracer: latency: Show element id, element name and pad name

5 years agogst-stats: Add element latency support
Julian Bouzas [Mon, 25 Mar 2019 14:36:08 +0000 (15:36 +0100)]
gst-stats: Add element latency support

This will output latency information when parsing a log file with gst-stats that
has latency trace information. It will show the min, max and mean latency for
the pipeline and all its elements. It will also show the reported latency for
each element of the pipeline. Output example:

Latency Statistics:
pulsesrc0_src|fakesink0_sink: mean=190000043 min=190000043 max=190000043

Element Latency Statistics:
flacparse0_src: mean=45561281 min=654988 max=90467575
flacenc0_src: mean=89938883 min=81913512 max=97964254
flacdec0_src: mean=45804881 min=228962 max=91380801

Element Reported Latency:
pulsesrc0: min=10000000 max=200000000 ts=0:00:00.262846528
flacenc0: min=104489795 max=104489795 ts=0:00:00.262898616
flacparse0: min=0 max=0 ts=0:00:00.262927962

5 years agotracer: latency: Show per-element reported latency
Julian Bouzas [Thu, 21 Mar 2019 09:37:34 +0000 (10:37 +0100)]
tracer: latency: Show per-element reported latency

5 years agotracer: latency: Show element's source pad name instead of element's name
Julian Bouzas [Wed, 20 Mar 2019 11:20:48 +0000 (12:20 +0100)]
tracer: latency: Show element's source pad name instead of element's name

The full pad name gives more information than the element's name, which is very
useful when elements have multiple source pads.

5 years agolatency: Dot not override already stored events
Nicolas Dufresne [Tue, 19 Mar 2019 01:55:50 +0000 (21:55 -0400)]
latency: Dot not override already stored events

First, the event would be leaved, but also when an element takes
several buffers before producing one, we want the reported latency to be
the aggregation, so the distance from the oldest buffer.

5 years agotracer: latency: Add parameter to select latency type
Nicolas Dufresne [Wed, 31 Oct 2018 20:50:48 +0000 (16:50 -0400)]
tracer: latency: Add parameter to select latency type

This sets back the default to trace only pipeline latency, and add flags
to enabled element tracing. It is now possible to only trace element
latency, only trace pipeline latency, trace both or none.

5 years agotracer: latency: Add per element latency tracer
Nicolas Dufresne [Fri, 6 Jul 2018 21:08:24 +0000 (17:08 -0400)]
tracer: latency: Add per element latency tracer

This adds per element latency tracing.

5 years agotracer: Don't pass pads inside GstEvent
Nicolas Dufresne [Wed, 4 Jul 2018 18:18:42 +0000 (14:18 -0400)]
tracer: Don't pass pads inside GstEvent

This removes the passing of pad inside of a GstEvent. While this is not
a bug, it may affect the live time of the pad, hense change the pipeline
behaviour.

5 years agobasesrc: do not send EOS when automatic_eos is FALSE
Mathieu Duponchelle [Tue, 13 Nov 2018 20:19:22 +0000 (21:19 +0100)]
basesrc: do not send EOS when automatic_eos is FALSE

5 years agoaggregator: add buffer-consumed pad signal
Mathieu Duponchelle [Mon, 1 Apr 2019 10:22:49 +0000 (12:22 +0200)]
aggregator: add buffer-consumed pad signal

The signal will be emitted when a buffer was consumed on
a pad, if the newly-added "emit-signals" property has been
set to TRUE.

Handlers connected to the signal will receive a valid reference on
the consumed buffer, allowing for example the retrieval of metas in
order to forward them once an output buffer is pushed out.

5 years agogst-inspect: fix printing the first field of a GstStructure
Antonio Ospite [Fri, 5 Apr 2019 09:43:53 +0000 (11:43 +0200)]
gst-inspect: fix printing the first field of a GstStructure

When printing a GstStructure property (e.g. the "stats" property in
rtpsession) the first field is printed on the same line of the type
description, and this is both inconsistent compared to  how Enum values
are printed and confusing as the reader might miss the first field.

To fix this, add a newline before printing GstStructure fields in
properties.

NOTE: this does not change the existing inconsistent behavior of an
extra newline *after* a GstStructure property, but the latter is not as
annoying and it would take more effort to fix because GstStructure
fields are printed in CAPS descriptions too.

5 years agoevent: add new seek parameter, "trickmode-interval"
Mathieu Duponchelle [Mon, 1 Apr 2019 16:34:07 +0000 (18:34 +0200)]
event: add new seek parameter, "trickmode-interval"

When performing a key unit trickmode seek, it may be useful to
specify a minimum interval between the output frames, either
in very high rate cases, or as a protection against streams
that may contain an overly large amount of key frames.

One use case is ONVIF Section 6.5.3:

<https://www.onvif.org/specs/stream/ONVIF-Streaming-Spec.pdf>

5 years agotests: add the valgrind suppression file from the "common" module
Antonio Ospite [Fri, 22 Mar 2019 16:46:03 +0000 (17:46 +0100)]
tests: add the valgrind suppression file from the "common" module

Other gstreamer repositories have their own valgrind suppression file
directly in the repository.

Add a suppression file to the core gstreamer repository too, this makes
it easier to use it with gst-build which does not check out the common
module.

This is also a little step towards the removal of the common submodule.

NOTE: the added file is the latest version from the "common" repository
but it has been renamed from gst.supp to gstreamer.supp for symmetry
with the suppression files in the other repositories.

5 years agog-i: pass --quiet to g-ir-scanner
Tim-Philipp Müller [Sat, 23 Mar 2019 18:31:42 +0000 (18:31 +0000)]
g-i: pass --quiet to g-ir-scanner

This suppresses the annoying 'g-ir-scanner: link: cc ..' output
that we get even if everything works just fine.

We still get g-ir-scanner warnings and compiler warnings if
we pass this option.

5 years agocheck: suppress some g-i warnings
Tim-Philipp Müller [Sat, 23 Mar 2019 18:17:43 +0000 (18:17 +0000)]
check: suppress some g-i warnings

gstcheck.c:142: Warning: GstCheck: gst_check_add_log_filter: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip)
gstcheck.h:178: Warning: GstCheck: gst_check_run_suite: argument suite: Unresolved type: 'Suite*'

5 years agog-i: silence 'nested extern' compiler warnings when building scanner binary
Tim-Philipp Müller [Sat, 23 Mar 2019 17:53:54 +0000 (17:53 +0000)]
g-i: silence 'nested extern' compiler warnings when building scanner binary

We need a nested extern in our init section for the scanner binary
so we can call gst_init to make sure GStreamer types are initialised
(they are not all lazy init via get_type functions, but some are in
exported variables). There doesn't seem to be any other mechanism to
achieve this, so just remove that warning, it's not important at all.

5 years agobitwriter: mark as 'skip' for gobject-introspection
Tim-Philipp Müller [Sat, 23 Mar 2019 17:53:07 +0000 (17:53 +0000)]
bitwriter: mark as 'skip' for gobject-introspection

Silences g-ir-scanner warnings. We do the same for ByteWriter.

5 years agoaggregator: don't leak gap buffer when out of segment
Matthew Waters [Thu, 21 Mar 2019 07:55:16 +0000 (18:55 +1100)]
aggregator: don't leak gap buffer when out of segment

5 years agoaggregator: take the pad lock around queue gap event removal
Matthew Waters [Thu, 21 Mar 2019 07:47:04 +0000 (18:47 +1100)]
aggregator: take the pad lock around queue gap event removal

As is done for every other queue interaction

5 years agobaseparse: don't reset the disable-passthrough property value
Matthew Waters [Wed, 20 Mar 2019 06:43:02 +0000 (17:43 +1100)]
baseparse: don't reset the disable-passthrough property value

Resetting as a result of _reset() on PAUSED->READY is unexpected.

5 years agogst_element_get_factory: update documentation
Stephane Cerveau [Thu, 14 Mar 2019 10:59:43 +0000 (11:59 +0100)]
gst_element_get_factory: update documentation

Inform about a potential NULL result.

5 years agogst_element_factory_get_metadata: protect from null factory
Stephane Cerveau [Wed, 13 Mar 2019 17:46:14 +0000 (18:46 +0100)]
gst_element_factory_get_metadata: protect from null factory

5 years agoUpdate README
Damian Vicino [Tue, 12 Mar 2019 21:19:23 +0000 (21:19 +0000)]
Update README

5 years agoUpdate README to have correct name of the license file documented (COPYING).
Damian Vicino [Tue, 12 Mar 2019 20:12:37 +0000 (20:12 +0000)]
Update README to have correct name of the license file documented (COPYING).
There is no LICENSE file in the root directory, and COPYING file content is a license file.

5 years agotests: fdsrc: Exclude unit test on Windows
Seungha Yang [Sun, 10 Mar 2019 06:35:39 +0000 (15:35 +0900)]
tests: fdsrc: Exclude unit test on Windows

Since elements_fdsrc.test_num_buffers uses blocking pipe on Windows,
the test will never be finished. But emulating non-blocking fd without
win32 APIs on Windows is a little tricky.

5 years agogsttaskpool: Do not block tasks while cleaning up the taskpool
Santiago Carot-Nemesio [Fri, 8 Mar 2019 15:19:29 +0000 (16:19 +0100)]
gsttaskpool: Do not block tasks while cleaning up the taskpool

There is a deadlock if any thread from the pool tries to push
a new task while other thread is waiting for the pool of threads
to finish. With this patch the thread will get an error when it
tries to add a new task while the taskpool is being cleaned up.

5 years agogsturi: Fix annotation on get_path to return a nullable
Marco Trevisan (Treviño) [Wed, 6 Mar 2019 18:46:46 +0000 (19:46 +0100)]
gsturi: Fix annotation on get_path to return a nullable

Use proper syntax or the (nullable): part will be part of the description

5 years agogstmessage: Fix annotations on details
Marco Trevisan (Treviño) [Wed, 6 Mar 2019 18:34:12 +0000 (19:34 +0100)]
gstmessage: Fix annotations on details

Details argument should be nullable, but the docstring uses a wrong syntax.

5 years agotests: fix leak in buffer test_wrapped_bytes test
Tim-Philipp Müller [Wed, 6 Mar 2019 09:04:54 +0000 (09:04 +0000)]
tests: fix leak in buffer test_wrapped_bytes test

5 years agogstbuffer: store meta in add order
Mathieu Duponchelle [Fri, 1 Mar 2019 10:59:14 +0000 (11:59 +0100)]
gstbuffer: store meta in add order

The previous implementation of add was implemented as a prepend,
switch to append as that seems like the expected order.

5 years agoBack to development
Tim-Philipp Müller [Mon, 4 Mar 2019 09:01:07 +0000 (09:01 +0000)]
Back to development

5 years agotaskpool: Set error in case something goes wrong in the default handlers
Santiago Carot-Nemesio [Thu, 28 Feb 2019 15:48:57 +0000 (16:48 +0100)]
taskpool: Set error in case something goes wrong in the default handlers

5 years agoRelease 1.15.2
Tim-Philipp Müller [Tue, 26 Feb 2019 11:38:00 +0000 (11:38 +0000)]
Release 1.15.2

5 years agomeson: dist get_flex_version.py
Tim-Philipp Müller [Tue, 26 Feb 2019 13:23:47 +0000 (13:23 +0000)]
meson: dist get_flex_version.py

5 years agoUpdate docs
Tim-Philipp Müller [Tue, 26 Feb 2019 11:38:00 +0000 (11:38 +0000)]
Update docs

5 years agoUpdate translations
Tim-Philipp Müller [Tue, 26 Feb 2019 11:37:57 +0000 (11:37 +0000)]
Update translations

5 years agoplugin: add 0BSD as valid license
Philipp Zabel [Mon, 25 Feb 2019 12:49:43 +0000 (13:49 +0100)]
plugin: add 0BSD as valid license

Add the zero-clause BSD license, which is an alteration of the ISC
license, to the list of valid licenses.

5 years agoplugin: fix link to 3-clause BSD license
Philipp Zabel [Mon, 25 Feb 2019 12:48:38 +0000 (13:48 +0100)]
plugin: fix link to 3-clause BSD license

The current link points to the 2-clause BSD license,
explicitly link to the 3-clause version of the license.

5 years agogstmacros.h: Fix restrict definition on MSVC
Nirbheek Chauhan [Wed, 20 Feb 2019 12:21:40 +0000 (17:51 +0530)]
gstmacros.h: Fix restrict definition on MSVC

Turns out it's exposed as `__restrict`, not as `restrict`.

https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/95#note_120782

5 years agogstmacros.h: Fix check for 'restrict' keyword
Nirbheek Chauhan [Tue, 19 Feb 2019 19:55:11 +0000 (01:25 +0530)]
gstmacros.h: Fix check for 'restrict' keyword

MSVC also defines it as a keyword. Fixes build errors in projects that
include MSVC's xkeycheck.h which ensures that keywords aren't overriden
with a define.

5 years agobuffer: Don't miss return value on Windows build
Seungha Yang [Mon, 18 Feb 2019 00:58:19 +0000 (09:58 +0900)]
buffer: Don't miss return value on Windows build

... and use InterlockedExchangeAdd64 for the 64bit value.
InterlockedExchangeAdd is 32bit version.

5 years agobus: Make removing of signal/bus watches thread-safe
Sebastian Dröge [Fri, 15 Feb 2019 11:23:37 +0000 (13:23 +0200)]
bus: Make removing of signal/bus watches thread-safe

Between getting the GSource with the mutex and destroying it, something
else might've destroyed it already and we would have a dangling pointer.

Keep an additional reference just in case.

5 years agobus: Don't allow removing signal watches with gst_bus_remove_watch()
Sebastian Dröge [Fri, 15 Feb 2019 11:20:27 +0000 (13:20 +0200)]
bus: Don't allow removing signal watches with gst_bus_remove_watch()

Signal watches are reference counted and gst_bus_remove_watch() would
immediately remove it, breaking the reference counting. Only
gst_bus_remove_signal_watch() should be used for removing signal
watches.

5 years agopad: Document that pad unlink function is called with pad lock held
Lawrence Troup [Mon, 11 Feb 2019 02:21:21 +0000 (15:21 +1300)]
pad: Document that pad unlink function is called with pad lock held

Fixes #353

5 years agobuffer: store sequence number for metas
Tim-Philipp Müller [Fri, 2 Dec 2016 17:56:59 +0000 (17:56 +0000)]
buffer: store sequence number for metas

For metas where order might be significant if multiple metas are
attached to the same buffer, so store a sequence number with the
meta when adding it to the buffer. This allows users of the meta
to make sure metas are processed in the right order.

We need a 64-bit integer for the sequence number here in the API,
a 32-bit one might overflow too easily with high packet/buffer
rates. We could do it rtp-seqnum style of course, but that's a
bit of a pain.

We could also make it so that gst_buffer_add_meta() just keeps metas in
order or rely on the order we add the metas in, but that seems too
fragile overall, when buffers (incl. metas) get merged or split.

Also add a compare function for easier sorting.

We store the seqnum in the MetaItem struct here and not in the
GstMeta struct since there's no padding in the GstMeta struct.
We could add a private struct to GstMeta before the start of
GstMeta, but that's what MetaItem effectively is implementation-
wise. We can still change this later if we want, since it's all
private.

Fixes #262

5 years agodeviceprovider: It's (transfer none) not (transfer-none)
Sebastian Dröge [Sat, 9 Feb 2019 09:35:59 +0000 (11:35 +0200)]
deviceprovider: It's (transfer none) not (transfer-none)

5 years agodevice-provider: Allow notifying application of device changes
Thibault Saunier [Wed, 30 Jan 2019 13:41:58 +0000 (10:41 -0300)]
device-provider: Allow notifying application of device changes

Thi introduces new APIs to post a `DEVICE_CHANGED` message on the
bus so the application is notifies when a device is modified. For
example, if the "defaultness" of a device was changed or any property
that can be changed at any time. Atomically changing the device
object notifying that way allow us to abtract away the internal threads.

New APIS:
  - gst_message_new_device_changed
  - gst_message_parse_device_changed
  - gst_device_provider_device_changed

5 years agomeson: Extract flex version using a regex inside a script
Nirbheek Chauhan [Fri, 8 Feb 2019 11:12:43 +0000 (16:42 +0530)]
meson: Extract flex version using a regex inside a script

Different builds of Flex on different platforms output different strings
in --version. For example:

macOS:
flex 2.5.35 Apple(flex-31)

Windows:
win_flex.exe 2.6.4
C:\Program Files (x86)\GnuWin32\bin\flex.EXE version 2.5.4

We need to look for a string that looks like a version, which means
a regex till https://github.com/mesonbuild/meson/issues/1609 is fixed.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/356

5 years agomisc: Fix various compiler warnings on MinGW
Nirbheek Chauhan [Tue, 5 Feb 2019 12:48:48 +0000 (18:18 +0530)]
misc: Fix various compiler warnings on MinGW

gstharness.c: Use G_GSIZE_FORMAT instead of hard-coding %zu
error: unknown conversion type character 'z' in format [-Werror=format]

gst-inspect.c: GPid is void* on non-UNIX, and we only use it on UNIX
error: initialization makes pointer from integer without a cast [-Werror]

gstmeta.c: Use and then discard value
error: value computed is not used [-Werror=unused-value]

With this, gstreamer builds with -Werror on MinGW

5 years agodatetime: new() and new_local_time() constructors are not nullable
Sebastian Dröge [Tue, 29 Jan 2019 14:26:49 +0000 (16:26 +0200)]
datetime: new() and new_local_time() constructors are not nullable

5 years agopad: Constructors are all not nullable
Sebastian Dröge [Tue, 29 Jan 2019 13:50:06 +0000 (15:50 +0200)]
pad: Constructors are all not nullable

They can't possibly return NULL except in case of assertions.

5 years agopadtemplate: Constructors are all nullable as they check the template name
Sebastian Dröge [Tue, 29 Jan 2019 13:49:50 +0000 (15:49 +0200)]
padtemplate: Constructors are all nullable as they check the template name

5 years agotest: Set PTS on proper variable
Edward Hervey [Tue, 29 Jan 2019 11:01:59 +0000 (12:01 +0100)]
test: Set PTS on proper variable

This would previously set the PTS on a random address causing various
memory corruption

5 years agogstinfo: add Windows stacktraces support
Mathieu Duponchelle [Fri, 25 Jan 2019 01:36:18 +0000 (02:36 +0100)]
gstinfo: add Windows stacktraces support

This uses the DbgHelp library if available

5 years agopad: Remove unneeded 64bit upcast in debug trace
Nicolas Dufresne [Fri, 25 Jan 2019 18:46:59 +0000 (13:46 -0500)]
pad: Remove unneeded 64bit upcast in debug trace

The hook->hook_id is a gulong for which there are no portability issues
when tracing in printf format with %lu. So use %lu and remove the upcast
to 64 bit. This makes the code more consistent with everything else
tracing that hook_id and other gulong id.

5 years agogst-inspect: Re-add DEFAULT_LESS_OPTS with initial value
Nicolas Dufresne [Thu, 24 Jan 2019 18:52:46 +0000 (13:52 -0500)]
gst-inspect: Re-add DEFAULT_LESS_OPTS with initial value

Commit 56b4fbef5e6760adc927d0e1c7c8d6a0db9b785c refactored the pipe code
to use GLib utility, but the patch was hading some other changed. LESS
env was now hardcoded in the middle instead of from a define and was
changed from FXR to -RX. The "-" is not even valid for LESS env, and
with the lost of F, we would still use a pager when the content fits the
terminal.

5 years agotaglist: Remove (scope call) annotation from gst_tag_register()
Sebastian Dröge [Wed, 23 Jan 2019 11:51:08 +0000 (13:51 +0200)]
taglist: Remove (scope call) annotation from gst_tag_register()

This was added in 7fdb15d6a2 but it is wrong. (scope call) is for
closures that only have to stay valid for the scope of the call, but the
tag merge function has to stay valid for the whole lifetime of the
application instead.

There's no appropriate scope annotation for that so we have to skip
these functions for now.

5 years agotests: info: Fix spurious validation
Seungha Yang [Wed, 23 Jan 2019 03:15:13 +0000 (12:15 +0900)]
tests: info: Fix spurious validation

Should be equality check, not assignment.
Additionally, use fail_unless_equals_* macro for better readability
and debugging easier, if possible.

5 years agomeson: improve flex version parsing
Mathieu Duponchelle [Wed, 23 Jan 2019 20:15:09 +0000 (21:15 +0100)]
meson: improve flex version parsing

the output of flex --version can contain more than one space

5 years agomeson: Correct minimum required GLib version
Seungha Yang [Tue, 22 Jan 2019 05:05:43 +0000 (14:05 +0900)]
meson: Correct minimum required GLib version

It's updated to 2.40.0 since the commit 3e8ef4cf5a41e26836f0a5a8cb3ddaa5e55f1524

5 years agogst-inspect: Don't setup pager too early
Seungha Yang [Thu, 17 Jan 2019 02:22:27 +0000 (11:22 +0900)]
gst-inspect: Don't setup pager too early

Setup it only if we have something to print out about inspected results.
Otherwise, gst_tools_print_version() output will be redirected to pager and also
exit immediately without waiting child process.

5 years agogst-inspect: Port to Glib's spawn API
Seungha Yang [Tue, 8 Jan 2019 12:23:44 +0000 (21:23 +0900)]
gst-inspect: Port to Glib's spawn API

Although we support pager just for *nix until now,
this can make more portable to Windows.

Fixes #342

5 years agoRelease 1.15.1
Tim-Philipp Müller [Thu, 17 Jan 2019 01:38:59 +0000 (01:38 +0000)]
Release 1.15.1

5 years agoUpdate docs
Tim-Philipp Müller [Thu, 17 Jan 2019 01:38:59 +0000 (01:38 +0000)]
Update docs

5 years agoUpdate translations
Tim-Philipp Müller [Thu, 17 Jan 2019 01:38:49 +0000 (01:38 +0000)]
Update translations

5 years agogst-inspect: Fix ANSI escape sequence usage on Windows
Nirbheek Chauhan [Wed, 16 Jan 2019 20:00:25 +0000 (01:30 +0530)]
gst-inspect: Fix ANSI escape sequence usage on Windows

Either disable it when it's not supported, or setup the console to
interpret them correctly when it's supported.

Closes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/351

5 years agopad: Fix printf format when printing hook id
Sebastian Dröge [Tue, 15 Jan 2019 16:05:31 +0000 (18:05 +0200)]
pad: Fix printf format when printing hook id

It's a gulong so we have to cast it to a guint64 when using it with
G_GUINT64_FORMAT.

Spotted by Vincent Penvern.

5 years agodeviceprovider: fix counting number of times started
Daniel Drake [Mon, 14 Jan 2019 08:22:16 +0000 (16:22 +0800)]
deviceprovider: fix counting number of times started

GstDeviceProvider has a started_count private variable counter,
and the gst_device_provider_start() documentation emphasizes the
importance of balancing the start and stop calls.

However, when starting a provider that is already started, the
current code will never increment the counter more than once.

So you start it twice, but it will have start_count 1, which is the
maximum value it will ever see.

Then when you stop it twice, on the 2nd stop, after decrementing the
counter in gst_device_provider_stop():

  else if (provider->priv->started_count < 1) {
    g_critical
        ("Trying to stop a GstDeviceProvider %s which is already stopped",
        GST_OBJECT_NAME (provider));

and the program is killed.

Fix this by incrementing the counter when starting a device provider that
was already started.

5 years agotests: gstdatetime: move gst_date_time_new* and time() calls closer
Jordan Petridis [Fri, 11 Jan 2019 10:32:49 +0000 (12:32 +0200)]
tests: gstdatetime: move gst_date_time_new* and time() calls closer

While extremelly rare, time and gst_date_time_new_* will have
diff values and potentially trigger an assertion. Thus move
the calls as closely together as possible to mitigate this.

5 years agoRevert "bin: Hold the state lock while removing elements from a bin"
Sebastian Dröge [Thu, 10 Jan 2019 12:05:34 +0000 (12:05 +0000)]
Revert "bin: Hold the state lock while removing elements from a bin"

This reverts commit 7f70d7a9450b321585fbfd1eb977548d4264b2a6

5 years agotests: Add more int range fixation tests
Jan Alexander Steffens (heftig) [Wed, 9 Jan 2019 13:01:02 +0000 (14:01 +0100)]
tests: Add more int range fixation tests

5 years agostructure: Support stepped ranges when fixating
Jan Alexander Steffens (heftig) [Wed, 9 Jan 2019 12:38:44 +0000 (13:38 +0100)]
structure: Support stepped ranges when fixating

The step restriction was completely ignored until now.

5 years agostructure: Use GLib's CLAMP macro for fixating ranges
Jan Alexander Steffens (heftig) [Wed, 9 Jan 2019 12:37:30 +0000 (13:37 +0100)]
structure: Use GLib's CLAMP macro for fixating ranges

Just a bit of refactoring.

5 years agoelement: Add note about racyness to gst_element_set_locked_state()
Sebastian Dröge [Mon, 7 Jan 2019 12:08:25 +0000 (14:08 +0200)]
element: Add note about racyness to gst_element_set_locked_state()

This is racy if the state lock of the parent bin is not taken. The
parent bin might've just checked the flag in another thread and as the
next step proceed to change the child element's state.

5 years agobin: Hold the state lock while removing elements from a bin
Sebastian Dröge [Mon, 7 Jan 2019 12:08:00 +0000 (14:08 +0200)]
bin: Hold the state lock while removing elements from a bin

We need to take the state lock here to ensure that we're
not currently just before setting the state of this child
element. Otherwise it can happen that we removed the element
here and e.g. set it to NULL state, and shortly afterwards
have another thread set it to a higher state again as part of
a state change for the whole bin.

When adding an element to the bin this is not needed as we
require callers to always ensure after adding to the bin that
the new element is set to the correct state.

5 years agoaggregator: fix typo in docs
Tim-Philipp Müller [Sat, 5 Jan 2019 18:55:12 +0000 (18:55 +0000)]
aggregator: fix typo in docs

5 years agopipeline: Call gst_task_cleanup_all() before checking reference counts after shutdown
Sebastian Dröge [Wed, 2 Jan 2019 21:35:11 +0000 (23:35 +0200)]
pipeline: Call gst_task_cleanup_all() before checking reference counts after shutdown

We have to ensure that all background threads from thread pools are shut
down, or otherwise they might not have had a chance yet to drop their
last reference to the pipeline and then the assertion for a reference
count of 1 on the pipeline fails.