Commit graph

16966 commits

Author SHA1 Message Date
Nirbheek Chauhan
b4ba539ced build: Apply XCode 8 workaround for iOS too
clock_gettime was also added for iOS 10.0, so don't use it if we're
targetting an older version. That would've caused the symbol to not be
found at runtime on older devices.
2016-10-26 17:29:45 +05:30
Nirbheek Chauhan
32ae9c6127 build: Fix clock_gettime check with XCode 8
With XCode 8, clock_gettime will be incorrectly detected as being
available regardless of what OS X version we're targetting because the
symbol is available in the .tbd library as a weak symbol.
See: https://github.com/Homebrew/homebrew-core/issues/3727#issue-170086273

It's only starting from macOS 10.12 that clock_gettime is actually
available, so we can unconditionally disable it when targetting older
versions. We cannot simply do AC_CHECK_FUNCS with -Wl,-no_weak_imports
because the autoconf check does its own prototype declaration that
doesn't trigger that compiler flag.

https://bugzilla.gnome.org/show_bug.cgi?id=772451
2016-10-26 17:29:45 +05:30
Matthew Waters
565368f6a0 element: check for invalid gstcontext's being provided to set_context
https://bugzilla.gnome.org/show_bug.cgi?id=771773
2016-10-25 16:01:58 +03:00
Matthew Waters
4645634dc8 element: use g_strcmp0 in set_context
It's NULL-safe while the libc implementation may not be.

https://bugzilla.gnome.org/show_bug.cgi?id=771773
2016-10-25 16:01:51 +03:00
Sebastian Dröge
336765a223 argbcontrolbinding: gst_object_replace() is transfer none 2016-10-25 15:59:59 +03:00
Edward Hervey
1fdc091aa8 bin: Fix iterator resync'ing
When we get GST_ITERATOR_RESYNC, we need to call gst_iterator_resync()
otherwise we will always get GST_ITERATOR_RESYNC (and that loop would
run forever).
2016-10-25 15:59:02 +03:00
Edward Hervey
8152f3a320 queue2: Implement gst_event_full_func handling
Same as we do for queue
2016-10-25 15:58:38 +03:00
Sebastian Dröge
379d1fee38 bin: fix compiler warning caused by previous commit
Add forgotten "git commit --amend" for last commit

Need to cast away the const as g_queue_foreach() takes a non-const GQueue*
2016-10-22 17:58:48 +01:00
Tim-Philipp Müller
5104eb245f docs: add index for API new in 1.8 2016-10-22 17:45:01 +01:00
Tim-Philipp Müller
7b0cc5d76a g-i: info: allow passing NULL to gst_debug_remove_log_function()
Useful for removing the default handler from bindings.
2016-10-21 11:27:12 +01:00
Aurélien Zanelli
8ec2c56887 collectpads: add g-i transfer annotations to peek/pop/read_buffer/take_buffer functions
https://bugzilla.gnome.org/show_bug.cgi?id=768948
2016-10-21 11:26:41 +01:00
Guillaume Desmottes
2f416348f6 message: fix annotation of parse_device_{added,removed}
gst_structure_id_get() returns a new reference so the returned device is
actually (transfer full).

The code using this API was already correct but the code example in
comments was not.

https://bugzilla.gnome.org/show_bug.cgi?id=768776
2016-10-21 11:26:29 +01:00
Tim-Philipp Müller
a903367420 Fix some nonsensical g-i annotations 2016-10-21 11:25:33 +01:00
Sebastian Dröge
c408dafd04 typefindhelper: Fix gobject-introspection warning about invalid transfer annotation
gsttypefindhelper.c:485: Warning: GstBase: invalid "transfer" annotation for gsize: only valid for array, struct, union, boxed, object and interface types
2016-10-21 11:25:24 +01:00
Guillaume Desmottes
d0ee909cdd rusage: properly free the queue memory
The queue is allocated as part of the tracer struct so we should not
use g_queue_free() to free it.

https://bugzilla.gnome.org/show_bug.cgi?id=764985
2016-10-17 17:52:19 +01:00
Stefan Sauer
60f088026a tracer/rusage: fix format string args
The format string contains a process id, but we did not provice one. This
caused us to log garbage since all args got shifted.
2016-10-08 13:31:04 +02:00
Kouhei Sutou
a195e47633 bin: When copying the sort iterator, also copy its internal queue
Otherwise both iterators share the same references, the second one
usually resulting in a crash when being freed.

https://bugzilla.gnome.org/show_bug.cgi?id=771649
2016-09-30 13:40:36 +03:00
Anthony G. Basile
b724894b27 libcompat.h: strsignal() should be not be decleared const
POSIX standards requires strsignal() to return a pointer to a char,
not a const pointer to a char. [1]  On uClibc, and possibly other
libc's, that do not HAVE_DECL_STRSIGNAL, libcompat.h declares
const char *strsignal (int sig) which causes a type error.

[1] man 3 strsignal

https://bugzilla.gnome.org/show_bug.cgi?id=763567
2016-09-26 10:59:45 +01:00
Sebastian Dröge
dd7e23e2b2 Release 1.8.3 2016-08-19 12:46:41 +03:00
Sebastian Dröge
3883ab0049 Update .po files 2016-08-19 11:50:15 +03:00
Edward Hervey
0846f1302c queue2: Post buffering messages earlier in ringbuffer mode
In ringbuffer mode we need to make sure we post buffering messages *before*
blocking to wait for data to be drained.

Without this, we would end up in situations like this:
* pipeline is pre-rolling
* Downstream demuxer/decoder has pushed data to all sinks, and demuxer thread
  is blocking downstream (i.e. not pulling from upstream/queue2).
* Therefore pipeline has pre-rolled ...
* ... but queue2 hasn't filled up yet, therefore the application waits for
  the buffering 100% messages before setting the pipeline to PLAYING
* But queue2 can't post that message, since the 100% message will be posted
  *after* there is room available for that last buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=769802
2016-08-16 16:49:03 +03:00
Edward Hervey
4160569537 queue2: Fix average input rate calculation on small input range
When dealing with small-ish input data coming into queue2, such as
adaptivedemux fragments, we would never take into account the last
<200ms of data coming in.

The problem is that usually on TCP connection the download rate
gradually increases (i.e. the rate is lower at the beginning of a
download than it is later on). Combined with small download time (less
than a second) we would end up with a computed average input rate
which was sometimes up to 30-50% off from the *actual* average input
rate for that fragment.

In order to fix this, force the average input rate calculation when
we receive an EOS so that we take into account that final window
of data.

https://bugzilla.gnome.org/show_bug.cgi?id=768649
2016-08-16 16:48:57 +03:00
Tim-Philipp Müller
8ea92f08f7 g-i: pass compiler env to g-ir-scanner
It's what introspection.mak does as well. Should
fix spurious build failures on gnome-continuous.
2016-08-13 16:07:44 +01:00
Tim-Philipp Müller
4e9d8d55b4 gst: g-i: pass compiler with quotes
So CC="ccache gcc" works properly.
2016-08-13 16:07:38 +01:00
Ray Strode
9d146a15d9 gst: attempt to fix/track-down mysterious gnome-continuous build failures 2016-08-13 16:07:32 +01:00
Jan Schmidt
edea65f60a inputselector: Wake other pads when selected goes EOS
Other pads that are waiting for the stream on the selected
pad to advance before they finish waiting themselves
should be given the chance to do so when the selected pad
goes EOS. Fixes problems where input streams can end up
waiting forever if the active stream goes EOS earlier than
their own end time.
2016-07-25 13:22:43 +03:00
Miguel París Díaz
f97c80ae1d pad: check query caps answered and caps not NULL
https://bugzilla.gnome.org/show_bug.cgi?id=768450
2016-07-25 13:17:36 +03:00
Sebastian Dröge
5aba7d8bb7 baseparse: Make sure to not create an invalid event order when generating the default CAPS event because of a GAP event
There must be a SEGMENT event before the GAP event, and SEGMENT events must
come after any CAPS event. We however did not produce any CAPS yet, so we need
to ensure to insert the CAPS event before the SEGMENT event into the pending
events list.

https://bugzilla.gnome.org/show_bug.cgi?id=766970
2016-07-25 13:12:31 +03:00
Guillaume Desmottes
aee7ab3444 bus: chain up GObject::constructed() to the parent class' implementation
Needed so GstBus can be tracked by the leaks tracer.

https://bugzilla.gnome.org/show_bug.cgi?id=768141
2016-07-04 12:43:34 +02:00
Vincent Penquerc'h
b09fbe0797 queue2: fix crash deleting current region for small ring buffers
Ensure we do not attempt to destroy the current range. Doing so
causes the current one to be left dangling, and it may be dereferenced
later, leading to a crash.

This can happen with a very small queue2 ring buffer (10000 bytes)
and 4 kB buffers.

repro case:

gst-launch-1.0 fakesrc sizetype=2 sizemax=4096 ! \
queue2 ring-buffer-max-size=1000 ! fakesink sync=true

https://bugzilla.gnome.org/show_bug.cgi?id=767688
2016-07-04 12:40:57 +02:00
Edward Hervey
17ab616653 multiqueue: Fix behaviour with not-linked and eos pads
This is an update on c9b6848885
multiqueue: Fix not-linked pad handling at EOS

While that commit did fix the behaviour if upstream sent a GST_EVENT_EOS,
it would break the same issue when *downstream* returns GST_FLOW_EOS
(which can happen for example when downstream decoders receive data
from after the segment stop).

GST_PAD_IS_EOS() is only TRUE when a GST_EVENT_EOS has flown through it
and not when a GST_EVENT_EOS has gone through it.

In order to handle both cases, also take into account the last flow
return.

https://bugzilla.gnome.org/show_bug.cgi?id=763770
2016-07-01 11:05:52 +02:00
Nicolas Dufresne
046551105b tee: Properly handle return value when only 1 pad
This patch handle the case when you have 1 pad (so the fast path is
being used) but this pad is removed. If we are in allow-not-linked, we
should return GST_FLOW_OK, otherwise, we should return GST_FLOW_UNLINKED
and ignore the meaningless return value obtained from pushing.

https://bugzilla.gnome.org/show_bug.cgi?id=767413
2016-06-27 09:27:28 +03:00
Sebastian Dröge
ba536c2307 basesink: Update start time when losing state only if we were in PLAYING
If we were in PAUSED, the current clock time and base time don't have much to
do with the running time anymore as the clock might have advanced while we
were PAUSED. The system clock does that for example, audio clocks often don't.

Updating the start time in PAUSED will cause a) the wrong position to be
reported, b) step events to step not just the requested amount but the amount
of time we spent in PAUSED. The start time should only ever be updated when
going from PLAYING to PAUSED to remember the current running time (to be able
to compensate later when going to PLAYING for the clock time advancing while
PAUSED), not when we are already in PAUSED.

Based on a patch by Kishore Arepalli <kishore.arepalli@gmail.com>

The updating of the start time when the state is lost was added in commit
ba943a82c0 to fix the position reporting when
the state is lost. This still works correctly after this change.

https://bugzilla.gnome.org/show_bug.cgi?id=739289
2016-06-27 09:26:23 +03:00
Linus Svensson
3de8a4f728 gstpad tests: Add a test for flush event only probes
https://bugzilla.gnome.org/show_bug.cgi?id=762330
2016-06-17 12:09:46 +01:00
Thiago Santos
e6dd8d85c0 pad: consider PROBE_TYPE_EVENT_FLUSH when using PROBE_TYPE_ALL_BOTH
When GST_PAD_PROBE_EVENT_FLUSH is used, the probes already have
a data type and it is not needed to automatically add the default
types. Without this, EVENT_FLUSH probes that didn't specify a data
type would be called also for other data such as buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=762330
2016-06-17 12:08:57 +01:00
Sebastian Dröge
a87289ece2 Release 1.8.2 2016-06-09 11:50:03 +03:00
Sebastian Dröge
47e6067b11 Update .po files 2016-06-09 11:12:07 +03:00
Sebastian Dröge
7ede8a334a po: Update translations 2016-06-09 10:04:18 +03:00
Sebastian Dröge
0c6afcbeb2 queue: Only unblock upstream waiting for the query once downstream is finished
... when flushing and deactivating pads. Otherwise downstream might have a
query that was already unreffed by upstream, causing crashes or other
interesting effects.

https://bugzilla.gnome.org/show_bug.cgi?id=763496
2016-05-20 09:04:45 +03:00
Sebastian Dröge
22166a9d5f pad: Improve IDLE probe docs
Make it explicit that the pad is only blocked while the callback is running,
and the pad will be unblocked again once the callback returned.

If BLOCK and IDLE behaviour is needed, both need to be used.

https://bugzilla.gnome.org/show_bug.cgi?id=766002
2016-05-19 22:12:49 +01:00
Sebastian Dröge
9dfcdec02b basesink/src: Post an error message if ::start() fails
The subclass should do that already, but just in case do it ourselves too as a
fallback. Without this, e.g. playbin will just wait forever if this fails
because it is triggered as part of an ASYNC state change.
2016-05-19 22:12:09 +01:00
Jan Schmidt
7c65287c03 bin: Fix EOS forwarding on PLAYING->PLAYING
When doing a transition from PLAYING to PLAYING, we will fail
to forward an EOS message on the bus, and noone else will ever
send it because there'll be no actual state changed message.

Allow EOS through directly in that case.
2016-05-16 20:58:13 +10:00
Sebastian Dröge
1592f5354b typefind: Only push a CAPS event downstream if the sinkpad is not in PULL mode
The other signal handlers of the type-found signal might have reactivated
typefind in PULL mode already, pushing a CAPS event at that point would cause
deadlocks and is in general unexpected by elements that are in PULL mode.

https://bugzilla.gnome.org/show_bug.cgi?id=765906
2016-05-12 09:26:14 +03:00
Sebastian Dröge
7eb494257c pad: Fix pad state when deactivating from one mode and then trying to activate another and failing
When activating a pad in PULL mode, it might already be in PUSH mode. We now
first try to deactivate it from PUSH mode and then try to activate it in PULL
mode. If the activation fails, we would set the pad to flushing and set it
back to its old mode. However the old mode is wrong, the pad is not in PUSH
mode anymore but in NONE mode.

This fixes e.g. typefind in decodebin reactivating PUSH/PULL mode if upstream
actually fails to go into PULL mode after first PUSHING data to typefind.
2016-05-11 09:45:06 +03:00
Guillaume Desmottes
89fac4e81b utils: fix element leak in find_common_root()
The root element was not unreffed when iterating over ancestors.

https://bugzilla.gnome.org/show_bug.cgi?id=765961
2016-05-06 09:48:14 +03:00
Sebastian Dröge
372ccb7943 manual: Fix buffer memory leak in appsrc example
g_signal_emit_by_name() is not like gst_app_src_push_buffer() due to reference
counting limitations of signals, it does *not* take ownership of the buffer.
2016-04-28 20:31:23 +03:00
Sebastian Dröge
95d6141112 datetime: Sanity check year, month and day when parsing ISO-8601 strings
Passing years > 9999, months > 12 or days > 31 to gst_date_time_new() will
cause an assertion and generally does not make much sense. Instead consider it
as a parsing error like hours > 24 and return NULL.
2016-04-26 09:41:45 +03:00
Sebastian Dröge
ab3362f13d Release 1.8.1 2016-04-20 18:09:16 +03:00
Sebastian Dröge
5b35653a5b Update .po files 2016-04-20 17:52:31 +03:00
Sebastian Dröge
a0d33523f9 po: Update translations 2016-04-20 15:29:15 +03:00