Commit graph

15708 commits

Author SHA1 Message Date
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
Arnaud Vrac
efa5a41dbc buffer: do not touch memory tag flag when copying buffer flags
The tag memory flag will be set later if the memory is also copied. This
patch avoids buffers being freed needlessly in bufferpools.

https://bugzilla.gnome.org/show_bug.cgi?id=735574
2014-08-28 12:21:35 +03:00
Sebastian Dröge
ce6e24e68a Release 1.4.1 2014-08-27 15:03:36 +03:00
Sebastian Dröge
e618c4f1fc Update .po files 2014-08-27 14:22:21 +03:00
Tim-Philipp Müller
902a5e6bdc queue: fix race when flush-stop event comes in whilst shutting down
Don't re-start the queue push task on the source pad when a
flush-stop event comes in and we're in the process of shutting
down, otherwise that task will never be stopped again.

When the element is set to READY state, the pads get de-activated.
The source pad gets deactivated before the queue's own activate_mode
function on the source pads gets called (which will stop the thread),
so checking whether the pad is active before re-starting the task on
receiving flush-stop should be fine. The problem would happen when the
flush-stop handler was called just after the queue's activate mode
function had stopped the task.

Spotted and debugged by Linus Svensson <linux.svensson@axis.com>

https://bugzilla.gnome.org/show_bug.cgi?id=734688
2014-08-23 12:40:35 +01:00
Thiago Santos
ffa14610ca inputselector: always proxy caps query
Otherwise it would only be proxied for the active pad which can lead
upstream to use an incompatible caps for the downstream element.

Even if a reconfigure event is sent upstream when the pad is activated, this
will save the caps reconfiguration if it is already using an acceptable caps.
2014-08-23 12:40:25 +01:00
Tim-Philipp Müller
63e1f9c8da base: and fix build with new g-i again 2014-08-14 14:40:24 +01:00
Tim-Philipp Müller
277b471239 base: remove g-i annotation that makes older g-ir-scanner crash
Just remove one skip annotation that causes this:

  ** (g-ir-compiler:12458): ERROR **: Caught NULL node, parent=empty

with older g-i versions such as 1.32.1.
2014-08-14 14:35:50 +01:00
Sebastian Dröge
c99a4db917 multiqueue: Only handle flow returns < EOS as errors, not e.g. flushing 2014-08-13 14:34:02 +03:00
Sebastian Dröge
870a65c670 bin: Use allow-none instead of nullable until we depend on a new enough GI version 2014-08-13 14:34:02 +03:00
Sebastian Dröge
afc394d221 bin: gst_bin_new() can accept NULL as name 2014-08-13 14:34:02 +03:00
Sebastian Dröge
5b015250ba element: Clarify docs about gst_element_get_request_pad() and remove deprecation part
This function is not really pad or slow for the common case of requesting a
pad with the name of the template. It is only slower if you to name your pads
directly instead of letting the element handle it.

Also there's no reason to deprecate it in favor of a more complicated function
for the common case.
2014-08-13 14:34:02 +03:00
Sebastian Dröge
c69b12bf95 queue2: Post errors if we receive EOS after downstream reported an error
There will be no further data flow that would allow us to propagate the
error upstream, causing nobody at all to post an error message.
2014-08-13 14:34:02 +03:00
Sebastian Dröge
38c0114fb7 queue: Post errors when receiving EOS after downstream returned an error
There might be no further data flow that would allow us to propagate the
error upstream, causing nobody to post an error at all.
2014-08-13 14:34:02 +03:00
Sebastian Dröge
7c797f024c multiqueue: Post errors ourselves if they are received after EOS
After EOS there will be no further buffer which could propagate the
error upstream, so nothing is going to post an error message and
the pipeline just idles around.
2014-08-13 14:34:02 +03:00
Руслан Ижбулатов
067604b2d3 poll: Prevent false-negative from WAKE_EVENT() on W32
SetEvent() seems to not call SetLastError(0) internally, so checking last
error after calling SetEvent() may return the error from an earlier W32 API
call. Fix this by calling SetlastError(0) explicitly.

Currently WAKE_EVENT() code is cramped into a macro and doesn't look to be
entirely correct. Particularly, it does not check the return value of
SetEvent(), only the thread-local W32 error value. It is likely that SetEvent()
actually just returns non-zero value, but the code mistakenly thinks that the
call has failed, because GetLastError() seems to indicate so.

https://bugzilla.gnome.org/show_bug.cgi?id=733805
2014-08-11 08:42:06 +02:00