platform/upstream/gstreamer.git
6 years agoRevert "preset: Do not save deprecated properties"
Thibault Saunier [Sun, 26 Nov 2017 16:31:28 +0000 (13:31 -0300)]
Revert "preset: Do not save deprecated properties"

This reverts commit 81e10f61231ad56ca4aa07278993b87c6ec0f058.

A mistake lead to committing it twice in a weird way.

6 years agopreset: Do not save deprecated properties
Thibault Saunier [Fri, 3 Nov 2017 15:20:47 +0000 (12:20 -0300)]
preset: Do not save deprecated properties

It will g_warn upon deserialization and we should not use
those anyway.

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

6 years agotaglist: Avoid assertions when getting tag nick from unregister tag
Thibault Saunier [Wed, 8 Nov 2017 15:46:44 +0000 (12:46 -0300)]
taglist: Avoid assertions when getting tag nick from unregister tag

With serialized GstDiscovererInfos we might end up trying to use
tags that have not been registered.

6 years agopreset: Do not save deprecated properties
Thibault Saunier [Fri, 3 Nov 2017 15:23:50 +0000 (12:23 -0300)]
preset: Do not save deprecated properties

It will g_warn upon desarialization and we should not use
those anyway.

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

6 years agotracers: log: no need to link to our internal printf implementation
Tim-Philipp Müller [Thu, 12 Oct 2017 23:21:03 +0000 (00:21 +0100)]
tracers: log: no need to link to our internal printf implementation

The call to __gst_vasprintf() was removed in commit 1a3e218b8.

6 years agotools: gst-inspect: don't print element flags whch are always 'none'
Tim-Philipp Müller [Sun, 26 Nov 2017 00:20:13 +0000 (00:20 +0000)]
tools: gst-inspect: don't print element flags whch are always 'none'

We print the interesting flags like clocking capabilities separately
later, this function just always prints 'none', so remove it.

6 years agotools: gst-inspect: print pad properties where we know the subclass type
Tim-Philipp Müller [Sat, 25 Nov 2017 23:43:56 +0000 (23:43 +0000)]
tools: gst-inspect: print pad properties where we know the subclass type

6 years agotools: gst-inspect: refactor way indentation is done during printing
Tim-Philipp Müller [Sat, 25 Nov 2017 22:27:08 +0000 (22:27 +0000)]
tools: gst-inspect: refactor way indentation is done during printing

6 years agogstinfo: Use free instead of g_free
Edward Hervey [Sat, 25 Nov 2017 12:07:12 +0000 (13:07 +0100)]
gstinfo: Use free instead of g_free

Because

6 years agogstinfo: Don't leak array of strings
Edward Hervey [Sat, 25 Nov 2017 11:44:11 +0000 (12:44 +0100)]
gstinfo: Don't leak array of strings

The array provided by backtrace_symbols needs to be freed.

6 years agocheck/buffer: Remove usless memcmp with empty size
Edward Hervey [Fri, 24 Nov 2017 11:08:07 +0000 (12:08 +0100)]
check/buffer: Remove usless memcmp with empty size

1) checking nothing against nothing is pointless
2) memcmp needs to be provided non-NULL arguments

6 years agogstutils: Fix linear regression comparision
Edward Hervey [Fri, 24 Nov 2017 11:05:26 +0000 (12:05 +0100)]
gstutils: Fix linear regression comparision

The check for dropping precision was wrong when sxx and syy were negative.

if they are negative then "G_MAXINT64 - val" would always overflow

The check was meant to use G_MININT64 (like in the loop contained just
after).

6 years agocheck: add missing harness function to symbol export list
Matthew Waters [Fri, 24 Nov 2017 02:58:01 +0000 (13:58 +1100)]
check: add missing harness function to symbol export list

Fixes in user code:

undefined reference to `gst_harness_add_element_sink_pad'

Also reorder harness function list to be strictly in alphabetical order and
double check the list with:

awk '{ if ($1 !~ /#define/) if ($2 ~ /gst_harness_/) { print $2 }; if ($3 ~ /gst_harness_/) { print $3} }' libs/gst/check/gstharness.h | sort

6 years agotests: include config.h and don't include unix headers
Tim-Philipp Müller [Fri, 24 Nov 2017 12:41:20 +0000 (13:41 +0100)]
tests: include config.h and don't include unix headers

In many cases the unistd.h includes weren't actually needed.

Preparation for making tests work on Windows with MSVC.

6 years agotests: add missing license header to test_transform.c
Tim-Philipp Müller [Fri, 24 Nov 2017 12:21:47 +0000 (13:21 +0100)]
tests: add missing license header to test_transform.c

6 years agogsttraceutils: actually disable tracing system hooks if configured
Mikhail Fludkov [Fri, 10 Nov 2017 15:26:50 +0000 (16:26 +0100)]
gsttraceutils: actually disable tracing system hooks if configured

`./configure --disable-gst-tracer-hooks` didn't do anything, hooks were
always enabled regardless of the option. It works correctly in the
Meson build though.

6 years agoutils: add gst_utils_dump_buffer()
Havard Graff [Thu, 26 Oct 2017 10:09:07 +0000 (12:09 +0200)]
utils: add gst_utils_dump_buffer()

Useful for debugging.

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

So that "/" are correct on Windows and the paths in
the .pc files are like C:/some/where and not
C:\some\where.

6 years agolibs: fix indentation
Tim-Philipp Müller [Fri, 24 Nov 2017 08:49:27 +0000 (09:49 +0100)]
libs: fix indentation

6 years agopad: gst_pad_activate_mode() always succeed if same mode
Stian Selnes [Fri, 18 Aug 2017 12:30:32 +0000 (14:30 +0200)]
pad: gst_pad_activate_mode() always succeed if same mode

Checking that the pad is in the correct mode before the parent is
checked makes the call always succeed if the mode is ok.

This fixes a race with ghostpad where gst_pad_activate_mode() could
trigger a g_critical() if the ghostpad is unparented while the
proxypad is deactivating, for instance if the ghostpad is released.
More specifically, gst_ghost_pad_internal_activate_push_default()'s
call to gst_pad_activate_mode() would fail if ghostpad doesn't have a
parent. With this patch it will return true of mode is already
correct.

6 years agogstbasetranform: replace GST_BASE_TRANSFORM with GST_BASE_TRANSFORM_CAST
Havard Graff [Fri, 31 Mar 2017 14:36:05 +0000 (16:36 +0200)]
gstbasetranform: replace GST_BASE_TRANSFORM with GST_BASE_TRANSFORM_CAST

To avoid a global type-lock on chain etc.

6 years agoghostpad: return TRUE if target pad was already set
Tim-Philipp Müller [Fri, 24 Nov 2017 08:53:41 +0000 (09:53 +0100)]
ghostpad: return TRUE if target pad was already set

The state is as it should be, so no reason to return
FALSE really, everything's good.

6 years agoghostpad: access internal pad with lock held
Tim-Philipp Müller [Fri, 24 Nov 2017 08:40:07 +0000 (09:40 +0100)]
ghostpad: access internal pad with lock held

6 years agoghostpad: fix race-condition while tearing down
Havard Graff [Thu, 30 Mar 2017 07:17:08 +0000 (09:17 +0200)]
ghostpad: fix race-condition while tearing down

An upstream query will take a ref on the internal proxypad, and can
hence end up owning the last reference to that pad, causing a crash.

6 years agocheck: Add test suite time elapsed output
Haakon Sporsheim [Sat, 23 Mar 2013 12:44:51 +0000 (13:44 +0100)]
check: Add test suite time elapsed output

6 years agoqueue: Only calculate level if we have valid levels
Edward Hervey [Thu, 23 Nov 2017 14:28:39 +0000 (15:28 +0100)]
queue: Only calculate level if we have valid levels

Doing calculations with GST_CLOCK_STIME_NONE would result in
completely bogus levels

6 years agogstvalue: allocate slightly larger than needed tables at startup
Tim-Philipp Müller [Thu, 23 Nov 2017 12:56:51 +0000 (13:56 +0100)]
gstvalue: allocate slightly larger than needed tables at startup

If we pre-allocate only *exactly* as many nodes as we need for the
core types, we are practically guaranteed a re-alloc when external
code like GstVideoTimeCode or GstEncodingProfile register their
own GstValue things. So allocate a bit more than strictly needed.

6 years agopad templates: Allow specifying GType
Mathieu Duponchelle [Mon, 6 Nov 2017 20:10:54 +0000 (21:10 +0100)]
pad templates: Allow specifying GType

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

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

6 years agowin32: update for latest promise api changes
Tim-Philipp Müller [Wed, 22 Nov 2017 14:59:39 +0000 (15:59 +0100)]
win32: update for latest promise api changes

6 years agogst: add a promise object
Matthew Waters [Mon, 3 Apr 2017 12:20:51 +0000 (22:20 +1000)]
gst: add a promise object

An object that can be waited on and asked for asynchronous values.
In much the same way as promise/futures in js/java/etc

A callback can be installed for when the promise changes state.

Original idea by
Jan Schmidt <jan@centricular.com>

With contributions from
Nirbheek Chauhan <nirbheek@centricular.com>
Mathieu Duponchelle <mathieu@centricular.com>

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

6 years agoregistrychunks: Make sure we use aligned memory
Edward Hervey [Mon, 20 Nov 2017 16:01:04 +0000 (17:01 +0100)]
registrychunks: Make sure we use aligned memory

This is in the same vein as for all other features. Some systems
might not allow unaligned read.

6 years agotools: gst-inspect: stop printing element state_change function
Tim-Philipp Müller [Fri, 17 Nov 2017 00:15:17 +0000 (00:15 +0000)]
tools: gst-inspect: stop printing element state_change function

This is really not interesting at all, not sure why we print this.

6 years agotools: gst-inspect: fix double empty line after pad templates
Tim-Philipp Müller [Fri, 17 Nov 2017 00:14:35 +0000 (00:14 +0000)]
tools: gst-inspect: fix double empty line after pad templates

6 years agogstpad: Make pad (de)activation atomic
Edward Hervey [Thu, 16 Nov 2017 09:47:46 +0000 (10:47 +0100)]
gstpad: Make pad (de)activation atomic

The following could happen previously:
* T1: calls gst_pad_set_active()
* T2: currently (de)activating it
* T1: gst_pad_set_active() returns, caller assumes that the pad has
  completed the requested (de)activation ... whereas it is not
  the case since the actual (de)activation in T2 might still be
  going on.

To ensure atomicity of pad (de)activation, we use a internal
variable (and cond) to ensure only one thread at a time goes through
the actual (de)activation block

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

6 years agogstpad: Make calls to GstPadActivateFunction MT-safe
Edward Hervey [Thu, 16 Nov 2017 07:26:12 +0000 (08:26 +0100)]
gstpad: Make calls to GstPadActivateFunction MT-safe

checking whether we already were in the target GstPadMode was being
done too early and there was the risk that we *would* end up
(de)activating a pad more than once.

Instead, re-do the check for pad mode when entering the final pad
(de)activation block.

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

6 years agoparamspec: Move condition check inside the g_return
Nicolas Dufresne [Fri, 10 Nov 2017 17:07:28 +0000 (12:07 -0500)]
paramspec: Move condition check inside the g_return

It's mostly a debug check and crash avoidance, it's better to
keep all the condition inside the macro.

6 years agoparamspec: Add missing since for _spec_array()
Nicolas Dufresne [Fri, 10 Nov 2017 17:03:00 +0000 (12:03 -0500)]
paramspec: Add missing since for _spec_array()

6 years agoconcat: Handle single-pad use-cases
Edward Hervey [Fri, 10 Nov 2017 13:10:31 +0000 (14:10 +0100)]
concat: Handle single-pad use-cases

When EOS reaches concat, it will switch to the next candidate as its
activate pad.

The problem arises when there is only one sinkpad, the "active" pad
becomes NULL. This results in concat becoming unusable after it receives
a *single* EOS on its single sinkpad.

If we detect there is a single sinkpad and there is no current active pad:
* If we are waiting (from selected sink event/buffer), become the current
  active pad.
* If there is a seek request, send it upstream. We don't switch the
  active_sinkpad property at that point in time, since the seek could
  fail. If the seek succeeds, the following SEGMENT (or STREAM_START)
  will cause the pad_wait() to elect that pad as the new active one.
* Flush events get forwarded

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

6 years agoconcat: Make QoS forward MT-safe
Edward Hervey [Thu, 9 Nov 2017 16:38:19 +0000 (17:38 +0100)]
concat: Make QoS forward MT-safe

In the same way it's done for other event forwarding.

6 years agolatency tracer: add timestamp to tracer records
Guillaume Desmottes [Thu, 13 Apr 2017 14:28:54 +0000 (16:28 +0200)]
latency tracer: add timestamp to tracer records

Include the timestamp of the recorded log as in the 'stats' tracer.
This can be useful, for example, to plot a graph showing the latency
over time.

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

6 years agotypefindhelper: Fix overflow some more
Edward Hervey [Sat, 4 Nov 2017 10:45:54 +0000 (11:45 +0100)]
typefindhelper: Fix overflow some more

Nothing guaranteed that off+size wouldn't exceed a 2**64 value.

Instead we reverse the operation and use a subtraction.

6 years agotypefindhelper: Fix signed integer overflow
Edward Hervey [Sat, 4 Nov 2017 09:34:10 +0000 (10:34 +0100)]
typefindhelper: Fix signed integer overflow

Make sure the whole calculation is done with 64bit unsigned values

(To be ready for people want to typefind exabyte files).

7 years agoelement: add gst_element_foreach_*pad()
Tim-Philipp Müller [Tue, 1 Aug 2017 10:06:32 +0000 (11:06 +0100)]
element: add gst_element_foreach_*pad()

Add convenience API that iterates over all pads, sink pads or
source pads and makes sure that the foreach function is called
exactly once for each pad.

This is a KISS implementation. It doesn't use GstIterator and
doesn't try to do clever things like resync if pads are added
or removed while the function is executing. We can still do that
in future if we think it's needed, but in practice it will
likely make absolutely no difference whatsoever, since these
things will have to be handled properly elsewhere by the element
anyway if they're important.

After all, it's always possible that a pad is added or removed
just after the iterator finishes iterating, but before the
function returns.

This is also a replacement for gst_aggregator_iterate_sink_pads().

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

7 years agogstleaks.c: always log leaks listing
Mathieu Duponchelle [Fri, 27 Oct 2017 12:58:28 +0000 (14:58 +0200)]
gstleaks.c: always log leaks listing

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

7 years agonet: Add new file to the meson.build
Sebastian Dröge [Wed, 1 Nov 2017 10:27:31 +0000 (12:27 +0200)]
net: Add new file to the meson.build

7 years agoexamples/netclock-replay: Fix build
Sebastian Dröge [Wed, 1 Nov 2017 09:31:52 +0000 (11:31 +0200)]
examples/netclock-replay: Fix build

7 years agonetutils: Add util for setting socket DSCP
Robert Rosengren [Mon, 30 Oct 2017 09:49:06 +0000 (10:49 +0100)]
netutils: Add util for setting socket DSCP

Util function for setting QoS DSCP added, to remove duplicated code in
netclientclock and nettimeprovider. Fix build error if missing IP_TOS.

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

7 years agogstvalue: Cast GST_MAKE_FOURCC arguments
Edward Hervey [Tue, 31 Oct 2017 10:39:23 +0000 (11:39 +0100)]
gstvalue: Cast GST_MAKE_FOURCC arguments

To make it explicit that we are dealing with uint32 targets

Avoids erroneous  runtime error: left shift of negative value -1

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

7 years agolatency-tracer: Exclude synchronization time
Nicolas Dufresne [Wed, 11 Oct 2017 15:08:12 +0000 (11:08 -0400)]
latency-tracer: Exclude synchronization time

The goal of this tracer is to measure the processing latency between a
src and a sink. In push mode, the time was read after the chain function
have returned. As the amount of time we wait to get synched is reverse
to the amount of latency the source introduced, the result was quite
surprising.

This patch moves the latency calculation in the pre-push hook. When
there is no processing in a a pipeline (e.g. fakesrc ! fakesink), the
latency will now be 0 as it's supposed to. For pull mode, the code was
already correct. When GstBaseSink operate in pull mode, the processing
time is done durring the pull, so pull-post is the right hook. The
synchronization will happen after the pull has ended. Note that
GstBaseSink rarely operate in pull mode.

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

7 years agoevent: Don't allow invalid SELECT_STREAMS event creation
Edward Hervey [Fri, 27 Oct 2017 07:53:06 +0000 (09:53 +0200)]
event: Don't allow invalid SELECT_STREAMS event creation

Asking to select no streams makes no sense and can create various
issues.

If one doesn't one any stream it should deactivate (or not use) the
element in question.

7 years agogst: Fix build with option parsing disabled
Edward Hervey [Wed, 25 Oct 2017 15:10:15 +0000 (17:10 +0200)]
gst: Fix build with option parsing disabled

7 years agosegment: update the tests
Stefan Sauer [Fri, 20 Oct 2017 15:28:11 +0000 (17:28 +0200)]
segment: update the tests

Boy scout rule. Make is a little less painful to debug the tests by using
fail_unless_equals_{uint64,int64,float} where appropriate. Ideally the large
tests would be splitted to avoid guessing data dependencies.

7 years agosegment: clarify the segment docs for the duration
Stefan Sauer [Fri, 20 Oct 2017 14:15:01 +0000 (16:15 +0200)]
segment: clarify the segment docs for the duration

7 years agoRevert "segment: also intialize the duration"
Stefan Sauer [Fri, 20 Oct 2017 14:11:44 +0000 (16:11 +0200)]
Revert "segment: also intialize the duration"

This reverts commit f1baaae17557fa75a9bcd940b994597714be2f74.

7 years agosegment: also intialize the duration
Stefan Sauer [Fri, 20 Oct 2017 12:30:42 +0000 (14:30 +0200)]
segment: also intialize the duration

If start and stop are set, calculate the duration and set it too.

7 years agogst-inspect: print more details for typefind and tracer features
Stefan Sauer [Fri, 20 Oct 2017 11:02:35 +0000 (13:02 +0200)]
gst-inspect: print more details for typefind and tracer features

Print full details for typefind features. Print some of the available features
for tracers and add some todos for the ones we'd like to see.

7 years agogst-inspect: reduce casting back and forth
Stefan Sauer [Fri, 20 Oct 2017 09:16:46 +0000 (11:16 +0200)]
gst-inspect: reduce casting back and forth

Refactor the print_element_info() to take a GstPluginFeature. Reduces the need
to cast to and from GstElementFactory.

7 years agogst-inspect: simplify the code for printing feature info
Stefan Sauer [Fri, 20 Oct 2017 09:08:14 +0000 (11:08 +0200)]
gst-inspect: simplify the code for printing feature info

Rename print_element_features() to print_feature_info() and move the code that
handles the ElementFactory there. This simplifies the calling code and improves
readability.

Also don't leak the features for other factories.

7 years agonetclientclock: Add possibility to set QoS DSCP value
Robert Rosengren [Fri, 2 Jun 2017 14:27:29 +0000 (16:27 +0200)]
netclientclock: Add possibility to set QoS DSCP value

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

7 years agonettimeprovider: Add possibility to set QoS DSCP value
Robert Rosengren [Thu, 1 Jun 2017 13:48:16 +0000 (15:48 +0200)]
nettimeprovider: Add possibility to set QoS DSCP value

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

7 years agoseqnum: Never return a seqnum of 0, reset GST_SEQNUM_INVALID
Jan Schmidt [Tue, 17 Oct 2017 15:31:12 +0000 (02:31 +1100)]
seqnum: Never return a seqnum of 0, reset GST_SEQNUM_INVALID

Various plugins use the value of '0' as an invalid seqnum value
(qtdemux for matching duplicated seek events, for example). Make
that behaviour explicit, create a GST_SEQNUM_INVALID value,
and ensure gst_util_seqnum_next never returns it.

7 years agoqueuearray: Fix for possible crashes due to null pointer dereferencing
Ashish Kumar [Mon, 16 Oct 2017 10:36:37 +0000 (16:06 +0530)]
queuearray: Fix for possible crashes due to null pointer dereferencing

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

7 years agocollectpads: mention the query function in the docs as well
Stefan Sauer [Sun, 15 Oct 2017 13:59:11 +0000 (15:59 +0200)]
collectpads: mention the query function in the docs as well

7 years agogstbuffer: fix meta removal in gst_buffer_foreach_meta
Mathieu Duponchelle [Fri, 6 Oct 2017 19:59:03 +0000 (21:59 +0200)]
gstbuffer: fix meta removal in gst_buffer_foreach_meta

When updating the linked list, prev->next = next is correct
if prev is actually updated after being set to the head
of the list at the start.

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

7 years agoflowcombiner: Fix version for ref and unref functions
fengalin [Tue, 10 Oct 2017 13:53:38 +0000 (15:53 +0200)]
flowcombiner: Fix version for ref and unref functions

The functions were introduced in version 1.12.1, GstFlowCombiner was
introduced in 1.4.

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

7 years agobasesink: use new gst_buffer_list_calculate_size() utility function
Tim-Philipp Müller [Thu, 5 Oct 2017 12:35:14 +0000 (13:35 +0100)]
basesink: use new gst_buffer_list_calculate_size() utility function

7 years agodevice-provider: gst_device_provider_unhide_provider() always fails
Ashish Kumar [Thu, 5 Oct 2017 04:54:24 +0000 (10:24 +0530)]
device-provider: gst_device_provider_unhide_provider() always fails

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

7 years agomeson: remove vs_module_defs
Havard Graff [Wed, 4 Oct 2017 12:16:46 +0000 (14:16 +0200)]
meson: remove vs_module_defs

The GST_EXPORT should handle it.

7 years agoUse proper GtkDoc notation for NULL/FALSE/TRUE
Reynaldo H. Verdejo Pinochet [Tue, 3 Oct 2017 20:54:25 +0000 (13:54 -0700)]
Use proper GtkDoc notation for NULL/FALSE/TRUE

7 years agobin: iterate_sorted: Ensure sources are always returned last
Edward Hervey [Mon, 2 Oct 2017 15:59:17 +0000 (17:59 +0200)]
bin: iterate_sorted: Ensure sources are always returned last

For linked elements, the resulting gst_bin_iterate_sorted() will
properly return elements from sink to sources.

If we have some elements that are not linked, we *still* want to
ensure that we return:
* In priority any sinks
* Last of all any sources
* And in between any element which is neither source nor sink

For this to work, when looking for the next candidate element,
not only check the degree order, but if there are two candidates
with the same degree order, prefer the non-source one.

Amongst other things, this fixes the case where we activating a
bin containing unlinked sources and other elements. Without this
we could end up activating sources (which might start adding pads
to be linked) before other (to which those new source element pads
might be linked) are not activated

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

7 years agotee-test: Test a real use case
Nicolas Dufresne [Mon, 2 Oct 2017 18:11:19 +0000 (14:11 -0400)]
tee-test: Test a real use case

The real use case is when downstream didn't set a pool or
allocation params, in which case we expect the tee to not
create a pool or param from thin air. Dowstream setting
an pool with size=0 was in fact testing a downstream element
bug. The fact we handle that is accidental.

7 years agotee: don't create a pool if none is needed
Stefan Sauer [Mon, 2 Oct 2017 14:26:33 +0000 (16:26 +0200)]
tee: don't create a pool if none is needed

If the aggregated size is 0 and we create a pool, the pool would provide
buffers with no memory assigned. Handle that case and skip the pool.
This was the behaviour before cf803ea9f4e3fde92c1da86ecc47444035f7c0a7.

Add a test for this scenario.

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

7 years agotee: Re-enabled alloc query + allow-not-linked test
Nicolas Dufresne [Mon, 2 Oct 2017 17:35:52 +0000 (13:35 -0400)]
tee: Re-enabled alloc query + allow-not-linked test

In the unit test refactoring, the unlinked pad required to test
the different behaviour induced by "allow-not-linked" property
was removed.

  Commit e364d7944ecbab86dea73c0ee3e639e766938d36

Move all the code for this test in the proper function, and re-add
the missing unlinked pad. This makes the test useful again.

7 years agotee: split the allocation query test
Stefan Sauer [Mon, 2 Oct 2017 14:25:00 +0000 (16:25 +0200)]
tee: split the allocation query test

Split the large allocation_query test into seperate tests. Add a setup helper
to reduce code duplication. Fix the original test that used fail_unless instead
of ck_assert_int_eq and had it accidentially working.

7 years agostructure: add a todo comment
Stefan Sauer [Mon, 2 Oct 2017 14:22:00 +0000 (16:22 +0200)]
structure: add a todo comment

Printing NULL is confusing when the type is e.g. a GArray that is not empty.

7 years agoquery: doc consistency
Stefan Sauer [Mon, 2 Oct 2017 11:14:21 +0000 (13:14 +0200)]
query: doc consistency

Mention that it is the 'buffer size', like we do elsewhere.

7 years agowin32: update exports file
Edward Hervey [Thu, 28 Sep 2017 08:17:53 +0000 (10:17 +0200)]
win32: update exports file

7 years agogst: Modify behaviour of gst_get_main_executable_path
Mathieu Duponchelle [Wed, 27 Sep 2017 18:29:06 +0000 (20:29 +0200)]
gst: Modify behaviour of gst_get_main_executable_path

To actually return the path of the executable, not its
directory.

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

7 years agogst: API: gst_get_main_executable_path()
Mathieu Duponchelle [Tue, 26 Sep 2017 19:51:53 +0000 (21:51 +0200)]
gst: API: gst_get_main_executable_path()

This is useful for plugins that need to inspect the
folder of the main executable in order to determine the
set of features they will expose, for example:

https://github.com/centricular/gstreamer-vst3

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

7 years agogst: Do not try to determine executable path on iOS.
Mathieu Duponchelle [Wed, 27 Sep 2017 11:07:25 +0000 (13:07 +0200)]
gst: Do not try to determine executable path on iOS.

The method used relies on "libproc.h", which is only available
on OSX.

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

7 years agogst: Fix typo in windows function name.
Mathieu Duponchelle [Wed, 27 Sep 2017 11:01:13 +0000 (13:01 +0200)]
gst: Fix typo in windows function name.

GetModuleFilename -> GetModuleFileName

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

7 years agowin32: Update export file
Edward Hervey [Wed, 27 Sep 2017 08:06:12 +0000 (10:06 +0200)]
win32: Update export file

7 years agoplugin dependencies: fix 6cddce7663cb4b6ee061950d20365f42cb755851
Mathieu Duponchelle [Tue, 26 Sep 2017 13:15:27 +0000 (15:15 +0200)]
plugin dependencies: fix 6cddce7663cb4b6ee061950d20365f42cb755851

There were a few errors:

* The plugin scanner now accepts executable path as an argument.
  In case it is NULL, argc == 2

* We find the executable path in init_pre instead of gst_init,
  allowing this to work when gst is initialized through the
  option group (eg gst-inspect)

* There was a semi-colon missing in the __APPLE__ #ifdef

7 years agoplugin: API: GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE
Mathieu Duponchelle [Mon, 25 Sep 2017 18:35:59 +0000 (20:35 +0200)]
plugin: API: GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE

When a plugin declares a dependency using this flag, all the
relative paths are considered to be relative to the path of
the main executable.

We try to determine the path of the executable portably,
with implementations provided for Linux, Windows and Mac.

If retrieval of the path fails, we will not detect changes.

In order for the main executable path to be the same when
scanning a plugin in a child process, a new variable is
exposed in gst_private.h, _gst_executable_path

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

7 years agogit-update: Also build $EXTRA_MODULES
Vivia Nikolaidou [Thu, 21 Sep 2017 11:13:47 +0000 (14:13 +0300)]
git-update: Also build $EXTRA_MODULES

Doing a git pull but not autogen.sh / make is not consistent behaviour.

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

7 years agogst-inspect: Print GstValueArray properties nicely
Mathieu Duponchelle [Tue, 19 Sep 2017 21:58:26 +0000 (23:58 +0200)]
gst-inspect: Print GstValueArray properties nicely

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

7 years agoMultiqueue: don't allow dropping SEGMENT_DONE events
Mathieu Duponchelle [Sat, 1 Apr 2017 05:15:22 +0000 (07:15 +0200)]
Multiqueue: don't allow dropping SEGMENT_DONE events

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

7 years agoinfo: GstStackTraceFlags were added in 1.12
Sebastian Dröge [Sun, 17 Sep 2017 15:55:19 +0000 (18:55 +0300)]
info: GstStackTraceFlags were added in 1.12

7 years agoplugins: use new gst_buffer_list_calculate_size()
Tim-Philipp Müller [Thu, 31 Aug 2017 12:05:57 +0000 (13:05 +0100)]
plugins: use new gst_buffer_list_calculate_size()

7 years agobufferlist: add gst_buffer_list_calculate_size()
Tim-Philipp Müller [Thu, 31 Aug 2017 11:54:55 +0000 (12:54 +0100)]
bufferlist: add gst_buffer_list_calculate_size()

Returns size in bytes.

7 years agobufferlist: add gst_buffer_list_get_writable()
Tim-Philipp Müller [Wed, 30 Aug 2017 12:50:33 +0000 (13:50 +0100)]
bufferlist: add gst_buffer_list_get_writable()

Ensures buffer is writable. Useful if we want to change
metadata on it such as timestamps.

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

7 years agogstconfig.h.in: initial e2k arch support
Michael Shigorin [Tue, 12 Sep 2017 15:30:00 +0000 (18:30 +0300)]
gstconfig.h.in: initial e2k arch support

This makes gstreamer buildable on Elbrus 2000.

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

7 years agoinfo: GstDebugColorFlags are flags, not an enum
Sebastian Dröge [Sat, 9 Sep 2017 13:14:05 +0000 (16:14 +0300)]
info: GstDebugColorFlags are flags, not an enum

Annotate as such.

7 years agoidentity: Add a drop-allocation property
Nicolas Dufresne [Wed, 6 Sep 2017 14:01:58 +0000 (10:01 -0400)]
identity: Add a drop-allocation property

When enabled, this property will make the allocation query fail. This is
the same as one could have done using a tee before the tee started
implementing the allocation query.

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

7 years agotee: Allocate one more buffer when multi-plexing
Nicolas Dufresne [Tue, 5 Sep 2017 19:57:51 +0000 (15:57 -0400)]
tee: Allocate one more buffer when multi-plexing

This extra buffer ensure that the downstream threads are not starved
when multiplexing a stream.

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

7 years agotee: Add test for the allocation query
Nicolas Dufresne [Tue, 5 Sep 2017 19:45:33 +0000 (15:45 -0400)]
tee: Add test for the allocation query

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

7 years agotee: Implement allocation query aggregation
Nicolas Dufresne [Tue, 8 Aug 2017 21:39:43 +0000 (17:39 -0400)]
tee: Implement allocation query aggregation

This will aggregate allocation params, pool and will keep all
meta that has no parameters.

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

7 years agotee: Deprecate alloc-pad property
Nicolas Dufresne [Tue, 8 Aug 2017 21:35:19 +0000 (17:35 -0400)]
tee: Deprecate alloc-pad property

It has no effect, not implemented, and would lead to bad rendering.

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

7 years agopad: add test to check handled and drop probes
Miguel París [Mon, 4 Sep 2017 10:20:43 +0000 (12:20 +0200)]
pad: add test to check handled and drop probes

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

7 years agopad: Don't call remaining probes after they return DROPPED|HANDLED
Edward Hervey [Mon, 4 Sep 2017 12:33:29 +0000 (14:33 +0200)]
pad: Don't call remaining probes after they return DROPPED|HANDLED

If multiple probes are set on a pad and one probe returns either
GST_PAD_PROBE_HANDLED or GST_PAD_PROBE_DROPPED we need to stop
calling the remaining probes.

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