Sebastian Dröge
829eafad0e
multiqueue: Don't use buffer after pushing it downstream
2012-04-09 16:40:47 +02:00
Sebastian Dröge
9441e711df
multiqueue: Wake up all not-linked streams when a stream switches from linked to not-linked
...
We reset all the waiting streams, let them push another buffer to
see if they're now active again. This allows faster switching
between streams and prevents deadlocks if downstream does any
waiting too.
Also improve locking a bit, srcresult must be protected by the
multiqueue lock too because it's used/set from random threads.
2012-03-29 14:49:53 +02:00
Sebastian Dröge
17e691421f
multiqueue: Recompute high-time too when flushing, not only high-id
2012-03-29 14:47:57 +02:00
Tim-Philipp Müller
2666450864
Suppress deprecation warnings in selected files, for g_static_rec_mutex_* mostly
...
GStaticRecMutex is part of our API/ABI, not much we can do here in 0.10.
2011-12-04 14:38:26 +00:00
Vincent Penquerc'h
611ac6ea85
multiqueue: check filled state of queues even if another one is empty
...
This will avoid a case where overrun is never signalled if some
stream never produces any data, causing playbin2 to not end preroll.
https://bugzilla.gnome.org/show_bug.cgi?id=660778
2011-11-24 10:38:34 +01:00
Tim-Philipp Müller
16dcd5e958
docs: fix Since: markers for API added after 0.10.35
2011-11-08 00:32:36 +00:00
Piotr Fusik
14f5518f3d
docs, gst: typo fixes
...
https://bugzilla.gnome.org/show_bug.cgi?id=658449
2011-09-07 18:03:17 +01:00
David Schleef
f3eac7de22
Work around changes in g_atomic API
...
See #651514 for details. It's apparently impossible to write code
that avoids both type punning warnings with old g_atomic headers and
assertions in the new. Thus, macros and a version check.
2011-06-04 00:36:26 -07:00
Tim-Philipp Müller
76ccd2a1e9
docs: fix up some Since markers and update for new multiqueue args
2011-05-14 14:05:52 +01:00
Sebastian Dröge
9f83109706
multiqueue: Add mode to synchronize deactivated/not-linked streams by the running time
...
Fixes bug #645107 , #600648 .
2011-05-14 11:39:35 +02:00
Mark Nauwelaerts
24888ecc70
multiqueue: ensure thread safety when adding a pad
...
This seems to be a regression, and was causing crashes.
https://bugzilla.gnome.org/show_bug.cgi?id=649878
2011-05-10 18:07:01 +01:00
Sebastian Dröge
ea36e12bbc
multiqueue: Don't leak the sinkpad name
2011-04-14 09:07:48 +02:00
Sebastian Dröge
6d97652903
multiqueue: Add another check for the flushing flag after taking the lock
...
This prevents another potential deadlock when flushing the pad
at exactly the right time.
2011-04-08 09:15:56 +02:00
Sebastian Dröge
8db570f48c
multiqueue: Make assignment of queue IDs and pad names threadsafe
...
Also add a test for naming pads by the caller and return NULL
when requesting an already existing pad.
2011-03-30 10:52:36 +02:00
Andreas Frisch
5368406a57
multiqueue: Set the single queue ID to the ID of the requested pad if one was given by the caller
2011-03-30 10:18:54 +02:00
Fraxinas
86bbc85ab1
multiqueue: Fix arbitrary sink + source pad naming
...
Use the string provided by the caller for the sinkpad name
if possible. Note that all sanity checking for this name
is already done in GstElement.
Fixes Bug #645931
2011-03-29 11:31:03 +02:00
Sebastian Dröge
489b94444e
multiqueue: Don't leak objects when flushing after dequeueing and before pushing the object
2011-03-22 11:04:20 +01:00
Sebastian Dröge
383cac91b1
multiqueue: Increment unique item counter with atomic operations
...
Before it was only protected by the stream lock but every pad
has its own stream lock, making the protection rather useless.
2011-03-21 17:52:59 +01:00
Sebastian Dröge
9e36a51bac
multiqueue: Unblock all waiting pads when shutting down
2011-03-21 17:17:22 +01:00
Sebastian Dröge
5b48fd5b24
multiqueue: Remove unused variable
2011-03-21 16:34:19 +01:00
Sebastian Dröge
14eb517849
multiqueue: Exit loop function if the pad is flushing
...
Fixes possible deadlocks when flushing an unlinked pad that waits
for other pads to advance.
2011-03-21 16:29:40 +01:00
Mark Nauwelaerts
e0f15e666a
multiqueue: return upon input when already eos
...
... rather than hanging incoming thread (as considered full in eos).
2010-12-03 13:35:49 +01:00
Jan Schmidt
691807d634
multiqueue: Fix tracking of unlinked streams.
...
33082eb9e4
introduced a bug
preventing sparse unlinked streams from advancing properly,
leading to the queue blocking.
Fixes : #633176
2010-10-27 18:12:36 +02:00
Edward Hervey
518364e7ac
multiqueue: Remove unused variable and simplify code
...
oldid was only used when we were doing multiple pops per loop.
2010-10-08 13:26:37 +02:00
Sebastian Dröge
33082eb9e4
multiqueue: Don't do an infinite loop in the loop function
...
Instead return after every iteration, which makes sure that the
stream lock is released for a short time after every iteration,
task state changes are checked, etc and this allows the task
to be stopped properly.
2010-08-27 16:59:09 +02:00
Sebastian Dröge
8035f13bbf
multiqueue: Flush the data queue if downstream return WRONG_STATE too
2010-08-27 16:59:09 +02:00
Sebastian Dröge
2e6f80bf81
elements: Stop using GST_FLOW_IS_FATAL()
2010-08-27 16:59:09 +02:00
Wim Taymans
808298833a
multiqueue: implement acceptcaps function
...
Our acceptcaps function can simply forward the query.
2010-06-29 09:57:41 +02:00
Edward Hervey
4e0b2dc832
multiqueue: Don't stop threads on UNEXPECTED and forward flow returns.
...
When a downstream element returns GST_FLOW_UNEXPECTED we want to:
* let the dataqueue task running
* forward the flow return upstream.
This allows upstream elements to push EOS, and have that EOS event come
downstream.
Fixes #609274
2010-02-09 16:15:18 +01:00
Edward Hervey
9cc47f8cba
Revert "multiqueue: handle UNEXPECTED flowreturn better"
...
This reverts commit fbdf4dceda
.
Partly fixes #609274
2010-02-09 15:58:36 +01:00
Wim Taymans
fbdf4dceda
multiqueue: handle UNEXPECTED flowreturn better
...
When we receive an UNEXPECTED flowreturn from downstream, we must not shutdown
the pushing thread because upstream will at some point push an EOS that we still
need to push further downstream.
To achieve this, convert the UNEXPECTED return value to OK. Add a fixme so that
we implement the right logic to propagate the flowreturn upstream at some point.
Also clean up the unit test a little.
Fixes #608136
2010-01-26 17:07:31 +01:00
Tim-Philipp Müller
745b35e7d4
docs: minor gtk-doc markup fixes
2010-01-20 01:48:56 +00:00
Mark Nauwelaerts
7b2c5f5168
multiqueue: set iterate_interal_links function on source pad
2009-12-30 22:59:29 +01:00
Tim-Philipp Müller
daecaf0e8a
Remove GST_DEBUG_FUNCPTR where they're pointless
...
There's not much point in using GST_DEBUG_FUNCPTR with GObject
virtual functions such as get_property, set_propery, finalize and
dispose, since they'll never be used by anyone anyway. Saves a
few bytes and possibly a tenth of a polar bear.
2009-10-28 00:44:24 +00:00
Wim Taymans
03baa04059
multiqueue: buffering is implemented now
2009-10-27 14:40:19 +01:00
Wim Taymans
b852da60d4
multiqueue: make sure percent increases
...
Keep track of the last posted percent message and make sure the next percent
messages are strictly increasing.
2009-10-27 14:40:17 +01:00
Wim Taymans
30fc865162
multiqueue: refactor buffering code
...
Move the buffering update code to a separate function so that we can call it
when the buffering state changes due to EOS.
Avoid dividing by 0.
2009-10-27 14:40:15 +01:00
Wim Taymans
99dd9830a9
multiqueue: add buffering support
...
Add support for buffering mode where we post BUFFERING messages based on the
level of the queues. It currently operates on the first queue that goes over or
under the high/low thresholds.
2009-10-27 14:40:12 +01:00
Wim Taymans
07991ae4ab
multiqueue: don't check visible items in buffering
...
In buffering mode we want to ignore the max visible items to decide when the
queue is filled. Instead, we only look at the number of bytes and/or time in the
queue.
2009-10-27 14:40:09 +01:00
Wim Taymans
6ac9191527
multiqueue: hook up low/high percent
...
Hook up the low/high percent properties for the buffering mode.
2009-10-27 14:40:07 +01:00
Wim Taymans
b9d4f6e550
multiqueue: hook up property for buffering
2009-10-27 14:40:02 +01:00
Wim Taymans
c6b0d4a43d
multiqueue: small cleanups
...
Remove unused variable to avoid confusion
Fix some typo
2009-10-27 13:22:47 +01:00
Wim Taymans
6082b0bc89
multiqueue: add FIXME for wrong code
...
Needs further investigation
2009-10-27 13:18:31 +01:00
Wim Taymans
354cf53f81
multiqueue: fix debug output
2009-10-27 13:18:29 +01:00
Wim Taymans
606852c586
multiqueue: avoid shadowing function argument
...
Don't shadow the sq argument in the underrun_cb function but use
a different variable name to iterate the other queues.
Use the same variable name in the overrun_cb function.
2009-10-27 13:18:25 +01:00
Wim Taymans
814ee012e7
multiqueue: make queue arg explicit
...
Make the queue argument to IS_FILLED explicit
2009-10-27 13:18:20 +01:00
Wim Taymans
c490d7542c
multiqueue: fix properties
...
Fix properties, make the extra-size properties as not implemented.
2009-10-27 13:18:00 +01:00
Wim Taymans
b95cc5031b
multiqueue: avoid lock for taking the counter
...
The counter for incomming data is already protected with the STREAM_LOCK so we
don't need to add another lock around it.
2009-10-21 13:38:57 -04:00
Stefan Kost
963932b1f1
multiqueue: split gst_multi_queue_item_new
...
Split gst_multi_queue_item_new into buffer and event variant to make save an if
and make code more readable.
2009-10-08 10:54:35 +03:00
Mark Nauwelaerts
e51a34985f
multiqueue: flush queue upon fatal flowreturn and release upstream thread
2009-10-07 18:51:52 +02:00