Commit graph

15723 commits

Author SHA1 Message Date
Duncan Palmer
197b1d509c multiqueue: Don't automatically enter the buffering state when use-buffering is set.
There is no reason I can see to set mq->buffering = TRUE when
use_buffering is set; the code here also calls update_buffering(), which
will set mq->buffering = TRUE if this is warranted because of low buffer
levels.

https://bugzilla.gnome.org/show_bug.cgi?id=745937
2015-04-10 10:51:18 -03:00
Sebastian Dröge
ae4c70813b Release 1.4.5 2014-12-18 12:27:58 +01:00
Sebastian Dröge
5601310cef Update .po files 2014-12-18 12:04:27 +01:00
Wim Taymans
ae8c8b478f bufferpool: log reason for discarded buffers
PERFORMANCE log the reason why a buffer could not be recycled in the
bufferpool.
2014-12-16 12:27:58 +01:00
Edward Hervey
08b5df08a9 basesink: clamp reported position based on direction
When using a negative rate (rate being segment.rate * segment.applied_rate),
we will end up reporting decreasing positions, therefore adjust the clamping
against last reported value accordingly.

Fixes positions getting properly reported with applied_rate < 0.0

https://bugzilla.gnome.org/show_bug.cgi?id=738092
2014-12-11 14:04:56 +00:00
Thiago Santos
c8126924c2 baseparse: update the duration variable before emitting the bus
Otherwise the application might still get the old value if it asks
between the message and the real update.
2014-12-11 14:02:59 +00:00
Edward Hervey
86ca8c41fa element: Fix doc and default implementation of send_event
The documentation states that gst_element_send_event is to "send an event
to an element".

Therefore we *send* upstream events to a source pad and downstream events
to a sink pad
2014-11-28 17:25:14 +01:00
Edward Hervey
6e027c5456 element: Figure default send_event direction handling
If we get a downstream event we want to send it to a random SINK pad
(and vice-versa).
2014-11-28 17:25:14 +01:00
Thiago Santos
cafe1f2fc9 queue2: percentage is relative to high-percent
When comparing percentage values, compare with 0-100 scale as it
has already been made relative to 0-high_percent, otherwise we mark
the queue as not buffering and report a 50% to the user. This leads to
a buffering stall as the user assumes the queue is still buffering but
it thinks it isn't.

https://bugzilla.gnome.org/show_bug.cgi?id=736969
2014-11-23 05:57:46 -03:00
Thiago Santos
81f13a5a2c multiqueue: percentage is an absolute value
multiqueue's queues stored percent value is the percentage from 0
to 100 (max-size-*) and should be compared with the requested limit
(high_percentage) set by the user and not with 100% to check if
buffering should stop. Otherwise we are only stopping buffering when the
queue gets completely full.
2014-11-23 05:57:46 -03:00
Wim Taymans
3b1de023fc structure: don't overread input when searching for "
When searching for the string terminator don't read past the ending
0-byte when escaping characters.
Add unit test for various escaping cases.
2014-11-20 21:51:06 +01:00
Vincent Penquerc'h
4d7b9a91c4 pad: fail dropped queries
Previously, dropping a query from a pad probe would deem the
query succeeded, and the caller might then assume the query's
results are valid, and thus dereference an invalid object
such as a GstCaps.

We now assume dropped queries did not succeed. Dropped events
and buffers are still deemed a success.
2014-11-15 22:07:14 +00:00
Haakon Sporsheim
050ba7d911 task: Fix pause/stop race condition
If a task thread is calling pause on it self and the
controlling/"main" thread stops the task, it could end in a race
where gst_task_func loops and then checks for paused after the
controlling thread just changed the task state to stopped.
Hence the task would actually call func again even though it was
both paused and stopped.

https://bugzilla.gnome.org/show_bug.cgi?id=740001
2014-11-15 22:06:49 +00:00
Sebastian Dröge
410086dd12 Release 1.4.4 2014-11-06 12:51:42 +01:00
Sebastian Dröge
7cf9a44e02 Update .po files 2014-11-06 12:25:58 +01:00
Tim-Philipp Müller
37fa36f876 basesink: don't unlock mutex that is not locked
Fixes 'Attempt to unlock mutex that was not locked'
warning with newer GLibs when sink is shut down in
certain situations. Triggered by the decodebin
test_reuse_without_decoders unit test in -base
sometimes, esp. on slower machines.
2014-10-24 20:11:49 +01:00
Andrei Sarakeev
83421a0d59 multiqueue: Wake up any waiting streams if the current one goes EOS
Otherwise we might have unlinked streams waiting.

https://bugzilla.gnome.org/show_bug.cgi?id=738198
2014-10-24 20:11:27 +01:00
Guillaume Desmottes
250e5e6038 docs: pwg: fix typo in 'Dynamic negotiation' section
The point of this example is to show how to set caps
on the source pad once it has been set on the sink pad.
So, in passthrough mode, the caps is just copied to the
source pad.

https://bugzilla.gnome.org/show_bug.cgi?id=738153
2014-10-24 20:05:41 +01:00
Nicolas Huet
6d4708a4db systemclock: fix multi-thread entry status issue
Running two threads, one executing the timer and one unscheduling it, the
unscheduled status set by the second thread is sometimes overwritten by the
first one.

https://bugzilla.gnome.org/show_bug.cgi?id=737999
2014-10-24 20:03:14 +01:00
Tim-Philipp Müller
6dfdb654ef tests: fix caps leak in baseparse unit test 2014-10-24 19:59:41 +01:00
Matej Knopp
0561c988ff tests: baseparse: set_sink_caps vfunc should't take ownership of the caps
https://bugzilla.gnome.org/show_bug.cgi?id=737762
2014-10-24 19:47:58 +01:00
Aleix Conchillo Flaqué
e014bac42b multiqueue: don't lock multiqueue when pushing serialized queries
If we are pushing a serialized query into a queue and the queue is
filled, we will end in a deadlock. We need to release the lock before
pushing and acquire it again afterward.

https://bugzilla.gnome.org/show_bug.cgi?id=737794
2014-10-14 09:39:27 +02:00
Sebastian Dröge
2096f51ccc queue: Add missing break in switch 2014-10-14 09:39:18 +02:00
Matej Knopp
9438cc4c69 multiqueue: update segment position on GAP events to calculate levels properly
https://bugzilla.gnome.org/show_bug.cgi?id=737498
2014-10-14 09:39:12 +02:00
Sebastian Dröge
47c5d48e58 queue: update segment position on GAP events to calculate levels properly
https://bugzilla.gnome.org/show_bug.cgi?id=737498
2014-10-14 09:39:05 +02:00
Sebastian Dröge
18a5f7ba98 queue2: update segment position on GAP events to calculate levels properly
https://bugzilla.gnome.org/show_bug.cgi?id=737498
2014-10-14 09:38:53 +02:00
Sebastian Dröge
3ce1a41144 capsfilter: Push pending events before a buffer also if upstream never configured caps but we have srcpad caps already
Otherwise we never send pending events downstream that arrive after we
configured caps on the srcpad.

https://bugzilla.gnome.org/show_bug.cgi?id=737735
2014-10-14 09:38:33 +02:00
Thibault Saunier
f285526de6 scripts: Handle gst-python in gst-uninstalled
https://bugzilla.gnome.org/show_bug.cgi?id=709082
2014-09-24 19:19:46 +02:00
Sebastian Dröge
188bec75e6 Release 1.4.3 2014-09-24 12:19:55 +03:00
Sebastian Dröge
c9dfedb6c4 Update .po files 2014-09-24 11:15:07 +03:00
Thibault Saunier
42f571ed49 capsfilter: Remove EOS event from pending_event list on FLUSH_STOP
https://bugzilla.gnome.org/show_bug.cgi?id=709868
2014-09-24 10:57:32 +03:00
Marcin Kolny
de9278fda9 datetime: added missing include directives
https://bugzilla.gnome.org/show_bug.cgi?id=737133
2014-09-24 10:10:20 +03:00
Thibault Saunier
8c7cb27c8d queue: Do not forget to release the QUEUE_LOCK in the out_flow_error path
Avoiding deadlocks!
2014-09-23 14:48:13 +02:00
Thibault Saunier
b189949427 queue: Do not hold GST_QUEUE_LOCK while posting ERROR messages
This might create deadlocks and we need to avoid holding element
specific lock while posting messages

For example a deadlock will happen if while posting the message,
someone connected on the bus (sync) tries to DOT the pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=737102
2014-09-22 16:08:42 +02:00
Thibault Saunier
4f135ad8df script:udpate: Try to rebase local changes when updating 2014-09-22 16:07:19 +02:00
Thiago Santos
7630ada89a queue2: do not post buffering messages holding the lock
It might cause deadlocks to post messages while holding the queue2
lock. To avoid this a new boolean flag is set whenever a new
buffering percent is found. The message is posted after the lock
is released.

To make sure the buffering messages are posted in the right order, messages
are posted holding another lock. This prevents 2 threads trying to post
messages at the same time.

https://bugzilla.gnome.org/show_bug.cgi?id=736969
2014-09-22 10:24:32 -03:00
Sebastian Dröge
23205f04f1 Release 1.4.2 2014-09-19 14:19:08 +03:00
Sebastian Dröge
39ee08f250 Update .po files 2014-09-19 10:45:45 +03:00
Tim-Philipp Müller
cce42d2edd docs: pwg: fix some links to the API docs
https://bugzilla.gnome.org/show_bug.cgi?id=736762
2014-09-19 09:52:42 +03:00
Ognyan Tonchev
178acf7424 typefindelement: do not leak sticky events in flush_stop
https://bugzilla.gnome.org/show_bug.cgi?id=736813
2014-09-17 17:43:15 +01:00
Ognyan Tonchev
67c1a6ff30 event: add annotations to gst_event_parse_toc_select()
https://bugzilla.gnome.org/show_bug.cgi?id=736739
2014-09-17 10:22:47 +03:00
Ognyan Tonchev
fa11a570d4 query: Add annotations to gst_query_add_allocation_pool()
https://bugzilla.gnome.org/show_bug.cgi?id=736736
2014-09-17 10:22:47 +03:00
Thiago Santos
3bbecbb857 multiqueue: do not post messages holding the lock
It might cause deadlocks to post messages while holding the multiqueue
lock. To avoid this a new boolean flag is set whenever a new buffering percent
is found. The message is posted after the lock can be released.

To make sure the buffering messages are posted in the right order, messages
are posted holding another lock. This prevents 2 threads trying to post
messages at the same time.

https://bugzilla.gnome.org/show_bug.cgi?id=736295
2014-09-16 18:11:00 -03:00
Aurélien Zanelli
61d3a9c2a4 basesrc: handle reference in set_allocation rather than in prepare_allocation
Otherwise we can forget to unref objects in error cases.

https://bugzilla.gnome.org/show_bug.cgi?id=736680
2014-09-16 11:32:03 +03:00
Sebastian Dröge
af09e548c3 check: Use the name parameter of gst_check_setup_src_pad_by_name() and the sink variant
This was hardcoded to "sink" / "src" by accident in previous refactoring.
2014-09-16 11:31:56 +03:00
Ognyan Tonchev
f8a4bbe682 query: add annotations to gst_query_set_nth_allocation_pool()
https://bugzilla.gnome.org//show_bug.cgi?id=736424
2014-09-12 10:17:46 +01:00
Rémi Lefèvre
eb329e070e valve: fix typo in description
https://bugzilla.gnome.org/show_bug.cgi?id=736455
2014-09-11 18:35:46 +01:00
Ravi Kiran K N
6577bbc73f output-selector: Send all events to active src pad and EOS to all src pads
Fixes tests/icles/output-selector-test

https://bugzilla.gnome.org/show_bug.cgi?id=729811
2014-09-04 12:55:06 +03:00
Tim-Philipp Müller
2356868a38 devicemonitor: fix typo in sample code in docs
https://bugzilla.gnome.org/show_bug.cgi?id=735975
2014-09-04 12:53:25 +03:00
Thibault Saunier
03d93e7cdf multiqueue: Not post BUFFERING message if one of the singlequeue doesn't need it
Imagine the following 'pipeline'

                --------------
            p1/| 'fullqueue'  |--- 'laggy' downstream
  ---------  / |              |
-| demuxer |   | multiqueue   |
  ---------  \ |              |
            p2\| 'emptyqueue' |--- 'fast' downstream
                --------------

In the case downstream of one single queue (fullqueue) has (a lot of) latency
(for example for reverse playback with video), we can end up having the other
SingleQueue (emptyqueue) emptied, before that fullqueue gets
unblocked. In the meantime, the demuxer tries to push on fullqueue, and
is blocking there.

In that case the current code will post a BUFFERING message on the bus when
emptyqueue gets emptied, that leads to the application setting the pipeline state to
PAUSED. So now we end up in a situation where 'laggy downstream' is
prerolled and will not unblock anymore because the pipeline is set to
PAUSED, the fullequeue does not have a chance to be emptied and
the emptyqueue can not get filled anymore so no more BUFERRING message
will be posted and the pipeline is stucked in PAUSED for the eternity.

Making sure that we do not try to "buffer" if one of the single queue
does not need buffering, prevents this situtation from happening though it lets the
oportunity for buffering in all other cases.

That implements a new logic where we need all singlequeue to need
buffering for the multiqueue to actually state buffering is needed,
taking the maximum buffering of the single queue as the reference point.

https://bugzilla.gnome.org/show_bug.cgi?id=734412
2014-08-28 15:10:05 +03:00