platform/upstream/gstreamer.git
8 years agoscripts: make git-update.sh build with all cores available
Danilo Cesar Lemes de Paula [Thu, 19 May 2016 14:27:36 +0000 (11:27 -0300)]
scripts: make git-update.sh build with all cores available

The git-update.sh now builds with all cores available. In case of
failure it defaults to 1

The developer can still override this by setting -j to something else
in MAKEFLAGS, as stated by 299605dfe2f97fca330161ff01a392e1a85fe422.

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

8 years ago(mini)object: add MAY_BE_LEAKED flag
Guillaume Desmottes [Wed, 4 May 2016 11:53:56 +0000 (13:53 +0200)]
(mini)object: add MAY_BE_LEAKED flag

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

8 years agobin: emit deep-element-{added,removed} for children of newly-added/removed bin
Tim-Philipp Müller [Sun, 15 May 2016 13:15:51 +0000 (14:15 +0100)]
bin: emit deep-element-{added,removed} for children of newly-added/removed bin

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

8 years agobin: add "deep-element-added" and "deep-element-removed" signals
Tim-Philipp Müller [Sat, 14 May 2016 09:55:53 +0000 (10:55 +0100)]
bin: add "deep-element-added" and "deep-element-removed" signals

This means applications and bin sub-classes can easily track when
a new child element is added to the pipeline sub-hierarchy or
removed.

Currently doesn't signal deep added/removed for elements inside
a bin if a bin is added/removed.

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

8 years agopad: Improve IDLE probe docs
Sebastian Dröge [Sun, 15 May 2016 12:02:49 +0000 (15:02 +0300)]
pad: Improve IDLE probe docs

Make it explicit that the pad is only blocked while the callback is running,
and the pad will be unblocked again once the callback returned.

If BLOCK and IDLE behaviour is needed, both need to be used.

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

8 years agodocs: Update for git master
Sebastian Dröge [Sun, 15 May 2016 10:29:55 +0000 (13:29 +0300)]
docs: Update for git master

8 years agoqueue: Only unblock upstream waiting for the query once downstream is finished
Sebastian Dröge [Fri, 11 Mar 2016 14:04:52 +0000 (16:04 +0200)]
queue: Only unblock upstream waiting for the query once downstream is finished

... when flushing and deactivating pads. Otherwise downstream might have a
query that was already unreffed by upstream, causing crashes or other
interesting effects.

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

8 years agobasesink/src: Post an error message if ::start() fails
Sebastian Dröge [Sat, 14 May 2016 14:31:51 +0000 (17:31 +0300)]
basesink/src: Post an error message if ::start() fails

The subclass should do that already, but just in case do it ourselves too as a
fallback. Without this, e.g. playbin will just wait forever if this fails
because it is triggered as part of an ASYNC state change.

8 years agobin: Fix EOS forwarding on PLAYING->PLAYING
Jan Schmidt [Sat, 14 May 2016 13:36:43 +0000 (23:36 +1000)]
bin: Fix EOS forwarding on PLAYING->PLAYING

When doing a transition from PLAYING to PLAYING, we will fail
to forward an EOS message on the bus, and noone else will ever
send it because there'll be no actual state changed message.

Allow EOS through directly in that case.

8 years agopad: Don't drop LATENCY queries with default implementation
Edward Hervey [Fri, 13 May 2016 07:43:14 +0000 (09:43 +0200)]
pad: Don't drop LATENCY queries with default implementation

If there is only one pad in the internal pads, when folding for
LATENCY queries it will just drop the response if it's not live.

This is maybe not the proper fix, but it will just accept the first
peer responses, and if there are any other pads, it will only take
them into account if the response is live.

This *should* properly handle the aggregation/folding behaviour of
multiple live peer responses, while at the same time handling the
simple one-pad-only-and-forward use-case

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

8 years agoUpdate the examples in the gst-launch-1.0 manpage
Jan Schmidt [Wed, 6 Apr 2016 14:46:20 +0000 (00:46 +1000)]
Update the examples in the gst-launch-1.0 manpage

Replace elements that don't exist any more with ones
that do, and insert elements like mpegaudioparse where
they are needed.

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

8 years agodebug: Instantiate GType when dumping debug categories.
Jan Schmidt [Fri, 1 Apr 2016 14:05:39 +0000 (01:05 +1100)]
debug: Instantiate GType when dumping debug categories.

A lot of debug categories are declared in element class_init
functions, which don't get run until the element is first created
(not just registered in the plugin load function). This means
that --gst-debug-help doesn't print out a lot of categories.

Creating an instance of each element from the element factory
makes them visible, at some extra cost - 2-3 times longer, which can
be a full second or two of extra waiting. Yikes!

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

8 years agotypefind: Only push a CAPS event downstream if the sinkpad is not in PULL mode
Sebastian Dröge [Wed, 11 May 2016 12:06:39 +0000 (15:06 +0300)]
typefind: Only push a CAPS event downstream if the sinkpad is not in PULL mode

The other signal handlers of the type-found signal might have reactivated
typefind in PULL mode already, pushing a CAPS event at that point would cause
deadlocks and is in general unexpected by elements that are in PULL mode.

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

8 years agodebugutils: fix warning on enum properties printing
Wonchul Lee [Wed, 11 May 2016 03:16:09 +0000 (12:16 +0900)]
debugutils: fix warning on enum properties printing

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

8 years agopad: Fix pad state when deactivating from one mode and then trying to activate anothe...
Sebastian Dröge [Tue, 10 May 2016 12:01:42 +0000 (15:01 +0300)]
pad: Fix pad state when deactivating from one mode and then trying to activate another and failing

When activating a pad in PULL mode, it might already be in PUSH mode. We now
first try to deactivate it from PUSH mode and then try to activate it in PULL
mode. If the activation fails, we would set the pad to flushing and set it
back to its old mode. However the old mode is wrong, the pad is not in PUSH
mode anymore but in NONE mode.

This fixes e.g. typefind in decodebin reactivating PUSH/PULL mode if upstream
actually fails to go into PULL mode after first PUSHING data to typefind.

8 years agolibcompat.h: strsignal() should be not be decleared const
Anthony G. Basile [Sun, 13 Mar 2016 15:05:29 +0000 (11:05 -0400)]
libcompat.h: strsignal() should be not be decleared const

POSIX standards requires strsignal() to return a pointer to a char,
not a const pointer to a char. [1]  On uClibc, and possibly other
libc's, that do not HAVE_DECL_STRSIGNAL, libcompat.h declares
const char *strsignal (int sig) which causes a type error.

[1] man 3 strsignal

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

8 years agoflowcombiner: add debug category
Tim-Philipp Müller [Thu, 5 May 2016 17:50:05 +0000 (18:50 +0100)]
flowcombiner: add debug category

Not that it logs much.

8 years agoflowcombiner: fix docs for gst_flow_combiner_reset()
Tim-Philipp Müller [Thu, 5 May 2016 17:02:21 +0000 (18:02 +0100)]
flowcombiner: fix docs for gst_flow_combiner_reset()

8 years agoparse-launch: fix factory leak in test
Guillaume Desmottes [Wed, 4 May 2016 08:04:30 +0000 (10:04 +0200)]
parse-launch: fix factory leak in test

We get 2 references one from gst_element_factory_find() and the other
from gst_plugin_feature_load().

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

8 years agominiobject: fix ref count leaks in tests
Guillaume Desmottes [Wed, 4 May 2016 11:46:46 +0000 (13:46 +0200)]
miniobject: fix ref count leaks in tests

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

8 years agoutils: fix element leak in find_common_root()
Guillaume Desmottes [Wed, 4 May 2016 07:53:32 +0000 (09:53 +0200)]
utils: fix element leak in find_common_root()

The root element was not unreffed when iterating over ancestors.

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

8 years agoinspect: fix feature leak
Guillaume Desmottes [Mon, 2 May 2016 15:35:29 +0000 (17:35 +0200)]
inspect: fix feature leak

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

8 years agouri: unref instead of using _gst_uri_free() directly
Guillaume Desmottes [Tue, 3 May 2016 09:49:03 +0000 (11:49 +0200)]
uri: unref instead of using _gst_uri_free() directly

This confuses gst_tracing as we shortcut the mini object reference
system.

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

8 years agopipeline: fix bus leak in seek test
Guillaume Desmottes [Mon, 2 May 2016 07:32:47 +0000 (09:32 +0200)]
pipeline: fix bus leak in seek test

gst_bus_add_signal_watch_full() keeps a ref on the bus which should
be released using gst_bus_remove_signal_watch().

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

8 years agostreamiddemux: fix list and event leaks in test
Guillaume Desmottes [Mon, 2 May 2016 07:29:31 +0000 (09:29 +0200)]
streamiddemux: fix list and event leaks in test

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

8 years agoselector: fix pad leaks in tests
Guillaume Desmottes [Mon, 2 May 2016 06:43:04 +0000 (08:43 +0200)]
selector: fix pad leaks in tests

setup_input_pad() creates a new pad so we should unref it once we're
done.

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

8 years agofilesrc: fix buffer leaks in tests
Guillaume Desmottes [Mon, 2 May 2016 06:33:42 +0000 (08:33 +0200)]
filesrc: fix buffer leaks in tests

gst_check_setup_sink_pad() internally uses gst_check_chain_func() so we
should call gst_check_drop_buffers() when tearing down tests to free the
buffers which have been exchanged through the pipeline.

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

8 years agofakesink: fix pipeline leak in test
Guillaume Desmottes [Mon, 2 May 2016 06:29:00 +0000 (08:29 +0200)]
fakesink: fix pipeline leak in test

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

8 years agoelementfactory: fix factory leak in test
Guillaume Desmottes [Mon, 2 May 2016 05:35:45 +0000 (07:35 +0200)]
elementfactory: fix factory leak in test

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

8 years agodeviceproviderfactory: fix factory leak
Guillaume Desmottes [Mon, 2 May 2016 14:00:42 +0000 (16:00 +0200)]
deviceproviderfactory: fix factory leak

The code path when early returning was leaking the extra reference on
the factory.

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

8 years agoquery: fix compiler warning
Tim-Philipp Müller [Sun, 10 Apr 2016 10:42:18 +0000 (11:42 +0100)]
query: fix compiler warning

C4146: unary minus operator applied to unsigned type, result still unsigned

8 years agobin: fix leaks in unit tests
Guillaume Desmottes [Thu, 28 Apr 2016 11:59:51 +0000 (14:59 +0300)]
bin: fix leaks in unit tests

The test rely on bus being flushed when setting the bin to the NULL state which
is not the case. This apply only when setting the pipeline state to
NULL.

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

8 years agopad: fix buffer leaks in tests
Guillaume Desmottes [Thu, 28 Apr 2016 11:56:18 +0000 (14:56 +0300)]
pad: fix buffer leaks in tests

The buffer received through the pad have to be unreffed using
gst_check_drop_buffers().

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

8 years agoFix some nonsensical g-i annotations
Tim-Philipp Müller [Sat, 30 Apr 2016 13:15:08 +0000 (14:15 +0100)]
Fix some nonsensical g-i annotations

8 years agomultiqueue: Ignore time when determining whether sparse stream limits have been reached
Matej Knopp [Fri, 29 Apr 2016 12:55:02 +0000 (14:55 +0200)]
multiqueue: Ignore time when determining whether sparse stream limits have been reached

Basically, sq->max_size.visible is never increased for sparse streams in
overruncb when empty queue has been found;

If the queue is sparse it just skip the entire logic determining whether
max_size.visible should be increased, deadlocking the demuxer.

What should be done instead is that when determining if limits have been
reached, to ignore time for sparse streams, as the buffer may be far in the
future.

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

8 years agoelement: Add gst_element_call_async()
Sebastian Dröge [Sun, 28 Feb 2016 10:06:40 +0000 (12:06 +0200)]
element: Add gst_element_call_async()

This calls a function from another thread, asynchronously. This is to be
used for cases when a state change has to be performed from a streaming
thread, directly via gst_element_set_state() or indirectly e.g. via SEEK
events.

Calling those functions directly from the streaming thread will cause
deadlocks in many situations, as they might involve waiting for the
streaming thread to shut down from this very streaming thread.

This is mostly a convenience function around a GThreadPool and is for example
used by GstBin to continue asynchronous state changes.

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

8 years agomanual: Fix buffer memory leak in appsrc example
Sebastian Dröge [Wed, 27 Apr 2016 06:21:31 +0000 (09:21 +0300)]
manual: Fix buffer memory leak in appsrc example

g_signal_emit_by_name() is not like gst_app_src_push_buffer() due to reference
counting limitations of signals, it does *not* take ownership of the buffer.

8 years agocaps: add cleanup priv function
Guillaume Desmottes [Tue, 26 Apr 2016 13:02:14 +0000 (16:02 +0300)]
caps: add cleanup priv function

Those are allocated in _priv_gst_caps_initialize() so it makes
sense to have a symetric cleanup functions called by gst_deinit().

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

8 years agocapsfeature: add cleanup priv function
Guillaume Desmottes [Tue, 26 Apr 2016 13:02:14 +0000 (16:02 +0300)]
capsfeature: add cleanup priv function

Those are allocated in _priv_gst_caps_features_initialize() so it makes
sense to have a symetric cleanup functions called by gst_deinit().

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

8 years agotestclock: add clock-type property
Alex Ashley [Thu, 21 Apr 2016 13:45:39 +0000 (14:45 +0100)]
testclock: add clock-type property

To allow the GstTestClock to be used as a GstSystemClock, it is
useful to implement the clock-type property that GstSystemClock
provides. This allows GstTestClock to be used as the system clock
with code that expects a GstSystemClock.

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

8 years agodatetime: Sanity check year, month and day when parsing ISO-8601 strings
Sebastian Dröge [Thu, 21 Apr 2016 10:49:32 +0000 (13:49 +0300)]
datetime: Sanity check year, month and day when parsing ISO-8601 strings

Passing years > 9999, months > 12 or days > 31 to gst_date_time_new() will
cause an assertion and generally does not make much sense. Instead consider it
as a parsing error like hours > 24 and return NULL.

8 years agobaseparse: Remember if we interpolated DTS from PTS and refresh it whenever we update...
Sebastian Dröge [Wed, 20 Apr 2016 08:46:19 +0000 (11:46 +0300)]
baseparse: Remember if we interpolated DTS from PTS and refresh it whenever we update the PTS

Otherwise PTS and DTS will come out of sync if upstream continues to provide
PTS and not DTS, and we have to skip some data from the stream or PTS are not
exactly increasing with the duration of each packet.

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

8 years agotypefindhelper: Fix gobject-introspection warning about invalid transfer annotation
Sebastian Dröge [Wed, 20 Apr 2016 08:45:28 +0000 (11:45 +0300)]
typefindhelper: Fix gobject-introspection warning about invalid transfer annotation

gsttypefindhelper.c:485: Warning: GstBase: invalid "transfer" annotation for gsize: only valid for array, struct, union, boxed, object and interface types

8 years agoallocator: add cleanup method
Guillaume Desmottes [Mon, 18 Apr 2016 10:05:40 +0000 (13:05 +0300)]
allocator: add cleanup method

Make tracking memory leaks easier.

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

8 years agotests: plugin: improve debug message
Francisco Velazquez [Fri, 25 Mar 2016 14:55:18 +0000 (15:55 +0100)]
tests: plugin: improve debug message

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

8 years agomultiqueue: Recheck buffering status after changing low threshold
Carlos Rafael Giani [Thu, 14 Apr 2016 09:54:32 +0000 (11:54 +0200)]
multiqueue: Recheck buffering status after changing low threshold

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

8 years agomultiqueue: Recalculate fill level after changing high-threshold
Carlos Rafael Giani [Wed, 13 Apr 2016 22:09:44 +0000 (00:09 +0200)]
multiqueue: Recalculate fill level after changing high-threshold

This ensures the following special case is handled properly:

1. Queue is empty
2. Data is pushed, fill level is below the current high-threshold
3. high-threshold is set to a level that is below the current fill level

Since mq->percent wasn't being recalculated in step #3 properly, this
caused the multiqueue to switch off its buffering state when new data is
pushed in, and never post a 100% buffering message. The application will
have received a <100% buffering message from step #2, but will never see
100%.

Fix this by recalculating the current fill level percentage during
high-threshold property changes in the same manner as it is done when
use-buffering is modified.

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

8 years agobaseparse: When initializing DTS from PTS, remember that we did so
Sebastian Dröge [Fri, 15 Apr 2016 10:50:30 +0000 (13:50 +0300)]
baseparse: When initializing DTS from PTS, remember that we did so

If we don't store the value in prev_dts, we would over and over again
initialize the DTS from the last known upstream PTS. If upstream only provides
PTS every now and then, then this causes DTS to be rather static.

For example in adaptive streaming scenarios this means that all buffers in a
fragment will have exactly the same DTS while the PTS is properly updated. As
our queues are now preferring to do buffer fill level calculations on DTS,
this is causing huge problems there.

See https://bugzilla.gnome.org/show_bug.cgi?id=691481#c27 where this part of
the code was introduced.

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

8 years agoAutomatic update of common submodule
Julien Isorce [Thu, 14 Apr 2016 08:58:04 +0000 (09:58 +0100)]
Automatic update of common submodule

From 6f2d209 to ac2f647

8 years agomultiqueue: catch errors and flushing case after lock
Vincent Penquerc'h [Wed, 13 Apr 2016 15:08:30 +0000 (16:08 +0100)]
multiqueue: catch errors and flushing case after lock

This ensures we can not get into an indefinite wait on the
following cond var wait.

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

8 years agotools: gst-launch: fix up caps printing in verbose mode
Tim-Philipp Müller [Wed, 13 Apr 2016 15:40:43 +0000 (16:40 +0100)]
tools: gst-launch: fix up caps printing in verbose mode

Add missing 'else' and print caps and taglists without the
annoying duplicate string escaping, making both nicer to read.

Fixes string leak and coverity CID 1358492.

8 years agorusage: properly free the queue memory
Guillaume Desmottes [Wed, 13 Apr 2016 09:38:05 +0000 (12:38 +0300)]
rusage: properly free the queue memory

The queue is allocated as part of the tracer struct so we should not
use g_queue_free() to free it.

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

8 years agometa: Warn if a meta implementation is registered without init function
Sebastian Dröge [Wed, 13 Apr 2016 07:21:15 +0000 (10:21 +0300)]
meta: Warn if a meta implementation is registered without init function

This previously caused uninitialized memory unless something else was
initializing all the fields explicitly to something.

To be on the safe side, we also allocate metas without init function to all
zeroes now as it was relatively common.

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

8 years agoRevert "basesink: Take PREROLL_LOCK in wait_event()"
Sebastian Dröge [Tue, 12 Apr 2016 12:17:36 +0000 (15:17 +0300)]
Revert "basesink: Take PREROLL_LOCK in wait_event()"

This reverts commit 828a4627db0cb6a6706b96d9be97e5e5c7d22215.

The lock was already taken elsewhere, in gst_base_sink_event().

8 years agobasesink: Take PREROLL_LOCK in wait_event()
Sebastian Dröge [Tue, 12 Apr 2016 12:11:30 +0000 (15:11 +0300)]
basesink: Take PREROLL_LOCK in wait_event()

It is calling do_sync(), which requires the STREAM_LOCK and PREROLL_LOCK to be
taken. The STREAM_LOCK is already taken in all callers, the PREROLL_LOCK not.

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

8 years agotests: add PTHREAD_CFLAGS for make check to pass on OS X
Julien Isorce [Thu, 11 Feb 2016 08:33:28 +0000 (09:33 +0100)]
tests: add PTHREAD_CFLAGS for make check to pass on OS X

Currently "make check" fails with:
"error: argument unused during compilation: '-pthread'"

PTHREAD_CFLAGS now contains -Qunused-arguments to fix that.
Explanation here: http://savannah.gnu.org/patch/?8186#comment21

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

8 years agotests: baseparse: make work with CK_FORK=no
Tim-Philipp Müller [Mon, 11 Apr 2016 09:44:22 +0000 (10:44 +0100)]
tests: baseparse: make work with CK_FORK=no

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

8 years agotests: transform1: make test work with CK_FORK=no
Tim-Philipp Müller [Mon, 11 Apr 2016 09:27:56 +0000 (10:27 +0100)]
tests: transform1: make test work with CK_FORK=no

We need to clear some global state and register a new test
basetransform subclass for each test because we do things
in class_init base on global state.

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

8 years agotests: collectpads: fix for CK_FORK=no
Tim-Philipp Müller [Sun, 10 Apr 2016 19:45:24 +0000 (20:45 +0100)]
tests: collectpads: fix for CK_FORK=no

Reset global state when done, and unref sink pads too
in teardown function to make it valgrind clean.

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

8 years agotests: streamiddemux: fix with CK_FORK=no
Tim-Philipp Müller [Sun, 10 Apr 2016 19:25:44 +0000 (20:25 +0100)]
tests: streamiddemux: fix with CK_FORK=no

Clear global state when done.

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

8 years agotests: bufferpool: fix wrong assumptions about pointers and object lifecycles
Tim-Philipp Müller [Sun, 10 Apr 2016 19:04:07 +0000 (20:04 +0100)]
tests: bufferpool: fix wrong assumptions about pointers and object lifecycles

The test assumed that if a buffer has the same pointer address as
before it is in fact the same mini object and has been re-used by
the pool. This seems to be mostly true, but not always. The buffer
might be destroyed and when a new buffer is created the allocator
might return the same memory that we just freed.

Instead attach a qdata with destroy notify function to buffer
instances we want to track to make sure the buffer actually
gets finalized rather than resurrected and put back into the pool.

8 years agodocs: pwg: remove broken references to example code
Tim-Philipp Müller [Sun, 10 Apr 2016 17:37:31 +0000 (18:37 +0100)]
docs: pwg: remove broken references to example code

We point to gst-template at the beginning that shoul be
enough.

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

8 years agotests: don't run tracerrecord in valgrind for now
Tim-Philipp Müller [Fri, 8 Apr 2016 12:26:48 +0000 (13:26 +0100)]
tests: don't run tracerrecord in valgrind for now

Because of the way we implement logging and adding/removing
log functions currently (we leak a GList on purpose) this
test leaks.

8 years agotools: gst-launch: use new async property change notification API
Tim-Philipp Müller [Sat, 5 Mar 2016 17:51:01 +0000 (17:51 +0000)]
tools: gst-launch: use new async property change notification API

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

8 years agoelement: add API to get property change notifications via messages
Tim-Philipp Müller [Sat, 5 Mar 2016 14:12:36 +0000 (14:12 +0000)]
element: add API to get property change notifications via messages

Be notified in the application thread via bus messages about
notify::* and deep-notify::* property changes, instead of
having to deal with it in a non-application thread.

API: gst_element_add_property_notify_watch()
API: gst_element_add_property_deep_notify_watch()
API: gst_element_remove_property_notify_watch()
API: gst_message_new_property_notify()
API: gst_message_parse_property_notify()
API: GST_MESSAGE_PROPERTY_NOTIFY

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

8 years agotests: Add C++ tests for the other INIT macros we have
Sebastian Dröge [Thu, 7 Apr 2016 17:29:10 +0000 (20:29 +0300)]
tests: Add C++ tests for the other INIT macros we have

8 years agotests: gstcpp: flesh out C++ test so we can add more bits
Tim-Philipp Müller [Wed, 6 Apr 2016 16:19:28 +0000 (17:19 +0100)]
tests: gstcpp: flesh out C++ test so we can add more bits

Like a check for GST_MAP_INFO_INIT.

8 years agotests: use catch-all includes for c++ gst libs include test
Tim-Philipp Müller [Wed, 6 Apr 2016 15:48:38 +0000 (16:48 +0100)]
tests: use catch-all includes for c++ gst libs include test

So we get any new header files as well as they're added.

8 years agomemory: fix C++ compiler warnings with GST_MAP_INFO_INIT
Tim-Philipp Müller [Wed, 6 Apr 2016 16:23:20 +0000 (17:23 +0100)]
memory: fix C++ compiler warnings with GST_MAP_INFO_INIT

8 years agoutils: check the correct element's state on ghosting pads
Matthew Waters [Mon, 4 Apr 2016 10:28:18 +0000 (10:28 +0000)]
utils: check the correct element's state on ghosting pads

Checking the current element's state when we're adding pads to
the parent element is checking the wrong thing.

Silences a 'attempting to add an inactive pad to a running element'
warning when adding a ghost pad to a running parent bin of the parent
bin of the element.

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

8 years agoutils: expose pad_link_maybe_ghosting
Matthew Waters [Fri, 25 Mar 2016 01:28:18 +0000 (01:28 +0000)]
utils: expose pad_link_maybe_ghosting

This is a useful function to automatically add ghost pads when linking
two elements across bin boundaries without know their exact parentage.

e.g. when using gst_parse_bin_from_description (with or without it ghosting pads),
one can simply retreive the src/sink pads from the bin to link to another pad.

Similar functionality is provided by gst_element_link_pads{_full}() however only
by pad name rather than by actual pads.

API: gst_pad_link_maybe_ghosting_full

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

8 years agodocs/design/part-states.txt: spelling fix
Reynaldo H. Verdejo Pinochet [Mon, 4 Apr 2016 06:35:46 +0000 (23:35 -0700)]
docs/design/part-states.txt: spelling fix

8 years agoGST_REFCOUNTING: Add logging of pointer address for dispose, finalize, etc messages
Mark Combellack [Fri, 15 May 2015 12:36:04 +0000 (13:36 +0100)]
GST_REFCOUNTING: Add logging of pointer address for dispose, finalize, etc messages

Updated the GST_REFCOUNTING logging so that it includes the pointer
address of the object that is being disposed or finalized.

With this change is is then possible to match up GST_REFCOUNTING log messages
for object allocation/disposal/finalization. This can help with diagnosing
"memory leaks" in applications that have not correctly disposed of all the
GStreamer objects it creates.

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

8 years agoinfo: only open log file when adding it to the log function
Luis de Bethencourt [Thu, 31 Mar 2016 10:46:03 +0000 (11:46 +0100)]
info: only open log file when adding it to the log function

This avoids the leak of opening it and then not passing it or closing it
before it goes out of scope.

8 years agoclock: Return FALSE in all paths that don't set out parameters in gst_clock_add_obser...
Sebastian Dröge [Fri, 1 Apr 2016 19:41:51 +0000 (22:41 +0300)]
clock: Return FALSE in all paths that don't set out parameters in gst_clock_add_observation_unapplied()

It returned TRUE when regression failed, while not setting any of the out
parameters. This caused uninitialized data from the stack to be used for
setting the clock calibration.

8 years agopad: rework probe's hook_marshall function
Thiago Santos [Thu, 24 Mar 2016 20:34:20 +0000 (17:34 -0300)]
pad: rework probe's hook_marshall function

PUSH and PULL mode have opposite scenarios for IDLE and BLOCK
probes.

For PUSH it will BLOCK with some data type and IDLE won't have a type.
For PULL it will BLOCK before getting some data and will be IDLE when
some data is obtained.

The check in hook_marshall was specific for PUSH mode and would cause
PULL probes to fail to be called. Adding different checks for the mode
to fix this issue.

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

8 years agotests: pad: extra tests for pad pull probes
Thiago Santos [Thu, 24 Mar 2016 20:34:40 +0000 (17:34 -0300)]
tests: pad: extra tests for pad pull probes

For BUFFER and IDLE probes

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

8 years agopad: Add test for blocking pull probe
Matej Knopp [Thu, 28 Jan 2016 15:22:17 +0000 (16:22 +0100)]
pad: Add test for blocking pull probe

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

8 years agopad: consider PROBE_TYPE_EVENT_FLUSH when using PROBE_TYPE_ALL_BOTH
Thiago Santos [Thu, 24 Mar 2016 15:13:39 +0000 (12:13 -0300)]
pad: consider PROBE_TYPE_EVENT_FLUSH when using PROBE_TYPE_ALL_BOTH

When GST_PAD_PROBE_EVENT_FLUSH is used, the probes already have
a data type and it is not needed to automatically add the default
types.

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

8 years agogstpad tests: Add a test for flush event only probes
Linus Svensson [Fri, 19 Feb 2016 15:18:12 +0000 (16:18 +0100)]
gstpad tests: Add a test for flush event only probes

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

8 years agodebugutils: fix enum/flag properties printing for elements
Tim-Philipp Müller [Sat, 26 Mar 2016 17:21:51 +0000 (17:21 +0000)]
debugutils: fix enum/flag properties printing for elements

We want to use the flag/enum nicks here, not only because they
are shorter but also because in case of element-specific enums
and flags we abuse the enum/flag name field for the description,
and we don't want that printed in the dot file.

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

8 years agoalloctrace: print size and allocator details for buffers and memories
Tim-Philipp Müller [Wed, 23 Mar 2016 10:31:46 +0000 (10:31 +0000)]
alloctrace: print size and allocator details for buffers and memories

8 years agoinfo: make it possible to remove default log handler before gst_init()
Tim-Philipp Müller [Mon, 29 Feb 2016 19:04:16 +0000 (19:04 +0000)]
info: make it possible to remove default log handler before gst_init()

Make sure it's not even added then, so that we never output
anything via the default log handler then.

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

8 years agominiobject, memory, uri: warn on unused return value of some funcs
Tim-Philipp Müller [Sat, 5 Mar 2016 14:27:35 +0000 (14:27 +0000)]
miniobject, memory, uri: warn on unused return value of some funcs

Make compiler issue a warning for common beginner mistakes such as:

  ...
  gst_buffer_make_writable (buf);
  gst_buffer_map (buf, &map, GST_MAP_WRITE);
  ...

and similar. Only do this for some functions for now.

8 years ago.gitignore new netclock-replay testing tool binary
Tim-Philipp Müller [Sat, 26 Mar 2016 11:17:02 +0000 (11:17 +0000)]
.gitignore new netclock-replay testing tool binary

8 years agoregistry: allow plugin and feature filter funcs to call registry API
Tim-Philipp Müller [Sat, 17 Oct 2015 17:01:47 +0000 (18:01 +0100)]
registry: allow plugin and feature filter funcs to call registry API

Don't keep the registry locked whilst iterating over the plugins
or features with a filter function. This would deadlock if the
callback tried to access the registry from the function. Instead,
make a copy of the feature/plugin list and then filter it without
holding the registry lock. This is still considerably faster than
the alternative which would be to use a GstIterator.

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

8 years agoconfigure: Remove unneeded parenthesis from AG_GST_CHECK_CHECKS
Sebastian Dröge [Fri, 25 Mar 2016 10:59:57 +0000 (12:59 +0200)]
configure: Remove unneeded parenthesis from AG_GST_CHECK_CHECKS

8 years agovalve: Fix unit test by sending caps before buffers
Sebastian Dröge [Fri, 25 Mar 2016 10:05:41 +0000 (12:05 +0200)]
valve: Fix unit test by sending caps before buffers

Unexpected critical/warning: gstpad.c:4400:gst_pad_push_data:<'':src> Got data flow before segment event

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

8 years agonetclock: Link the replay example to GIO
Sebastian Dröge [Fri, 25 Mar 2016 08:23:46 +0000 (10:23 +0200)]
netclock: Link the replay example to GIO

8 years agotests: Add some code to replay and analyse netclientclock
Arun Raghavan [Thu, 3 Mar 2016 16:15:54 +0000 (21:45 +0530)]
tests: Add some code to replay and analyse netclientclock

This takes readings in the form of ...

<local_1> <remote_1> <remote_2> <local_2>

... with one observation per line, and then replays it using the
netclientclock code.

The output is the statistics structure emitted by the netclientclock,
which can then be analysed and tuned once we get those readings for
potential edge-cases.

It should be possible to find some inputs with "bad" data and convert
this into a unit test for future tweaks to run against.

8 years agonetclientclock: Always dump clock observations in logs
Arun Raghavan [Thu, 3 Mar 2016 16:14:35 +0000 (21:44 +0530)]
netclientclock: Always dump clock observations in logs

This makes it possible to examine what values we get in logs, and
potentially tune our filtering/extrapolation in various scenarios.

8 years agovalve: don't send sticky events as a direct response to upstream events
Havard Graff [Wed, 16 Mar 2016 14:13:39 +0000 (15:13 +0100)]
valve: don't send sticky events as a direct response to upstream events

Also refactor the existing valve test to actually test the valve,
and not just test the EOS mechanism of a pad.

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

8 years agoparse-launch: Add flag for placing elements in a bin instead of a pipeline
Carlos Rafael Giani [Fri, 11 Mar 2016 08:23:04 +0000 (09:23 +0100)]
parse-launch: Add flag for placing elements in a bin instead of a pipeline

By default, gst_parse_launch_full() creates a GstPipeline if there's more
than one toplevel element. Add a flag to let it use a GstBin instead.

Also fix the parser to let it use this flag for GST_TYPE_ELEMENT property
values, to avoid having GstPipelines inside other GstPipelines.

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

8 years agocapsfilter: optimisation: avoid unnecessary gst_pad_has_current_caps() checks
Tim-Philipp Müller [Tue, 8 Mar 2016 19:08:16 +0000 (19:08 +0000)]
capsfilter: optimisation: avoid unnecessary gst_pad_has_current_caps() checks

No need to do this for every input buffer, since it involves
locking and iterating of the sticky events array and such.

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

8 years agogstreamer: use new gst_element_class_add_static_pad_template()
Vineeth TM [Thu, 3 Mar 2016 05:15:00 +0000 (14:15 +0900)]
gstreamer: use new gst_element_class_add_static_pad_template()

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

8 years agoqueue: Use full running time for level calculation
Edward Hervey [Wed, 2 Mar 2016 16:47:33 +0000 (17:47 +0100)]
queue: Use full running time for level calculation

Ensures we have proper time level estimation for the cases where
the incoming buffers have PTS/DTS outside of the segment start/stop
values.

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

8 years agopad: Fix race between gst_element_remove_pad and state change
Stian Selnes [Wed, 27 Jan 2016 10:46:06 +0000 (11:46 +0100)]
pad: Fix race between gst_element_remove_pad and state change

When going from READY to NULL all element pads are deactivated. If
simultaneously the pad is being removed from the element with
gst_element_remove_pad() and the pad is unparented, there is a race
where the deactivation will assert (g_critical) if the parent is lost at
the wrong time.

The proposed fix will check parent only once and retain it to avoid the
race.

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

8 years agocollectpads: Assume PTS is equal DTS if PTS is missing
Nicolas Dufresne [Thu, 3 Mar 2016 02:11:51 +0000 (21:11 -0500)]
collectpads: Assume PTS is equal DTS if PTS is missing

This is the best guess we can make if such a buffer reached the collect
pad. This is uncommon, we do expect parsers to have tried and fixed that
if possible (or needed).

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

8 years agoBack to development
Sebastian Dröge [Thu, 24 Mar 2016 11:32:41 +0000 (13:32 +0200)]
Back to development

8 years agotypefind: Remove redundant assignment
Sebastian Dröge [Thu, 24 Mar 2016 09:49:44 +0000 (11:49 +0200)]
typefind: Remove redundant assignment

CID 1357158