Commit graph

18180 commits

Author SHA1 Message Date
Edward Hervey
39de78c996 docs: Update gst core doc 2018-11-09 11:16:27 +02:00
Sebastian Dröge
4cd1bca969 typefind: Always forward RECONFIGURE events upstream
Based on a patch by Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/67
2018-11-07 23:11:57 +02:00
Nicolas Dufresne
008c1366b3 tracers: log: Fix post query trace
The post tracer hooks have a GstQuery argument which was truncated from
the trace. As the post hook is the one that contains the useful data,
this bug was hiding the important information from that trace.
2018-11-07 23:10:58 +02:00
Havard Graff
e4093f05f3 systemclock: pre-calculate the ratio for multiplying the perf-count on win
Saves a lot of computations.
2018-11-07 23:10:52 +02:00
Havard Graff
d819f6913c gstpad: use hook_id instead of hook in called_probes list
A pointer to a hook in this list can easily not be unique, given both
the slice-allocator reusing memory, and the OS re-using freed blocks
in malloc.

By doing many repeated add and remove of probes, this becomes very easily
reproduced.

Instead use hook_id, which *is* unique for a added GHook.
2018-11-07 23:10:42 +02:00
Jan Schmidt
6b2bbd6036 segment: Allow stop == -1 in gst_segment_to_running_time() and rate < 0
If a segment has stop == -1, then gst_segment_to_running_time()
would refuse to calculate a running time for negative rates,
but gst_segment_do_seek() allows this scenario and uses a
valid duration for calculations.

Make the 2 functions consistent by using any configured duration
to calculate a running time too in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=796559
2018-11-07 23:10:12 +02:00
Edward Hervey
36d19e7e10 multiqueue: Don't clamp running times for position calculation
Since we use full signed running times, we no longer need to clamp
the buffer time.

This avoids having the position of single queues not advancing for
buffers that are out of segment and never waking up non-linked
streams (resulting in an apparent "deadlock").
2018-11-07 23:09:50 +02:00
Jan Schmidt
8e328f571e ptp clock: Increase tolerance for late follow-up and delay-resp
The follow-up and delay-resp messages carry precise
timestamps for the arrival at the clock master, but
the local return time is unimportant, so we should be very
lenient in accepting them late. Some PTP masters don't
prioritise sending those packets, and we reject all the
responses and never sync - or take forever to do so.

Increase the tolerance to 20x the mean path delay.

Also fix a typo in one debug output that would print
the absolute time of the delay-resp message, not the offset
from the delay-req that it's actually being compared against.
2018-11-07 23:09:44 +02:00
Jan Schmidt
9dafa0cb03 ptp clock: Wait for ANNOUNCE before selecting a master
Previously, with opportunistic sync we'd track a master
clock as soon as we see a SYNC message, and hence sync up
faster, but then we'd announce we're synched before seeing
the ANNOUNCE, leaving the clock details like grandmaster-clock
empty.

A better way is to start tracking the clock opportunistically,
but not announce we're synched until we've also seen the ANNOUNCE.
2018-11-07 23:09:38 +02:00
Sebastian Dröge
57ae8a5569 typefind: Lower debug level of some output related to the URI query
It's not a warning if an URI doesn't have an extension, and it's also
not mandatory that sources have an URI or even answer the URI query.
2018-11-05 20:16:02 +02:00
Edward Hervey
e486a9244b queue2: Reset result flow when retrying
If we ever get a GST_FLOW_EOS from downstream, we might retry
pushing new data. But if pushing that data doesn't return a
GstFlowReturn (such as pushing events), we would end up returning
the previous GstFlowReturn (i.e. EOS).

Not properly resetting it would cause cases where queue2 would
stop pushing on the first GstEvent stored (even if there is more
data contained within).
2018-10-22 14:00:50 +02:00
Tim-Philipp Müller
3c586dec93 Release 1.14.4 2018-10-02 22:53:02 +01:00
Tim-Philipp Müller
91b88d3b70 Update docs 2018-10-02 22:53:00 +01:00
Jan Schmidt
0a479c3cdc tests: Use a different rate in a segment test.
Using a rate of 1.1 in the test is causing the test to
fail on 32-bit because ceil(1.1 * 10) can round to 12.

Instead use a rate 2.0 that can be expressed as floating
point number and doesn't trigger the problem.

https://bugzilla.gnome.org/show_bug.cgi?id=797154
2018-09-17 22:22:48 +10:00
Tim-Philipp Müller
86a48030a2 Release 1.14.3 2018-09-16 16:13:02 +01:00
Tim-Philipp Müller
028b40b33e Update docs 2018-09-16 16:13:00 +01:00
Jan Schmidt
769ceac199 gstsegment: Add check for gst_segment_offset_running_time()
Add a check for gst_segment_offset_running_time() that values
are taken directly from the segment base if possible.
2018-09-11 22:21:09 +10:00
Jan Schmidt
5978e3b958 gstsegment: Handle positions before the segment properly
Fixes for gst_segment_position_from_running_time_full() when
converting running_times that precede the segment start (or
stop in a negative rate segment)

The return value was incorrectly negated in those cases.

Add some more unit test checks for those cases, and especially
for segments with offsets.
2018-09-11 22:21:02 +10:00
Philippe Normand
208282e0b7 bin: Fix use-after-free issue in gst_bin_add()
gst_element_post_message() takes ownership of the message so we need to increase
its refcount until we no longer require access to its data (context_type).

https://bugzilla.gnome.org/show_bug.cgi?id=797099
2018-09-08 19:27:48 +01:00
Philippe Normand
3cf1bac0b7 utils: Set default values for position and duration query results
https://bugzilla.gnome.org/show_bug.cgi?id=797066
2018-09-03 13:27:11 +01:00
Philippe Normand
e35adf5b6a baseparse: avg_bitrate calculation critical warning fix
The avg_bitrate is an unsigned int, so the gst_util_uin64_scale() function can't
be used for it, as it expects signed integers for the fraction parts arguments.

https://bugzilla.gnome.org/show_bug.cgi?id=797054
2018-08-31 15:51:47 +01:00
Sebastian Dröge
f6739d8e1f input-selector: Bring latency handling in sync with GstPad code 2018-08-31 12:17:08 +03:00
Sebastian Dröge
235241a00d Revert "pad: Don't drop LATENCY queries with default implementation"
This reverts commit 794944f779.

Accumulating non-live latency values generally makes no sense and often
gives invalid results with min>max
2018-08-31 12:17:07 +03:00
Sebastian Dröge
9477e15e96 Revert "pad: Accumulate live/non-live latency values separately"
This reverts commit f5783e1cac.
2018-08-31 12:17:07 +03:00
Sebastian Dröge
016531d0f3 input-selector: Apply GstPad default latency handler fixes here too 2018-08-31 11:47:44 +03:00
Sebastian Dröge
5182b18912 pad: Accumulate live/non-live latency values separately
And only ever use the non-live values if all pads are non-live,
otherwise only use the results of all live pads.

It's unclear what one would use the values for in the non-live case, but
by this we at least pass them through correctly then.

This is a follow-up for 794944f779, which
causes wrong latency calculations if the first pad is non-live but a
later pad is actually live. In that case the live values would be
accumulated together with the values of the non-live first pad,
generally causing wrong min/max latencies to be calculated.
2018-08-31 11:41:47 +03:00
Sebastian Dröge
a42ab58588 typefindhelper: Mark gst_type_find_helper_get_range_full() as Since 1.14.3 2018-08-02 10:55:40 +03:00
Sebastian Dröge
aeeefe399a pad: Ensure that the pad is blocked for IDLE probes if they are called from the streaming thread too
IDLE probes that are directly called when being added will increase /
decrease the "number of IDLE probes running" counter around the call,
but when running from the streaming thread this won't happen.

This has the effect that when running from a streaming thread it is
possible to push serialized events or data out of the pad without
problems, but otherwise it would deadlock because serialized data would
wait for the IDLE probe to finish first (it is blocking after all!).

With this change it will now always consistently deadlock instead of
just every once in a while, which should make it obvious why this
happens and prevent racy deadlocks in application code.

https://bugzilla.gnome.org/show_bug.cgi?id=796895
2018-08-02 10:55:01 +03:00
Sebastian Dröge
bb3fbfbe7f typefind: Add new gst_type_find_helper_get_range_full() that returns flow return
And make use of it in the typefind element. It's useful to distinguish
between the different errors why typefinding can fail, and especially to
not consider GST_FLOW_FLUSHING as an actual error.

https://bugzilla.gnome.org/show_bug.cgi?id=796894
2018-08-02 10:54:35 +03:00
Sebastian Dröge
c4cd50f734 pad: Update pad offsets on the current event if the offset changed in pad probes
https://bugzilla.gnome.org/show_bug.cgi?id=796898
2018-08-02 10:54:23 +03:00
Sebastian Dröge
08d2ca4b5d inputselector: Forward LATENCY query to all sinkpads
Otherwise downstream will consider the pipeline not live if the active
pad is live, even though some inactive pads might be live and might
require a non-zero latency configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=796901
2018-08-02 10:54:17 +03:00
Mathieu Duponchelle
5c8d2f6258 aggregator: annotate GstAggregatorClass::update_src_caps 2018-07-30 14:43:32 +02:00
Sebastian Dröge
a2145fd681 aggregator: Don't leak peer pad of inactive pads when (not) forwarding QoS events to them 2018-07-26 02:33:30 +03:00
Tim-Philipp Müller
afb3d1b3e0 Release 1.14.2 2018-07-20 00:46:57 +01:00
Tim-Philipp Müller
0f758345a8 Update docs 2018-07-20 00:46:55 +01:00
Thibault Saunier
07af74b946 basetransform: Do not check if NULL is an emtpy caps
gst_base_transform_transform_caps can return NULL in various conditions
thus we should not treat its result as valid caps.

In all other places NULL is properly handled.
2018-07-19 09:11:22 +03:00
Edward Hervey
787a9f546b concat: Properly forward the SEGMENT seqnum 2018-07-18 14:08:02 +01:00
Mark Nauwelaerts
d6c697e7d9 gst: add some GIR array annotations 2018-05-21 10:42:58 +03:00
Christoph Reiter
7cbbdf3a90 meson: Fix detection of glib-mkenums under MSYS2
Under MSYS2 glib-mkenums is an executable and has a .exe extension and
the path does not end with "glib-mkenums".

Make the script compare the path without the file extension instead.

https://bugzilla.gnome.org/show_bug.cgi?id=796273
2018-05-20 16:41:06 +01:00
Tim-Philipp Müller
cba2c7dd89 Release 1.14.1 2018-05-17 13:17:27 +01:00
Tim-Philipp Müller
4d80b15b5a Update docs 2018-05-17 13:17:26 +01:00
Tim-Philipp Müller
4c5f1098dd Update translations 2018-05-17 12:37:20 +01:00
Sebastian Dröge
d3f19741ad pad: Fix race condition causing the same probe to be called multiple times
Probes were remembering a cookie that was used to check if the probe was
already called this time before the probes list changed. However the
same probes could've been called by another thread in between and thus
gotten a new cookie, and would then be called a second time.

https://bugzilla.gnome.org/show_bug.cgi?id=795987
2018-05-14 17:01:25 +03:00
Edward Hervey
fbf6e28747 gst: Use memcpy() instead of strncpy() where appropriate
strncpy() is assumed to be for strings so the compiler assumes that
it will need an extra byte for the string-terminaning NULL.

For cases where we know it's actually "binary" data, just copy it
with memcpy.

Fixes compiler warnings with gcc 8.

https://bugzilla.gnome.org/show_bug.cgi?id=795756
2018-05-08 16:42:37 +01:00
Tim-Philipp Müller
f887db4ab1 bufferlist: fix abort due to underflow when creating 0-sized list
gst_buffer_list_new_sized(0) will cause an underflow in a calculation
which then makes it try to allocate huge amounts of memory, which
may lead to aborts.

https://bugzilla.gnome.org/show_bug.cgi?id=795758
2018-05-05 16:28:04 +02:00
Tim-Philipp Müller
c97c95fc60 aggregator: fix exports and since marker for new API
https://bugzilla.gnome.org/show_bug.cgi?id=795332
2018-05-05 11:32:12 +02:00
Olivier Crête
2821126d60 aggregator: Add API to check if a pad has a new buffer
https://bugzilla.gnome.org/show_bug.cgi?id=795332
2018-05-04 13:48:17 +02:00
Tim-Philipp Müller
42fda19a7c meson: fix invalid keyword argument warnings
cc.compiles() doesn't have a 'prefix' argument (yet) and the
prefix has already been prepended to the source code snippets.

https://github.com/mesonbuild/meson/issues/2364
2018-04-23 18:55:29 +01:00
Tim-Philipp Müller
5c774f0842 multiqueue, inputselector: show pad properties in gst-inspect-1.0 2018-04-23 18:55:23 +01:00
Mark Nauwelaerts
e7ccd58171 base: fix some GIR annotations
Mostly related to out parameters and their transfer
2018-04-16 11:11:36 +03:00