Commit graph

1844 commits

Author SHA1 Message Date
Sebastian Dröge
a91b51c9b7 typefind: Keep still meaningfull pending events on FLUSH_STOP
Only EOS and segment should be deleted in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=709868
2014-05-31 17:35:52 +02:00
Thiago Santos
01c9ae2630 multiqueue: post buffering message when queues flush
The buffering status goes back to 0, so inform the application about it

https://bugzilla.gnome.org/show_bug.cgi?id=726423
2014-05-29 16:51:41 -03:00
Tim-Philipp Müller
f28a4cc671 elements: don't depend on libgio just for g_io_error_from_errno()
https://bugzilla.gnome.org/show_bug.cgi?id=729949
2014-05-13 20:06:48 +01:00
Tim-Philipp Müller
fa94322349 sparsefile: keep it private as helper API for downloadbuffer
There's no expectation that any other element or applications
might want to use this helper API any time soon, so keep it
private for the time being. There were open questions regarding
portability and binding-friendliness too.

This also removes the gio dependency of -base again.

https://bugzilla.gnome.org/show_bug.cgi?id=729951
https://bugzilla.gnome.org/show_bug.cgi?id=729949
2014-05-13 20:05:55 +01:00
Nicolas Dufresne
6ff2b59ff5 downloadbuffer: Fix 32bit build
format '%lli' expects argument of type 'long long int', but argument 8 has type 'gsize'
2014-05-08 14:48:00 -04:00
Wim Taymans
3d69028797 downloadbuffer: small cleanups 2014-05-08 16:55:15 +02:00
Wim Taymans
451d0e3b0d downloadbuffer: update docs 2014-05-08 16:54:57 +02:00
Wim Taymans
45855e2795 Add new downloadbuffer element
See https://bugzilla.gnome.org/show_bug.cgi?id=680183
2014-05-08 15:53:45 +02:00
Wim Taymans
35a1822d7a pads: update docs for request pads
We would like to encourage the use of gst_element_request_pad()
2014-05-08 09:13:04 +02:00
Руслан Ижбулатов
45c0831835 filesrc: g_memmove() is deprecated
https://bugzilla.gnome.org/show_bug.cgi?id=712811
2014-05-04 14:49:36 +01:00
Thiago Santos
0a3bc6be1f multiqueue: avoid signaling overrun on the first segment
When the first segment has position != 0 and position > max-size-time
it will immediatelly cause the multiqueue to signal overrun.

This can happen easily with adaptive streams when switching bitrates
and starting a new group. The segment for this new group will have
a position that is much greater than 0 and will lead to this issue.
This is particularly harmful when the adaptive stream uses mpegts
that doesn't emit no-more-pads and it might happen that only one
of the stream pads was added when the multiqueue overruns and gets
the group ready for exposing. So the user will only get audio or
video.

The solution is to fallback to the sink segment while the source pad
has no segment.

https://bugzilla.gnome.org/show_bug.cgi?id=729124
2014-04-28 17:08:57 -03:00
Srimanta Panda
e3e1b0eac7 funnel: Check if the last pad was set
If no data is coming but only EOS is sent from all of the sinkpad, it is not
forwarding the EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=727945
2014-04-28 02:03:28 -04:00
Tim-Philipp Müller
6eb6d9ec38 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 21:21:51 +01:00
Srimanta Panda
094fdfee7e funnel: Handle end of stream event on sink pad
Handle end of stream events on sink pad. Check all the sink pad
has received eos before forwarding to source pad.

Fixes : https://bugzilla.gnome.org/show_bug.cgi?id=727945
2014-04-17 19:14:34 -04:00
Vincent Penquerc'h
f3dd7937a2 queue2: fix event/preroll deadlock differently
The qlock is released between popping a buffer from the queue
and pushing it. When this buffer causes the sink to wait in
preroll, this lets a query see that the queue is empty, and
push the query then wait for it to be serviced. However, this
will not be done till after peroll, and this will thus block.
If upstream was waiting on buffering to reach 100% before
switching to PLAYING, a deadlock would ensue.

This had been fixed recently by failing queries when the
queue2 was buffering, but this happens to break some other
case (playbin on a local http server and matroska), while
this patch works for both.

See https://bugzilla.gnome.org/show_bug.cgi?id=728345
2014-04-16 15:17:04 +01:00
Jan Schmidt
a89789366f input-selector: Hold pad object lock when changing tags
Avoid spurious crashes when tags are retrieved just as
new ones arrive.
2014-04-11 22:39:36 +10:00
Sebastian Dröge
eba6f7d972 multiqueue: Wake up the queues if limits are changing in a way that would unblock the queue 2014-04-09 15:57:35 +02:00
Tim-Philipp Müller
d5c2439f08 queue2: use g_strerror() instead of strerror()
Need UTF-8 encoding.
2014-04-07 17:49:14 +01:00
Vincent Penquerc'h
fe7925373d queue2: warn if we can't remove our temporary file
It's not fatal though, so do not error out.

Coverity 1037121
2014-04-07 17:35:15 +01:00
Tim-Philipp Müller
9c821554fc filesrc: no need for a translated message for impossible error cases
The message is too technical anyway, the default message works
just fine here as well.
2014-04-07 15:38:17 +01:00
Vincent Penquerc'h
1a08e22845 filesrc: catch failure to seek back to zero after seek test
This should never happen theoretically, but since a transient
failure would get us to silently read wrong data, it's worth
erroring out. And it silence this:

Coverity 206034
2014-04-07 15:24:26 +01:00
Thiago Santos
e06f9667b0 inputselector: fix build with debug cached buffers enabled
gstinputselector.c:818:5: error: format not a string literal
and no format arguments [-Werror=format-security]
2014-04-03 18:17:03 -03:00
Vincent Penquerc'h
a6decb91ac queue2: fix event/preroll deadlock
The qlock is released between popping a buffer from the queue
and pushing it. When this buffer causes the sink to wait in
preroll, this lets a query see that the queue is empty, and
push the query then wait for it to be serviced. However, this
will not be done till after peroll, and this will thus block.
If upstream was waiting on buffering to reach 100% before
switching to PLAYING, a deadlock would ensue.

We fix it by refusing the query when buffering, as per Wim's
recommendation on IRC.
2014-03-24 12:00:50 +01:00
Sebastian Dröge
7d7511a4b3 queue2: Update buffering status and maybe post buffering message right when enabling buffering 2014-03-19 09:48:45 +01:00
Sebastian Dröge
f53f4ddca4 multiqueue: Update buffering status and maybe post buffering message right when enabling buffering 2014-03-19 09:48:45 +01:00
Tim-Philipp Müller
a6cd61b86a docs: fix multiqueue docs for new template names foo_%d -> foo_%u
https://bugzilla.gnome.org/show_bug.cgi?id=726358
2014-03-14 18:40:31 +00:00
Stefan Sauer
6d20be1702 tee: use store_sticky events add add more logging
Use the pad as object for logging to get more context. Use
gst_pad_store_sticky_event() instead of sending the event. This avoids a warning
as here the pad is not yet linked and we actually don't want to send anyway.
2014-03-11 21:50:35 +01:00
Thiago Santos
0362d98d94 queue2: if buffering is disabled while buffering, post 100% message
Avoids stall waiting for buffering to reach 100%
2014-03-10 10:10:24 -03:00
Thiago Santos
dc8f0932fe queue2: remove unused variable
buffering_iteration was never used
2014-03-10 10:10:24 -03:00
Thiago Santos
3ed2507ebc queue: queue2: preserve last flow result when pushing events
Avoids mistakenly returning _OK when downstream is still
_NOT_LINKED on subsequent received pad pushes

https://bugzilla.gnome.org/show_bug.cgi?id=725917
2014-03-10 10:10:20 -03:00
Thiago Santos
0e2f63654b multiqueue: if buffering is disabled while buffering, post 100% message
Avoids stall waiting for buffering to reach 100%
2014-03-10 09:49:05 -03:00
Thiago Santos
b6470a7b3f multiqueue: do not reset last push result when pushing events
Use the last result as a default when pushing a item from a single queue,
otherwise the status gets reset to _OK when pushing events.

This causes problems when mistakenly activating a not-linked stream
that is being ignored upstream as it is not being used (adaptive
scenarios), it will make the multiqueue post a buffering message
on a pad that won't receive buffers

https://bugzilla.gnome.org/show_bug.cgi?id=725917
2014-03-10 09:48:58 -03:00
Tim-Philipp Müller
3c966d060d fakesink, identity, fakesrc: fix debug printing if TAG_MEMORY buffer flag
The IN_CAPS flag does not exist any more.
2014-03-06 20:40:46 +00:00
Sebastian Dröge
5737f4f367 multiqueue: If we only have a single pad, don't consider all pads not linked and grow the queue indefinitely 2014-02-20 15:35:11 +01:00
Wim Taymans
252aa44887 queue2: don't truncate the temp file on shutdown
We want to keep the downloaded file untruncated so that we can use it
again later.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=724373
2014-02-18 15:46:32 +01:00
Wim Taymans
6fa8edd6b0 queue2: Fix merging of ranges
Make a method to get the seeking threshold. If data is further away from
this threshold we want to perform a seek upstream.
When the current downloaded range can merge with the next range,
actually include the data of the next range into the current range
instead of discarding it. Also decide if we seek to the write position
of the merged range or continue reading.
2014-02-18 14:29:01 +01:00
Thiago Santos
8ee77efbed outputselector: respect the 'negotiation-mode' property
If the segment event is allowed to be pushed to all pads it
will lead to an assertion of 'sticky event misordering:
segment received before caps' in case the pad-negotiation-mode
is set to 'active' or 'none'.

This patch fixes this by making all sticky events follow the
property like the caps event to prevent misordering warnings.

When a new pad is activated the current sticky events on the
sinkpad are forwarded to it in the proper order.

https://bugzilla.gnome.org/show_bug.cgi?id=723266
2014-01-30 17:06:00 -03:00
Thiago Santos
00da86036b capsfilter: do not forget to push pending events
Push pending events before buffers if caps is already
set
2014-01-29 14:59:43 -03:00
Arnaud Vrac
a93615aea1 multiqueue: do not reduce single queue below current level
When the single queue size was just bumped by 1 to allow more buffers to
be added, the buffers limit could be reduced to the current level when
setting the max-size-buffers property. This would result in a stall
since the queue would not grow anymore at this point.

Prevent this by not reducing a single queue size below the current
number of buffers + 1.

https://bugzilla.gnome.org/show_bug.cgi?id=712597
2014-01-27 19:57:35 +01:00
Sebastian Dröge
454ee04a22 multiqueue: Break the loop immediately if we found an empty queue
No need to continue looking at all the others
2014-01-24 09:28:05 +01:00
Per x Johansson
4f928547a8 multiqueue: Allow growing a queue if all other queues are not linked
In the case where one singlequeue is full and all other are not linked, the
growing of the full queue does not work correctly. The result depends on if
the full queue is last in the queue list or not.

https://bugzilla.gnome.org/show_bug.cgi?id=722891
2014-01-24 09:27:28 +01:00
Sebastian Dröge
210b0629fc capsfilter: Only set caps on the srcpad if it's activated in push mode
https://bugzilla.gnome.org/show_bug.cgi?id=722289
2014-01-16 18:16:35 +01:00
Thiago Santos
1d87a5244c inputselector: removing duplicate field position
It is already stored inside the GstSegment struct and
was only duplicating information. Also removed some
weird positon if/else that would possibly change the
segment that was going to be pushed downstream
2014-01-15 19:28:01 -03:00
Thiago Santos
139c96c129 multiqueue: prevent buffering forever with playbin
When prerolling/buffering, multiqueue has its buffers limit set
to 0, this means it can take an infinite amount of buffers.

When prerolling/buffering finishes, its limit is set back to 5, but
only if the current level is lower than 5. It should (almost) never be
and this will cause prerolling/buffering to need to wait to reach the
hard bytes and time limits, which are much higher.

This can lead to a very long startup time. This patch fixes this
by setting the single queues to the max(current, new_value) instead
of simply ignoring the new value and letting it as infinite(0)

https://bugzilla.gnome.org/show_bug.cgi?id=712597
2014-01-15 09:51:35 -03:00
Sebastian Dröge
24a3102b21 tee: Make sure to give pads the name that was requested
Also check for uniqueness and make sure we create a new
pad index properly if some were requested with names but
the new one is not.
2014-01-14 16:45:53 +01:00
Sebastian Dröge
c343ebd454 multiqueue: Allow growing a queue if all other queues are not linked
See https://bugzilla.gnome.org/show_bug.cgi?id=719893
2014-01-08 09:54:01 +01:00
Wim Taymans
c80ea6895d filesrc: don't try to seek to -1 offset
The offset can be -1 when we are configured in TIME format. Instead of
failing the seek and erroring, do what and offset of -1 is supposed to
do and simply read from the current offset.
2014-01-07 16:18:37 +01:00
YanpingZhang
1de533735b multiqueue: Fix hanging if shut down while handling a serialized query
https://bugzilla.gnome.org/show_bug.cgi?id=721253
2014-01-03 11:15:33 +01:00
Sebastian Dröge
34f8b4d6f3 tee: Remove dyn lock
It was used for pad-alloc in 0.10 but currently is completely unused
and not necessary. All pad access is protected by the tee object lock
and keeping another reference to the current pad.
2014-01-02 11:13:27 +01:00
Sebastian Dröge
e80fd39947 tee: Keep another ref to our one and only srcpad around while pushing
A pad probe on that pad might otherwise just release the pad, drop
the last reference and cause great misery.

https://bugzilla.gnome.org/show_bug.cgi?id=721300
2014-01-02 11:09:59 +01:00
Edward Hervey
af6fd4f5bb queue: Remove unneeded checks
item is guaranteed to be non-null.

COVERITY CID 1037152
COVERITY CID 1037153
2013-12-30 16:51:01 +01:00
Sebastian Dröge
0199cd5dbf funnel: Setting the PROXY_CAPS flag on the srcpad does not make much sense
funnel outputs whatever one of the upstreams currently outputs, a caps
query to a random upstream does not give the right answer here.
2013-12-20 14:30:22 +01:00
Sebastian Dröge
5937199726 funnel: Proxy CAPS and ALLOCATION queries 2013-12-20 11:38:18 +01:00
Thiago Santos
1f71f191be multiqueue: post 100% buffering if single queue is not linked
This makes buffering stop in case a stream switch happens. This is
important for adaptive streams that can disable not-linked streams
to avoid consuming the network bandwidth.

https://bugzilla.gnome.org/show_bug.cgi?id=719575
2013-12-20 01:10:47 -03:00
Wim Taymans
e5a73cc2ff queue: don't ignore event return value
Pass the event return value upstream.
Remove strange goto construct.
2013-12-11 14:52:25 +01:00
Sebastian Rasmussen
53ae1b2c9c docs: Fix typos in function/object descriptions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:11:12 +00:00
Olivier Crête
a90ce304c8 multiqueue: Wake up on reconfigure event
After patch bda406c4, the state of the singlequeue was set to OK, but nothing
would then wake up the thread, as the other wakeup functions only look at
singlequeues that are marked as having received as not-linked.

https://bugzilla.gnome.org/show_bug.cgi?id=708200
2013-12-03 12:40:11 -05:00
Sebastian Rasmussen
49950e57ad docs: add missing docs, fixing doc errors
* add many missing declarations to sections
 * GstController has been removed, update docs
 * skip GstIndex when generating documentation
 * rephrase so gtkdoc doesn't imagine return value
 * add missing argument description for gst_context_new()
 * document GstOutputSelectorPadNegotiationMode and move to header-file

https://bugzilla.gnome.org/show_bug.cgi?id=719614
2013-12-03 00:11:59 +00:00
Thiago Santos
5bb45ffbfc inputselector: handle gap events
Use gap events to advance the selector's pad position.

This is relevant to keep sync_streams mode working when one of the
streams doesn't have data all the time.
2013-11-29 15:03:44 -03:00
Edward Hervey
74a1970101 queue: Don't use gst_buffer_get_size() when possible
Makes qst_queue_locked_dequeue 20% faster
2013-11-11 13:28:14 +01:00
Wim Taymans
058533ff9f valve: proxy caps and allocation
Proxy the caps queries on the srcpad as well.
Proxy the allocation query on the sinkpad.
2013-11-06 10:15:59 +01:00
Sebastian Rasmussen
1479aba1cf tests/filesrc: Set location in wrong state
Also remove incorrect comment about code possibly not being reachable
that is now exercised by the filesrc unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=709831
2013-10-13 12:18:57 -04:00
Sebastian Dröge
02a4830096 Revert "Potential GstContext regression"
This reverts commit e658379534.

This test commit should've never been pushed. Oops.
2013-09-24 12:47:52 +02:00
Alex Ashley
e658379534 Potential GstContext regression
Since the refactoring of GstContext (commits
qc9fa2771b508e9aaeecc700e66e958190476f,
a7f5dc8b8a,
690326f906dc82e41ea58b81cdb2e3e88b754,
d367dc1b0d4ecb37f4d27267e03d7bf0c6c06a6, and
82d158aed3f2e8545e1e7d35085085ff58f18) I am no longer able to get
a shared context for an element that is used twice in a pipeline.

I used the documentation and eglglessink as my reference for
implementing the GstContext logic.

As the code was tied to a hardware decoder, I have ported the
GstContext code to fakesink to show the problem. Using the old
API a single ExampleMgr instance is created, but using the new
API each element is creating its own instance.
2013-09-24 12:28:55 +02:00
Sebastian Dröge
b25b9ad6bd queue2: Only update current level if we already downloaded a range
Otherwise queue->level is NULL and dereferencing that is not a good
idea in general.

https://bugzilla.gnome.org/show_bug.cgi?id=707648
2013-09-10 10:15:03 +02:00
Gustavo Noronha Silva
4cb596ddd6 Update the buffering state before stalling for more data
In some cases the wait for more data was happening without updating
the buffering state, meaning the API user would not be able to notice
it should pause the pipeline and update UI to indicate that is the
case, the video would likely stutter instead.

https://bugzilla.gnome.org/show_bug.cgi?id=707648
2013-09-09 14:15:09 +02:00
Sebastian Dröge
631421b8af typefind: Add missing break after handling the GAP event
Thanks to Edward Hervey for noticing.
2013-09-04 14:42:38 +02:00
Matej Knopp
7f657358a8 multiqueue: Don't reduce single queue visible size below its current level
If the multiqueue has automatically grown chances are good that
we will cause the pipeline to starve if the maximum level is reduced
below that automatically grown size.

https://bugzilla.gnome.org/show_bug.cgi?id=707156
2013-09-04 10:52:13 +02:00
Sebastian Dröge
8ba5fb0b28 outputselector: Don't adjust segment->start to the current time when switching pads
This does not make any sense at all and breaks timestamp->running_time
calculations in unpredictable ways.

https://bugzilla.gnome.org/show_bug.cgi?id=707130
2013-09-02 13:55:08 +02:00
Mathieu Duponchelle
76b5278f7c capsfilter: Delete link directly in pending_events.
When removing a segment event.

https://bugzilla.gnome.org/show_bug.cgi?id=707088
2013-08-30 14:56:17 -04:00
Alessandro Decina
a2bc789de6 filesink: please gcc (avoid a warn_unused_result warning) 2013-08-27 09:31:22 +02:00
Alessandro Decina
924acf5e92 filesink: flush (discard data) on FLUSH_STOP
Reset the write position to 0 and truncate the file on FLUSH_STOP.
2013-08-27 08:00:09 +02:00
Sebastian Dröge
14f817d723 queue: Properly unlock the sinkpad streaming thread when deactivating the pad
https://bugzilla.gnome.org/show_bug.cgi?id=705835
2013-08-20 10:16:41 +02:00
Sebastian Dröge
52f2345516 queue2: Properly unlock the sinkpad streaming thread when deactivating the pad
https://bugzilla.gnome.org/show_bug.cgi?id=706360
2013-08-20 10:16:05 +02:00
Sebastian Dröge
b40599f6db multiqueue: Clean up after the streaming thread has stopped
https://bugzilla.gnome.org/show_bug.cgi?id=705835
2013-08-19 16:38:50 +02:00
Sebastian Dröge
d7c3be226c queue2: Clean up after the streaming thread has stopped
https://bugzilla.gnome.org/show_bug.cgi?id=705835
2013-08-19 16:38:40 +02:00
Sebastian Dröge
ec1dd125c7 queue: Clean up after the streaming thread has stopped
https://bugzilla.gnome.org/show_bug.cgi?id=705835
2013-08-19 16:38:16 +02:00
Tim-Philipp Müller
6b4bef214b queue2: don't crash on EOS if queue is empty
Fixes spurious crash in test_simple_shutdown_while_running
unit test.
2013-08-16 16:53:29 +01:00
Tim-Philipp Müller
c02081ca30 queue2: don't change global buffering state from within query handler
When a buffering query is handled it uses the get_buffering_percent()
function to get some statitics. Unfortunately this function also
calculates whether the queue should be buffering and adapts the
global queue2 state in case of state transitions from/to buffering
(including whether a buffering message was posted on the bus!).

This means that there is a race which can cause buffering messages
to never posted if the global state changes happen as a result of aa
query instead of resulting from bytes flowing in/out.

Spotted by Sjoerd Simons.

Change to only query state in get_buffering_percent() and update
state only in update_buffering().

https://bugzilla.gnome.org/show_bug.cgi?id=705332
2013-08-16 16:53:03 +01:00
Wim Taymans
d7a98f9802 queue2: update buffering when changing capacity
When the capacity of the queue changes, make sure we post an updated buffering
message because we might suddenly have completed the buffering stage.
2013-08-16 12:57:17 +02:00
Sjoerd Simons
0b06804735 queue2: Fix backwards seeks into undowloaded ranges
When in download buffering mode queue2 didn't check if a range offset is
in a undownloaded range before the currently in-progress range. Causing
seeks to an earlier offset to, well, take a while.
2013-07-31 09:50:47 +02:00
Sjoerd Simons
7f8fb3861e queue2: Forward the schedule query upstream
When asked about the scheduling flags first check with upstream and
simply add the _SEEKABLE flag when using a temporary file as storage.

This enables the forwarding of _SEQUENTIAL and _BANDWIDTH_LIMITED from
sources if needed.

https://bugzilla.gnome.org/show_bug.cgi?id=704927
2013-07-29 15:07:44 +02:00
Sebastian Dröge
4aef70fed1 typefind: Only advance offset by the number of bytes we actually read
There might be a short read at EOS.
2013-07-29 11:05:09 +02:00
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