summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Olivier Crête [Wed, 14 Jan 2015 19:35:15 +0000 (14:35 -0500)]
aggregator: Replace event lock with pad's object lock
Reduce the number of locks simplify code, what is protects
is exposed, but the lock was not.
Also means adding an _unlocked version of gst_aggregator_pad_steal_buffer().
https://bugzilla.gnome.org/show_bug.cgi?id=742684
Olivier Crête [Sat, 10 Jan 2015 03:01:00 +0000 (22:01 -0500)]
aggregator: Protect data with the same mutex as GCond
Whenever a GCond is used, the safest paradigm is to protect
the variable which change is signalled by the GCond with the same
mutex that the GCond depends on.
https://bugzilla.gnome.org/show_bug.cgi?id=742684
Nirbheek Chauhan [Wed, 14 Jan 2015 18:17:19 +0000 (23:47 +0530)]
aggregator: Nitpick spacing/punctuation in debug logging
Olivier Crête [Sat, 10 Jan 2015 02:51:40 +0000 (21:51 -0500)]
aggregator: Remove pointless atomic
It is only modified from the streaming thread
Olivier Crête [Sat, 10 Jan 2015 02:30:36 +0000 (21:30 -0500)]
aggregator: Fix query leak
Sebastian Dröge [Fri, 9 Jan 2015 15:43:39 +0000 (16:43 +0100)]
aggregator: Print jitter from clock waiting in the debug logs
Tim-Philipp Müller [Sun, 4 Jan 2015 17:15:37 +0000 (17:15 +0000)]
aggregator: don't use iterator when setting flush pending on pads
Tim-Philipp Müller [Sun, 4 Jan 2015 16:57:05 +0000 (16:57 +0000)]
aggregator: check if pads are ready more efficiently
No need to use an iterator for this which creates a temporary
structure every time and also involves taking and releasing the
object lock many times in the course of iterating. Not to mention
all that GList handling in gst_aggregator_iterate_sinkpads().
Tim-Philipp Müller [Sun, 4 Jan 2015 12:59:19 +0000 (12:59 +0000)]
aggregator: name vfunc arguments consistently
Tim-Philipp Müller [Thu, 1 Jan 2015 15:46:00 +0000 (15:46 +0000)]
aggregator: add g-i transfer and scope annotations
Tim-Philipp Müller [Thu, 1 Jan 2015 14:10:05 +0000 (14:10 +0000)]
aggregator: register names of iterate_sinkpads functions with debug system
Tim-Philipp Müller [Thu, 1 Jan 2015 14:03:02 +0000 (14:03 +0000)]
aggregator: reduce debug messages for taking/releasing logs to TRACE level
Don't spam debug log with this stuff.
Tim-Philipp Müller [Wed, 31 Dec 2014 18:16:21 +0000 (18:16 +0000)]
aggregator: move property member into private structure
Our locking (or lack thereof) while accessing this also
looks generally quite dodgy.
Tim-Philipp Müller [Wed, 31 Dec 2014 14:50:58 +0000 (14:50 +0000)]
aggregator: remove empty dispose function
Tim-Philipp Müller [Tue, 30 Dec 2014 23:58:34 +0000 (23:58 +0000)]
aggregator: give private functions namespace prefix
Especially the GST_DEBUG_FUNCPTR ones.
Tim-Philipp Müller [Wed, 31 Dec 2014 12:35:06 +0000 (12:35 +0000)]
aggregator: fix up some docs comments in header
Tim-Philipp Müller [Tue, 30 Dec 2014 23:44:46 +0000 (23:44 +0000)]
aggregator: remove now-unused system clock member
Tim-Philipp Müller [Tue, 30 Dec 2014 19:22:01 +0000 (19:22 +0000)]
aggregator: make GstAggregatorPadForeachFunc take an GstAggregatorPad
Tim-Philipp Müller [Tue, 30 Dec 2014 17:50:17 +0000 (17:50 +0000)]
aggregator: bring start/stop vfunc semantics in line with other baseclasses
Sub-class should not have to chain up to GstAggregator's start/stop
vfuncs, same as in GstBaseSrc, GstBaseSink, GstBaseTransform etc.
Tim-Philipp Müller [Sun, 28 Dec 2014 18:26:49 +0000 (18:26 +0000)]
aggregator: remove pointless GST_DEBUG_FUNCPTR
Not useful for GObject vfuncs.
Tim-Philipp Müller [Sun, 28 Dec 2014 18:24:21 +0000 (18:24 +0000)]
aggregator: remove duplicate pad parent_class variable
G_DEFINE_TYPE already provides one, just need to use it.
Tim-Philipp Müller [Sun, 28 Dec 2014 18:22:57 +0000 (18:22 +0000)]
aggregator: add _CAST() variants for cast macros
Tim-Philipp Müller [Sun, 28 Dec 2014 01:13:33 +0000 (01:13 +0000)]
aggregator: make padding larger
Esp. the class structures, can't have enough
spare space for virtual functions.
Nirbheek Chauhan [Sat, 27 Dec 2014 10:45:41 +0000 (16:15 +0530)]
aggregator: Log to the pad instead of the element
More correct way of doing the same thing as before
Sebastian Dröge [Sat, 27 Dec 2014 08:49:43 +0000 (09:49 +0100)]
aggregator: Make sure that the minimum latencies are never GST_CLOCK_TIME_NONE
Sebastian Dröge [Sat, 27 Dec 2014 08:42:57 +0000 (09:42 +0100)]
aggregator: Wait for the minimum latency, not the maximum
The minimum latency is the latency we have to wait at least
to guarantee that all upstreams have produced data. The maximum
latency has no meaning like that and shouldn't be used for waiting.
Nirbheek Chauhan [Fri, 26 Dec 2014 22:51:36 +0000 (04:21 +0530)]
aggregator: Clamp the min latency at the max if it's greater
Nirbheek Chauhan [Fri, 26 Dec 2014 22:51:26 +0000 (04:21 +0530)]
aggregator: Print the sinkpad name while logging latency queries
Very useful while debugging.
Nirbheek Chauhan [Fri, 26 Dec 2014 22:49:52 +0000 (04:19 +0530)]
aggregator: Take the stream lock when iterating sink pads
When iterating sink pads to collect some data, we should take the stream lock so
we don't get stale data and possibly deadlock because of that. This fixes
a definitive deadlock in _wait_and_check() that manifests with high max
latencies in a live pipeline, and fixes other possible race conditions.
Sebastian Dröge [Tue, 23 Dec 2014 10:45:05 +0000 (11:45 +0100)]
aggregator: Don't leak flush-start events
Sebastian Dröge [Tue, 23 Dec 2014 09:24:27 +0000 (10:24 +0100)]
aggregator: Also change the default latency to 0, not just the minimum
Sebastian Dröge [Tue, 23 Dec 2014 08:52:20 +0000 (09:52 +0100)]
aggregator: Fix docs and default value of the latency property
Sebastian Dröge [Mon, 22 Dec 2014 21:19:52 +0000 (22:19 +0100)]
aggregator: Also include the subclass latency in the result of the latency query
Sebastian Dröge [Mon, 22 Dec 2014 14:26:37 +0000 (15:26 +0100)]
aggregator: Post a latency message if the value of the latency property changes
Sebastian Dröge [Mon, 22 Dec 2014 14:03:59 +0000 (15:03 +0100)]
aggregator: Wake up the src thread after handling a latency query
Due to changed latencies or changed live-ness we might have to
adjust if we wait on a deadline at all and how long.
Sebastian Dröge [Mon, 22 Dec 2014 14:00:36 +0000 (15:00 +0100)]
aggregator: Don't count the number of times we need to wake up but instead check all conditions for waiting again
This simplifies the code and also makes sure that we don't forget to check all
conditions for waiting.
Also fix a potential deadlock caused by not checking if we're actually still
running before starting to wait.
Sebastian Dröge [Wed, 17 Dec 2014 18:51:32 +0000 (19:51 +0100)]
aggregator: Add function to allow subclasses to set their own latency
For audiomixer this is one blocksize, for videoaggregator this should
be the duration of one output frame.
Sebastian Dröge [Wed, 17 Dec 2014 16:54:09 +0000 (17:54 +0100)]
aggregator: Add a timeout parameter to ::aggregate()
When this is TRUE, we really have to produce output. This happens
in live mixing mode when we have to output something for the current
time, no matter if we have enough input or not.
Tim-Philipp Müller [Tue, 16 Dec 2014 19:49:35 +0000 (19:49 +0000)]
tests: fix aggregator unit test after property renaming
Sebastian Dröge [Tue, 16 Dec 2014 16:33:01 +0000 (17:33 +0100)]
aggregator: Some minor cleanup
Matthew Waters [Fri, 5 Dec 2014 07:19:54 +0000 (18:19 +1100)]
aggregator: make the src pad task drive the pipeline for live pipelines
This removes the uses of GAsyncQueue and replaces it with explicit
GMutex, GCond and wakeup count which is used for the non-live case.
For live pipelines, the aggregator waits on the clock until either
data arrives on all sink pads or the expected output buffer time
arrives plus the timeout/latency at which time, the subclass
produces a buffer.
https://bugzilla.gnome.org/show_bug.cgi?id=741146
Sebastian Rasmussen [Sun, 14 Dec 2014 00:29:26 +0000 (01:29 +0100)]
tests/aggregator: Use correct type when setting property
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741495
Sebastian Dröge [Wed, 19 Nov 2014 16:17:06 +0000 (17:17 +0100)]
aggregator: Unblock events/queries immediately if the pad is flushing
https://bugzilla.gnome.org/show_bug.cgi?id=740376
Sebastian Dröge [Wed, 19 Nov 2014 16:15:02 +0000 (17:15 +0100)]
aggregator: Drop serialized events/queries if the pad is flushing
https://bugzilla.gnome.org/show_bug.cgi?id=740376
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
Sebastian Dröge [Wed, 19 Nov 2014 16:03:33 +0000 (17:03 +0100)]
aggregator: Fix typo in debug output
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
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
Matthew Waters [Tue, 7 Oct 2014 05:57:27 +0000 (16:57 +1100)]
tests/aggregator: add timeout handling test for the timeout parameter
Matthew Waters [Mon, 6 Oct 2014 10:46:24 +0000 (21:46 +1100)]
aggregator: add latency query handling
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.
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
Mathieu Duponchelle [Tue, 5 Aug 2014 13:36:30 +0000 (15:36 +0200)]
aggregator: Set seqnum only when segments are received.
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.
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
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.
Thibault Saunier [Tue, 8 Jul 2014 14:16:55 +0000 (16:16 +0200)]
aggregator: Store segment when seeked in READY for later use
Sebastian Dröge [Mon, 6 Oct 2014 07:11:23 +0000 (10:11 +0300)]
aggregator: Unref the taglist in GstAggregator::stop()
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
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
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
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.
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
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.
Thibault Saunier [Tue, 8 Jul 2014 14:48:08 +0000 (16:48 +0200)]
aggregator: Handle event seqnum
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.
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
Thiago Santos [Sat, 28 Jun 2014 14:20:43 +0000 (11:20 -0300)]
tests: aggregator: fix various leaks in the tests
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.
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
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
Matthew Waters [Thu, 26 Jun 2014 00:53:16 +0000 (10:53 +1000)]
aggregator: plug a memory leak of the srccaps
Thibault Saunier [Sat, 21 Jun 2014 14:51:01 +0000 (16:51 +0200)]
libs:base: Properly declare APIs as UNSTABLE
Thibault Saunier [Sat, 21 Jun 2014 11:45:13 +0000 (13:45 +0200)]
aggregator: Fix requested pad name
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