Commit graph

3124 commits

Author SHA1 Message Date
Sebastian Dröge
91e74fa9f6 aggregator: Mark all public structs as Since: 1.14 2019-05-02 08:31:25 +01:00
Olivier Crête
91084561df basesrc: Downgrade EOS warning
In the case of pushfilesrc, this is the expected behaviour, so let's
downgrade the warning to a debug message to avoid confusing users.
2019-05-02 08:31:25 +01:00
Matthew Waters
26bd067ff4 aggregator: don't leak gap buffer when out of segment 2019-05-02 08:31:25 +01:00
Matthew Waters
0396bc2e64 aggregator: take the pad lock around queue gap event removal
As is done for every other queue interaction
2019-05-02 08:31:25 +01:00
Matthew Waters
abc875b3c7 baseparse: don't reset the disable-passthrough property value
Resetting as a result of _reset() on PAUSED->READY is unexpected.
2019-05-02 08:31:25 +01:00
Tim-Philipp Müller
f37190e6d1 basesrc: ensure submitted buffer list is writable
Fixes flaky appsrc unit test where depending on scheduling
the submitted list might not be writable if submitted via
an action signal from the application thread.

Fixes gst-plugins-base#522
2019-05-02 08:31:25 +01: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
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
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
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
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
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
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
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
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
Mark Nauwelaerts
e7ccd58171 base: fix some GIR annotations
Mostly related to out parameters and their transfer
2018-04-16 11:11:36 +03:00
Sebastian Dröge
0ca5957342 net: Include gstnetcontrolmessagemeta.h in net.h 2018-03-25 12:32:42 +03:00
Tim-Philipp Müller
d86a90550b net: GST_EXPORT -> GST_NET_API
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 00:57:37 +00:00
Tim-Philipp Müller
6b286fb7dd controller: GST_EXPORT -> GST_CONTROLLER_API
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 00:57:37 +00:00
Tim-Philipp Müller
357e7c7b02 check: GST_EXPORT -> GST_CHECK_API
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 00:57:36 +00:00
Tim-Philipp Müller
7e2ace8618 base: GST_EXPORT -> GST_BASE_API
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 00:46:00 +00:00
Nicolas Dufresne
cbd03e26ce basesrc: Balance unlock/unlock_stop in _src_stop()
Otherwise it's possible that we won't be able to start again
depending the implementation. We do start/stop in normal use cases
whenever GST_QUERY_SCHEDULING happens before we are started.

https://bugzilla.gnome.org/show_bug.cgi?id=794149
2018-03-07 20:03:56 -05:00
Nicolas Dufresne
12c5d903c9 basesrc: No need to stop flushing in start_complete
The flushing state is handled a bit differently, there is no need
to stop flushing in start_complete. This would other result in
unlock_stop being called without unlock_start.

Unlike what the old comment says, there is no need to take the live
lock here, we are still single threaded at this point (app thread
or the state change thread). Also, we will wait for playing state
in create/getrange, no need to do that twice.

https://bugzilla.gnome.org/show_bug.cgi?id=794149
2018-03-07 20:03:56 -05:00
Sebastian Dröge
89eac59e92 queuearray: Implement pop_tail_struct() for completeness
All other variants of {peek,pop}_{head,tail}_{,struct} were already
implemented.

https://bugzilla.gnome.org/show_bug.cgi?id=794035
2018-03-05 09:39:57 +02:00
Olivier Crête
23b32d5600 queue: Ignore thresholds if a query is queued
The queue gets filled by the tail, so a query will always be the tail
object, not the head object. Also add a _peek_tail_struct() method to the
GstQueueArray to enable looking at the tail.

With unit test to prevent future regression.

https://bugzilla.gnome.org/show_bug.cgi?id=762875
2018-03-01 16:31:57 -05:00
Mathieu Duponchelle
d67623c7a9 meson: enable more warnings
Modeled on the autotools build, -W flags are only
added if the compiler supports them.

https://bugzilla.gnome.org/show_bug.cgi?id=793958
2018-03-01 17:20:48 +01:00
Mathieu Duponchelle
8c10f1e2b4 gstaggregator: pads must inherit from #GstAggregatorPad
Document this, and take advantage of that fact to use
GstAggregator.srcpad.segment instead of GstAggregator.segment

https://bugzilla.gnome.org/show_bug.cgi?id=793942
2018-03-01 15:25:53 +01:00
Mathieu Duponchelle
a567cc13a5 Revert "gstaggregator: pads must inherit from #GstAggregatorPad"
This reverts commit 9774b3775d.

Pushed by mistake
2018-03-01 01:15:34 +01:00
Mathieu Duponchelle
9774b3775d gstaggregator: pads must inherit from #GstAggregatorPad
Document this, and take advantage of that fact to use
GstAggregator.srcpad.segment instead of GstAggregator.segment

https://bugzilla.gnome.org/show_bug.cgi?id=793942
2018-03-01 00:39:50 +01:00
Mathieu Duponchelle
f1aba33090 aggregator: allow src GstAggregatorPads
See https://bugzilla.gnome.org/show_bug.cgi?id=793917

https://bugzilla.gnome.org/show_bug.cgi?id=793934
2018-03-01 00:39:08 +01:00
Nicolas Dufresne
91798e16cc baseparse: Fix integer overflow in bitrate calculation
https://bugzilla.gnome.org/show_bug.cgi?id=793284
2018-02-22 16:14:57 -05:00
Nicolas Dufresne
a84b886a7d baseparse: Avoid overflow in update_interval calculation
https://bugzilla.gnome.org/show_bug.cgi?id=793284
2018-02-22 16:14:57 -05:00
Nicolas Dufresne
25aed8c7ff baseparse: Fix check for update_interval
update_interval may be -1

https://bugzilla.gnome.org/show_bug.cgi?id=793284
2018-02-22 16:14:57 -05:00
Tim-Philipp Müller
bbf8f50cde queuearray: add _peek_tail() and _pop_tail()
API: gst_queue_array_pop_tail()
API: gst_queue_array_peek_tail()

These will be needed later for appsrc.
2018-02-19 15:44:04 +00:00
Alicia Boya García
65dcb2adbf gstbasesink: Include segment.offset in the computation of position
Position queries with GST_FORMAT_TIME are supposed to return stream
time.

gst_base_sink_get_position() estimates the current stream time on its
own instead of using gst_segment_to_stream_time(), but the algorithm
used was not taking segment.offset into account, resulting in invalid
values when this field was set to a non-zero value.

https://bugzilla.gnome.org/show_bug.cgi?id=792434
2018-02-16 10:35:14 -03:00
Mathieu Duponchelle
5ce6487fa9 basetransform: annotate virtual methods 2018-01-31 13:36:15 +01:00
Mathieu Duponchelle
117200faeb aggregator: delegate buffer skipping to the aggregate thread
As we do that for serialized events as well, and the subclass will
most likely need to access pad->segment to make its decisions,
doing that from the sinkpad's streaming threads was racy.
2018-01-23 22:49:52 +01:00
Mathieu Duponchelle
9f69034d41 API: GstAggregatorPad.skip_buffer virtual method
Allows subclasses to prevent buffers from being queued.

https://bugzilla.gnome.org/show_bug.cgi?id=781928
2018-01-23 20:17:44 +01:00
Mathieu Duponchelle
ac7434088e basesrc: Annotate some of the virtual methods 2018-01-23 20:06:52 +01:00
Tim-Philipp Müller
bce246f39f aggregator: rename _get_buffer() -> _peek_buffer() and _steal -> _pop
https://bugzilla.gnome.org/show_bug.cgi?id=791204
2018-01-23 09:44:44 +00:00
Michele Dionisio
0af74cb599 ptp: fix build failure with #undef USE_MEASUREMENT_FILTERING
"Label ‘out’ used but not defined", since it's also used by
the USE_MEDIAN_PRE_FILTERING branch.

https://bugzilla.gnome.org/show_bug.cgi?id=785631
2018-01-18 17:45:28 +00:00
Jun Xie
33e7269c37 typefindhelper: fix confusing debug log message
In case of a short buffer, the debug log is quite confusing.
Distinguish the two types of failure cases to make it clearer.

https://bugzilla.gnome.org/show_bug.cgi?id=792486
2018-01-15 16:31:44 +00:00
Tim-Philipp Müller
88dfd9ee48 libs: check: print stacktrace on unexpected criticals 2018-01-11 12:27:18 +00:00
Håvard Graff
fbbe6c646e meson: make check and tests build on Windows with msvc 2018-01-11 09:50:24 +00:00
Edward Hervey
9d335a80d0 gstharness: Remove double free 2018-01-02 10:02:45 +01:00
Stefan Sauer
ce00ec8bce aggregator: remove DEBUG_FUNCPTR
The new gst_element_do_foreach_pad() does not print the functions anymore.
2017-12-26 12:53:25 +01:00
Jan Alexander Steffens (heftig)
4636477d81 aggregator: Avoid a maybe-uninitialized warning
Arch Linux x86_64, gcc 7.2.1-2, -Og -g3
2017-12-24 11:39:14 +01:00