Commit graph

16928 commits

Author SHA1 Message Date
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
Sebastian Dröge
81446d9071 baseparse: Remember if we interpolated DTS from PTS and refresh it whenever we update the PTS
Otherwise PTS and DTS will come out of sync if upstream continues to provide
PTS and not DTS, and we have to skip some data from the stream or PTS are not
exactly increasing with the duration of each packet.

https://bugzilla.gnome.org/show_bug.cgi?id=765260
2016-04-20 13:10:20 +03:00
Carlos Rafael Giani
9b0f16df0a multiqueue: Recheck buffering status after changing low threshold
https://bugzilla.gnome.org/show_bug.cgi?id=763757
2016-04-15 19:17:17 +03:00
Carlos Rafael Giani
d1d9fca1e2 multiqueue: Recalculate fill level after changing high-threshold
This ensures the following special case is handled properly:

1. Queue is empty
2. Data is pushed, fill level is below the current high-threshold
3. high-threshold is set to a level that is below the current fill level

Since mq->percent wasn't being recalculated in step #3 properly, this
caused the multiqueue to switch off its buffering state when new data is
pushed in, and never post a 100% buffering message. The application will
have received a <100% buffering message from step #2, but will never see
100%.

Fix this by recalculating the current fill level percentage during
high-threshold property changes in the same manner as it is done when
use-buffering is modified.

https://bugzilla.gnome.org/show_bug.cgi?id=763757
2016-04-15 19:17:17 +03:00
Sebastian Dröge
bfafe7b582 baseparse: When initializing DTS from PTS, remember that we did so
If we don't store the value in prev_dts, we would over and over again
initialize the DTS from the last known upstream PTS. If upstream only provides
PTS every now and then, then this causes DTS to be rather static.

For example in adaptive streaming scenarios this means that all buffers in a
fragment will have exactly the same DTS while the PTS is properly updated. As
our queues are now preferring to do buffer fill level calculations on DTS,
this is causing huge problems there.

See https://bugzilla.gnome.org/show_bug.cgi?id=691481#c27 where this part of
the code was introduced.

https://bugzilla.gnome.org/show_bug.cgi?id=765096
2016-04-15 16:02:52 +03:00
Edward Hervey
b34b7752f4 queue: Use full running time for level calculation
Ensures we have proper time level estimation for the cases where
the incoming buffers have PTS/DTS outside of the segment start/stop
values.

https://bugzilla.gnome.org/show_bug.cgi?id=762995
2016-03-29 10:27:27 +03:00
Stian Selnes
14461df2d3 pad: Fix race between gst_element_remove_pad and state change
When going from READY to NULL all element pads are deactivated. If
simultaneously the pad is being removed from the element with
gst_element_remove_pad() and the pad is unparented, there is a race
where the deactivation will assert (g_critical) if the parent is lost at
the wrong time.

The proposed fix will check parent only once and retain it to avoid the
race.

https://bugzilla.gnome.org/show_bug.cgi?id=761912
2016-03-29 10:27:14 +03:00
Sebastian Dröge
0e10799b80 valve: Fix unit test by sending caps before buffers
Unexpected critical/warning: gstpad.c:4400:gst_pad_push_data:<'':src> Got data flow before segment event

https://bugzilla.gnome.org/show_bug.cgi?id=763753
2016-03-25 12:06:14 +02:00
Havard Graff
5da7e3dc8b valve: don't send sticky events as a direct response to upstream events
Also refactor the existing valve test to actually test the valve,
and not just test the EOS mechanism of a pad.

https://bugzilla.gnome.org/show_bug.cgi?id=763753
2016-03-25 12:00:02 +02:00
Sebastian Dröge
1979aa5934 typefind: Remove redundant assignment
CID 1357158
2016-03-24 13:40:54 +02:00
Sebastian Dröge
1abf889ddd Release 1.8.0 2016-03-24 11:49:08 +02:00
Sebastian Dröge
3ed5734dd8 Update .po files 2016-03-24 11:35:26 +02:00
Anthony G. Basile
d6e25ddedd 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-03-23 14:48:16 +02:00
Sebastian Dröge
d7c8ce0947 preset: Use GST_PRESET_PATH as an extension of the system path, not a replacement of the user path
First load all system presets, then all from the environment variable, then
from the app directory, then from the user directory. Any one in the chain
with the highest version completely replaces all previous ones, later ones
with lower versions are merged in without replacing existing presets.

This is basically the same behaviour as before, just that GST_PRESET_PATH is
inserted as another source of directories between the system and app presets.

It was added in ca08af1f17, but was
accidentially overriding the user preset path there. Which caused inconsistent
behaviour as new presets were still stored in the system path, just not loaded
from there. Meaning you could store a new preset (in the user path), just for
GstPreset to not find it anymore later (because it only looked in the
GST_PRESET_PATH instead of the user path).

https://bugzilla.gnome.org/show_bug.cgi?id=764034
2016-03-22 19:32:48 +02:00
Aurélien Zanelli
94036e86c0 utils: add 'transfer full' annotation to gst_pad_peer_query_caps
https://bugzilla.gnome.org/show_bug.cgi?id=763912
2016-03-21 10:23:53 +02:00
Aurélien Zanelli
b7cffa4522 pad: add 'transfer full' and 'nullable' annotations to gst_pad_get_current_caps
and also change the description accordingly since function returns an
incremented caps object or NULL if there is no caps set.

https://bugzilla.gnome.org/show_bug.cgi?id=763912
2016-03-21 10:23:53 +02:00
Ben Iofel
53f2fb93e8 utils: fix gir annotation for gst_element_query_convert()
https://bugzilla.gnome.org/show_bug.cgi?id=763895
2016-03-18 20:35:27 +00:00
Jan Schmidt
146e219d83 tests: Check multiqueue not-linked EOS handling
Add a test which checks that not-linked pads continue
to output data after linked pads have gone EOS

https://bugzilla.gnome.org/show_bug.cgi?id=763770
2016-03-18 21:21:44 +11:00
Jan Schmidt
c9b6848885 multiqueue: Fix not-linked pad handling at EOS
Ensure that not-linked pads will drain out at EOS by
correctly detecting the EOS condition based on the EOS
pad flag (which indicates we actually pushed an EOS),
and make sure that not-linked pads are woken when doing
EOS processing on linked pads.

https://bugzilla.gnome.org/show_bug.cgi?id=763770
2016-03-18 21:21:44 +11:00
Romain Picard
20859af3f2 typefind: Allow caps query in "have-type" signal handlers
If an application calls gst_pad_query_caps from its "have-type" signal handler,
then the query fails because typefind->caps has not been set yet.

This patch sets typefind->caps in the object method handler, before the signal
handlers are called.

https://bugzilla.gnome.org/show_bug.cgi?id=763491
2016-03-15 18:58:06 +02:00
Sebastian Dröge
b6859ed71f Release 1.7.91 2016-03-15 11:56:10 +02:00
Sebastian Dröge
18a56b9b23 Update .po files 2016-03-15 11:44:03 +02:00
Sebastian Dröge
d7a1ff8b7e po: Update translations 2016-03-15 11:39:42 +02:00
Sebastian Dröge
57bbd18471 typefind: Store caps on the pad before emitting have-type but send it downstream only in the default signal handler
https://bugzilla.gnome.org/show_bug.cgi?id=763491
2016-03-14 13:07:49 +02:00
Sebastian Dröge
87c0513569 baseparse: Recheck after pre_push_frame() if there are tags pending
Many parsers are storing tags only in pre_push_frame(), if we wouldn't check
afterwards we would push buffers before those tags and a lot of code assumes that
tags are available before preroll.

https://bugzilla.gnome.org/show_bug.cgi?id=763553
2016-03-14 12:23:29 +02:00
Carlos Rafael Giani
46573a27da concat: Fix comment typo 2016-03-14 12:23:12 +02:00
Sebastian Dröge
a15fca1934 Revert "typefind: Store caps on the pad before emitting have-type but send it downstream only in the default signal handler"
This reverts commit 0835c3d656.

It causes deadlocks in decodebin, which currently would deadlock if the caps
are already on the pad in have-type and are forwarded while copying the sticky
events (while holding the decodebin lock)... as that might cause the next
element to expose pads, which then calls back into decodebin and takes the
decodebin lock.

This needs some more thoughts.
2016-03-12 12:57:47 +02:00
Sebastian Dröge
0835c3d656 typefind: Store caps on the pad before emitting have-type but send it downstream only in the default signal handler
https://bugzilla.gnome.org/show_bug.cgi?id=763491
2016-03-12 11:56:49 +02:00
Carlos Rafael Giani
f70dc95c35 docs: Flesh out element and object macro accessor docs a bit
https://bugzilla.gnome.org/show_bug.cgi?id=763213
2016-03-10 10:07:07 +00:00
Sebastian Dröge
b2a111c19d netclientclock: Remove some obsolete code that can cause warnings 2016-03-09 16:07:27 +02:00
Sebastian Dröge
7124e56bb5 netclientclock: Don't reset calibration of internal clock whenever a new netclient clock is created
https://bugzilla.gnome.org/show_bug.cgi?id=763325
2016-03-09 15:38:53 +02:00
Víctor Manuel Jáquez Leal
c1f2775dcb gstbuffer: fix GstParentBufferMeta GType name
The alias define GST_TYPE_PARENT_BUFFER_META_API_TYPE is wrong and
breaks the usage of gst_buffer_get_parent_buffer_meta().

This patch fixes the GType alias and make another alias to keep the API
compatibility guarded by GST_DISABLE_DEPRECATED.

Also added a unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=763112
2016-03-07 12:02:00 +01:00
Sebastian Dröge
c904e00661 tracerrecord: Remove useless NULL check and add assertion for making assumptions explicit
gst_structure_new_empty() is not returning NULL in any valid scenarios,
checking for NULL here is useless. Especially because we would dereference any
NULL right after the NULL check again.
CID 1352037.

We previously check if the string ends on .class, as such strrchr() should
return something non-NULL. Add an assertion for that.
CID 1349642.
2016-03-02 10:37:09 +02:00
Tim-Philipp Müller
c7734d2711 element: minor docs fix
Make gtk-doc happy.
2016-03-01 19:50:26 +00:00
Sebastian Dröge
e505e1e6cd Release 1.7.90 2016-03-01 18:14:03 +02:00
Sebastian Dröge
79bf9c4126 po: Update translations 2016-03-01 16:52:41 +02:00
Sebastian Dröge
82e529cea5 Revert "bus: change GstBusSource to hold a weak ref to GstBus"
This reverts commit 894c67e642.
2016-02-29 23:33:03 +02:00
Sebastian Dröge
90b1b1dd96 Revert "bus: Make sure to remove the GPollFD from the GSources when destroying the bus"
This reverts commit 05700a7082.
2016-02-29 23:32:58 +02:00
Sebastian Dröge
01b2476d36 element: Remove GST_STATE_LOCK_FULL() / UNLOCK_FULL()
There is no corresponding API for that in GLib and nobody could've ever used
these macros without compiler errors anyway.
2016-02-29 17:07:26 +02:00