platform/upstream/gstreamer.git
6 years agoaggregator: Block serialized events/queries until the pad has consumed all buffers
Sebastian Dröge [Wed, 19 Nov 2014 16:03:41 +0000 (17:03 +0100)]
aggregator: Block serialized events/queries until the pad has consumed all buffers

Otherwise the caps of the pad might change while the subclass still works with
a buffer of the old caps, assuming the the current pad caps apply to that
buffer. Which then leads to crashes and other nice effects.

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

6 years agoaggregator: Fix typo in debug output
Sebastian Dröge [Wed, 19 Nov 2014 16:03:33 +0000 (17:03 +0100)]
aggregator: Fix typo in debug output

6 years agoaggregator: add _get_latency() for subclass usage
Matthew Waters [Mon, 17 Nov 2014 03:00:10 +0000 (14:00 +1100)]
aggregator: add _get_latency() for subclass usage

API: gst_aggregator_get_latency

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

6 years agoaudiomixer: critical error for blocksize, timeout min/max values
Vineeth T M [Mon, 20 Oct 2014 12:55:08 +0000 (18:25 +0530)]
audiomixer: critical error for blocksize, timeout min/max values

Audiomixer blocksize, cant be 0, hence adjusting the minimum value to 1
timeout value of aggregator is defined with MAX of MAXINT64,
but it cannot cross G_MAXLONG * GST_SECOND - 1
Hence changed the max value of the same

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

6 years agotests/aggregator: add timeout handling test for the timeout parameter
Matthew Waters [Tue, 7 Oct 2014 05:57:27 +0000 (16:57 +1100)]
tests/aggregator: add timeout handling test for the timeout parameter

6 years agoaggregator: add latency query handling
Matthew Waters [Mon, 6 Oct 2014 10:46:24 +0000 (21:46 +1100)]
aggregator: add latency query handling

6 years agoaggregator: add a timeout property determining buffer wait time
Matthew Waters [Mon, 6 Oct 2014 07:23:03 +0000 (18:23 +1100)]
aggregator: add a timeout property determining buffer wait time

Determines the amount of time that a pad will wait for a buffer before
being marked unresponsive.

Network sources may fail to produce buffers for an extended period of time,
currently causing the pipeline to stall possibly indefinitely, waiting for
these buffers to appear.

Subclasses should render unresponsive pads with either silence (audio), the
last (video) frame or what makes the most sense in the given context.

6 years agoaggregator: Replace GMainContext with GAsyncQueue (v2)
Jan Alexander Steffens (heftig) [Wed, 17 Sep 2014 14:48:02 +0000 (16:48 +0200)]
aggregator: Replace GMainContext with GAsyncQueue (v2)

The previous implementation kept accumulating GSources,
slowing down the iteration and leaking memory.

Instead of trying to fix the main context flushing, replace
it with a GAsyncQueue which is simple to flush and has
less overhead.

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

6 years agoaggregator: Set seqnum only when segments are received.
Mathieu Duponchelle [Tue, 5 Aug 2014 13:36:30 +0000 (15:36 +0200)]
aggregator: Set seqnum only when segments are received.

6 years agoaggregator: Add a streaming lock so to secure flush start action
Thibault Saunier [Sat, 2 Aug 2014 16:25:01 +0000 (18:25 +0200)]
aggregator: Add a streaming lock so to secure flush start action

Without a lock that is taken in FLUSH_START we had a rare race where we
end up aggregating a buffer that was before the whole FLUSH_START/STOP
dance. That could lead to very wrong behaviour in subclasses.

6 years agoaggregator: Query seeking when a seek failed to see if it was expected
Thibault Saunier [Fri, 18 Jul 2014 11:58:55 +0000 (13:58 +0200)]
aggregator: Query seeking when a seek failed to see if it was expected

And do not worry if seeking failed on a stream that is not seekable

6 years agoaggregator: set future seqnum before propagating the seek event.
Mathieu Duponchelle [Thu, 17 Jul 2014 23:41:26 +0000 (01:41 +0200)]
aggregator: set future seqnum before propagating the seek event.

So the seqnum is properly set for the following events.

6 years agoaggregator: Store segment when seeked in READY for later use
Thibault Saunier [Tue, 8 Jul 2014 14:16:55 +0000 (16:16 +0200)]
aggregator: Store segment when seeked in READY for later use

6 years agoaggregator: Unref the taglist in GstAggregator::stop()
Sebastian Dröge [Mon, 6 Oct 2014 07:11:23 +0000 (10:11 +0300)]
aggregator: Unref the taglist in GstAggregator::stop()

6 years agoaggregator: Take lock to ensure set_caps is not called concurently
Thibault Saunier [Fri, 3 Oct 2014 10:34:15 +0000 (12:34 +0200)]
aggregator: Take lock to ensure set_caps is not called concurently

Avoiding to be in an inconsistent state where we do not have
actual negotiate caps set as srccaps and leading to point where we
try to unref ->srccaps when they have already been set to NULL.

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

6 years agoaggregator: fix up doc comment for set_src_caps
Matthew Waters [Mon, 11 Aug 2014 13:38:40 +0000 (23:38 +1000)]
aggregator: fix up doc comment for set_src_caps

It does not occur 'later' anymore

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

6 years agovideoaggregator: push the caps event as soon as we receive it
Matthew Waters [Thu, 7 Aug 2014 09:54:36 +0000 (19:54 +1000)]
videoaggregator: push the caps event as soon as we receive it

Along with the required mandatory dependent events.

Some elements need to perform an allocation query inside
::negotiated_caps().  Without the caps event being sent prior,
downstream elements will be unable to answer and will return
an error.

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

6 years agoaggregator: Reset flow_return *after* stopping the srcpad task.
Mathieu Duponchelle [Wed, 16 Jul 2014 14:57:35 +0000 (16:57 +0200)]
aggregator: Reset flow_return *after* stopping the srcpad task.

Otherwise it might be set in an already running aggregate function.

6 years agoaggregator: Flush sinkpads when stopping
Thibault Saunier [Thu, 10 Jul 2014 11:18:21 +0000 (13:18 +0200)]
aggregator: Flush sinkpads when stopping

All values are meaningless in that case, so we should make sure that
we clean everything

6 years agoaggregator: Do not forget to reset the flow return when stoping
Thibault Saunier [Thu, 10 Jul 2014 11:15:55 +0000 (13:15 +0200)]
aggregator: Do not forget to reset the flow return when stoping

Setting it to FLUSHING when the element is not started, and to OK
when it starts.

6 years agoaggregator: Handle event seqnum
Thibault Saunier [Tue, 8 Jul 2014 14:48:08 +0000 (16:48 +0200)]
aggregator: Handle event seqnum

6 years agoaggregator: fix locking
Tim-Philipp Müller [Sun, 6 Jul 2014 15:17:06 +0000 (16:17 +0100)]
aggregator: fix locking

We would unlock a mutex we never locked on SEGMENT
events.

6 years agoaggregator: Avoid destroying sources we do not own
Thibault Saunier [Mon, 30 Jun 2014 10:22:07 +0000 (12:22 +0200)]
aggregator: Avoid destroying sources we do not own

+ Unref the maincontext in a new dispose function
+ Make sure to remove all sources on dispose

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

6 years agotests: aggregator: fix various leaks in the tests
Thiago Santos [Sat, 28 Jun 2014 14:20:43 +0000 (11:20 -0300)]
tests: aggregator: fix various leaks in the tests

6 years agoaggregator: always store or unref the buffer on the _chain function
Thiago Santos [Sat, 28 Jun 2014 12:34:05 +0000 (09:34 -0300)]
aggregator: always store or unref the buffer on the _chain function

Otherwise it leaks, and it is very common to go to flushing when the
pipeline is stopping, leaking a buffer.

6 years agoaggregator: always unref the buffer on _finish function
Thiago Santos [Sat, 28 Jun 2014 12:32:32 +0000 (09:32 -0300)]
aggregator: always unref the buffer on _finish function

Otherwise the user doesn't know if it was unref'd or not

6 years agoaggregator: add dispose/finalize functions
Thiago Santos [Sat, 28 Jun 2014 12:31:55 +0000 (09:31 -0300)]
aggregator: add dispose/finalize functions

Add functions to be able to cleanup the mutex/cond and pending buffers
on the aggregator and on its pad

6 years agoaggregator: plug a memory leak of the srccaps
Matthew Waters [Thu, 26 Jun 2014 00:53:16 +0000 (10:53 +1000)]
aggregator: plug a memory leak of the srccaps

6 years agolibs:base: Properly declare APIs as UNSTABLE
Thibault Saunier [Sat, 21 Jun 2014 14:51:01 +0000 (16:51 +0200)]
libs:base: Properly declare APIs as UNSTABLE

6 years agoaggregator: Fix requested pad name
Thibault Saunier [Sat, 21 Jun 2014 11:45:13 +0000 (13:45 +0200)]
aggregator: Fix requested pad name

6 years agoaggregator: Add new GstAggregator base class
Thibault Saunier [Thu, 22 May 2014 17:44:37 +0000 (19:44 +0200)]
aggregator: Add new GstAggregator base class

This base class has been added to a newly created libgstbadbase library

Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>

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