Commit graph

1711 commits

Author SHA1 Message Date
Arnaud Vrac
9bc26c5f25 input-selector: Fix missing pad activation notification
A new active pad might not be notified in some cases, which results
in the current track number not being set in playbin.

The active-pad notification is only sent in the chain and sink_event
functions, and only when the buffer or event that triggered the active
pad selection is from the newly activated pad. So in the other case
the notification will never be sent.

https://bugzilla.gnome.org/show_bug.cgi?id=704691
2013-07-23 08:59:07 +02:00
Sebastian Dröge
eaf333248a inputselector: Don't push new stream-start events on stream change unless they all have group ids
https://bugzilla.gnome.org/show_bug.cgi?id=704408
2013-07-22 15:30:10 +02:00
Sebastian Dröge
d9f3d3560e typefind: Use new group-id in stream-start event 2013-07-22 15:30:10 +02:00
Sebastian Dröge
0dc232e114 multiqueue: only block serialized query when it's safe
We must be certain that we don't cause a deadlock when blocking the serialized
queries. One such deadlock can happen when we are buffering and downstream is
blocked in preroll and a serialized query arrives. Downstream will not unblock
(and allow our query to execute) until we complete buffering and buffering will
not complete until we can answer the query..

https://bugzilla.gnome.org/show_bug.cgi?id=702840
2013-07-16 11:36:50 +02:00
Sebastian Dröge
717ad20912 inputselector: Deactivate and remove pad without the inputselector lock
Otherwise we might get deadlocks caused by lock order inversion:
During the chain function the stream lock is first locked and then the
inputselector lock. During pad release we first locked the inputselector
lock and then deactivating the pad would lock the stream lock.

There's no reason why the inputselector lock should be required while
deactivating and removing the pad, it's only needed before.

https://bugzilla.gnome.org/show_bug.cgi?id=704002
2013-07-12 10:08:26 +02:00
Sebastian Dröge
c8cfaff1ff inputselector: Keep previous active sinkpad around until we're done with it
Otherwise we'll send a new segment event downstream for each buffer.
2013-07-10 14:30:31 +02:00
Olivier Crête
bbb26f8756 funnel: Re-push all sticky events when buffers come from a different pad
Don't special case segment/caps, just push all sticky events when they are
received on the currently active pad or when the active pad changes.
2013-07-01 20:45:42 -04:00
Olivier Crête
176e16aa5f funnel: Use default pad function for upstream event/queries
The default functions in 1.x already do the right thing
2013-07-01 20:21:10 -04:00
Wim Taymans
2f78e96299 queue2: only block serialized query when it's safe
We must be certain that we don't cause a deadlock when blocking the serialized
queries. One such deadlock can happen when we are buffering and downstream is
blocked in preroll and a serialized query arrives. Downstream will not unblock
(and allow our query to execute) until we complete buffering and buffering will
not complete until we can answer the query..

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=702840
2013-06-24 23:29:16 +02:00
Sebastian Dröge
2f8e572887 queue: Don't hold the queue mutex while doing serialized queries downstream
https://bugzilla.gnome.org/show_bug.cgi?id=702520
2013-06-19 10:53:21 +02:00
Brendan Long
f0a3d8bb09 input-selector: send notify::active signal for input-selector pads.
https://bugzilla.gnome.org/show_bug.cgi?id=701319
2013-06-06 17:16:47 +02:00
Brendan Long
76f0e18f92 input-selector: return FALSE for "active" property if selector is NULL
https://bugzilla.gnome.org/show_bug.cgi?id=701323
2013-06-04 17:46:25 +02:00
Sebastian Dröge
ab6a1085ee (multi)queue: Don't access query items during flushing 2013-05-27 16:38:18 +02:00
Sebastian Dröge
e472d9d261 multiqueue: Don't do serialized queries when we're flushing
Just immediately fail the query, otherwise we would wait forever
for the query to be answered.
2013-05-27 16:22:00 +02:00
Sebastian Dröge
a03435dfba queue2: First set query result, then signal GCond 2013-05-27 16:08:39 +02:00
Sebastian Dröge
6f042f13ae queue: Fix handling of serialized queries
During FLUSH_START the query needs to be unblocked already, otherwise
it can lead to deadlocks if the FLUSH_START is the result of something
done from the streaming thread of the srcpad (the queue will never be
emptied!).
2013-05-27 15:59:07 +02:00
Sebastian Dröge
cdc429f296 queue2: Unblock any waiting serialize queries on FLUSH_START
Fixes some deadlocks during flushing.

And store queue items differently to not accidentially read
already unreffed queries when flushing. Queries are owned by
upstream and not us.
2013-05-27 15:41:14 +02:00
Sebastian Dröge
b6fac17502 queue/queue2/multiqueue: When flushing, make sure to not lose any sticky events
https://bugzilla.gnome.org/show_bug.cgi?id=688824
2013-05-27 13:01:43 +02:00
Nicolas Dufresne
5bbc6f1c8c valve: Don't read sticky flag from unrefed event 2013-05-25 22:03:53 -04:00
Tim-Philipp Müller
789b68e506 tee: fix property description for now-unused "alloc-pad" property
Should probably proxy ALLOCATION queries on that though, if set.
But what else? CAPS and ACCEPT_CAPS too?
2013-05-24 23:28:04 +01:00
Sebastian Dröge
e692993e79 queue2: Add support for serialized queries if using a memory queue 2013-05-24 19:22:22 +02:00
Sebastian Dröge
46270f8925 queue: Set the last serialized query result to FALSE when flushing 2013-05-24 18:47:24 +02:00
Sebastian Dröge
a79d3a0220 multiqueue: Initialize all GstMultiQueueItem fields in both code paths 2013-05-24 18:42:55 +02:00
Sebastian Dröge
1c6341e6a4 multiqueue: Don't access the query after signalling the waiting thread
It might've free'd the query already.
2013-05-24 18:38:40 +02:00
Sebastian Dröge
3b44a44a01 multiqueue: Make sure to always signal any possible pending serialized queries
And don't unref them when flushing the queue, they're owned by the caller!

https://bugzilla.gnome.org/show_bug.cgi?id=700342
2013-05-24 18:30:44 +02:00
Sebastian Dröge
1d1946a321 typefind: Handle the force-caps property more similar to all typefinding code flow
This makes sure that events happen in order and simplifies the code a bit.
2013-05-15 13:22:04 +02:00
Sebastian Dröge
8e1f70473b queue: Store sticky events on the srcpad if we're dropping them because of leaking 2013-05-09 12:50:20 +02:00
Sebastian Dröge
f93c52684a outputselector: Always forward sticky events to all pads 2013-05-09 12:27:12 +02:00
Sebastian Dröge
1d40478014 inputselector: Forward all sticky events, including stream-start 2013-05-09 12:15:48 +02:00
Sebastian Dröge
172817e332 capsfilter: Add more debug output and forward caps events immediately too 2013-05-09 09:51:13 +02:00
Sebastian Dröge
e4cbae46cc capsfilter: Fix typo in last commit 2013-05-09 09:38:35 +02:00
Sebastian Dröge
98f6b75cd3 capsfilter: Send all events that should happen after CAPS after the CAPS event 2013-05-09 09:32:49 +02:00
Nicolas Dufresne
c86f42bc88 capsfilter: Send caps before segment
In the case the source has no caps, caps must be sent before segment. This
fixes few unit tests that where failing due to the new misordering warning.

https://bugzilla.gnome.org/show_bug.cgi?id=699968
2013-05-09 09:14:49 +02:00
Nicolas Dufresne
ba354f6b03 typefind: Send stream-start before anything else
To do so, send stream-start when the streaming thread goes up for the first
time.

https://bugzilla.gnome.org/show_bug.cgi?id=699767
2013-05-07 09:17:13 +02:00
Sebastian Dröge
c24bcbf511 typefind: Always leave TYPEFIND mode when we're stopping typefinding 2013-04-29 13:24:56 +02:00
Sebastian Dröge
11f6e08aae typefind: Simplify code
This is only called when in TYPEFIND mode.
2013-04-29 13:24:56 +02:00
Sebastian Dröge
7982f682dd typefind: Push pending events independent of the existence of a downstream chain function and peer
Downstream might create a peer only as result of the events in theory.
2013-04-29 13:24:56 +02:00
Sebastian Dröge
32e05f8a1e typefind: Only push CAPS event once if we get one from upstream
https://bugzilla.gnome.org/show_bug.cgi?id=692784
2013-04-29 13:24:56 +02:00
Sebastian Dröge
2a34f767d4 typefind: Stop typefinding if we get a CAPS event from upstream 2013-04-29 13:24:56 +02:00
Sebastian Dröge
0fda329bbb typefind: Improve handling of GAP events
There's still room for improvement though.
2013-04-29 13:24:56 +02:00
Sebastian Dröge
fc4105c1f9 typefind: Forward events that should happen before the caps event directly
There's no point in storing them and sending them later, and doing so would
later require to distinguish between events that should come before caps and
after.

https://bugzilla.gnome.org/show_bug.cgi?id=692784
2013-04-29 13:24:56 +02:00
Sebastian Dröge
cf0566f9ca typefind: Only push pending buffers and events if we have caps 2013-04-29 13:24:56 +02:00
Sebastian Dröge
922815996f typefind: Remove code that would cause caps to be sent twice
Whenever we set typefind->caps we will also send a caps event downstream.
2013-04-29 13:24:56 +02:00
Tim-Philipp Müller
e1c6a56596 typefind: fix caps leak when used in connection with uridecodebin and playbin
Don't leak forced sink caps.
2013-04-27 00:05:45 +01:00
Sebastian Dröge
a257cb6f5b inputselector: Try to not push read-only buffers
We should only increase the refcount before pushing if we're
really going to use the buffer afterwards.
2013-04-25 16:39:52 +02:00
Sebastian Dröge
18a7a1d062 gst: Add better support for static plugins
API: GST_PLUGIN_STATIC_DECLARE()
API: GST_PLUGIN_STATIC_REGISTER()

Based on a patch by Håvard Graff <havard.graff@tandberg.com>.

This now allows GST_PLUGIN_DEFINE() to create a static plugin if
GST_PLUGIN_BUILD_STATIC is defined. The resulting plugin can be
statically linked or dynamically linked during compilation but
can't be dynamically loaded during runtime.

Also adds GST_PLUGIN_STATIC_DECLARE() and GST_PLUGIN_STATIC_REGISTER(),
which allows to register a static linked plugin easily.
It is still required to manually register every single statically linked
plugin from inside the application as this can't be automated in a portable
way.

A new configure parameter --enable-static-plugins was added that allows
to build all plugins we build here as static plugins.

Fixes bug #667305.
2013-04-15 15:52:18 +02:00
Wim Taymans
fa371dad6d multiqueue: ignore empty not-linked queues
We need to ignore the not-linked queues in the underrun and overrun callbacks
because they are expected to be empty.
2013-04-05 10:15:37 +02:00
Wim Taymans
bda406c42f multiqueue: start pushing again on RECONFIGURE
When we got NOT_LINKED before and we receive a RECONFIGURE event, start pushing
again on the source pad.

See https://bugzilla.gnome.org/show_bug.cgi?id=676304
2013-04-04 19:16:23 +02:00
Wim Taymans
9ac409df48 queue2: start pushing again on RECONFIGURE
When we got NOT_LINKED before and we receive a RECONFIGURE event, start pushing
again on the source pad.

See https://bugzilla.gnome.org/show_bug.cgi?id=676304
2013-04-04 19:07:29 +02:00
Wim Taymans
c955ddc712 queue: start pushing again on RECONFIGURE
When we got NOT_LINKED before and we receive a RECONFIGURE event, start pushing
again on the source pad.

See https://bugzilla.gnome.org/show_bug.cgi?id=676304
2013-04-04 19:06:35 +02:00