Late g_thread_init() is fine with newer GLib versions and done automatically
from g_type_init() there, so don't warn if the application hasn't called
g_thread_init() yet when gst_init() is called with new GLib versions.
Fixes#608398.
If we force -DG_THREADS_MANDATORY onto apps, then g_thread_supported()
will always evaluate to TRUE, so the typical thread initialisation
boilerplate code if (!g_thread_supported()) g_thread_init(NULL); will
no longer work, and the threading system not be initialised and us
printing a warning in gst_init. This may be fine in most cases, since
late initialisation is allowed and automatically done in g_type_init()
since GLib 2.23.2, but let's be cautious and only use this define when
compiling GStreamer itself.
See #608398.
Refactor the code to take the current start_time when going to PAUSED.
Make sure we also call the start_time update code after we chained up to the
parent bin.
Fixes#607842
The stream status message object may be of a non-GObject type, e.g.
G_TYPE_POINTER (see GstAudioSrc), so print that properly instead
of assuming the value holds an object.
When we receive an UNEXPECTED flowreturn from downstream, we must not shutdown
the pushing thread because upstream will at some point push an EOS that we still
need to push further downstream.
To achieve this, convert the UNEXPECTED return value to OK. Add a fixme so that
we implement the right logic to propagate the flowreturn upstream at some point.
Also clean up the unit test a little.
Fixes#608136
Add an option to automatically remove the temp file (TRUE by default). This
should make it possible for the application to keep the temp file by other means
than hardlinking or holding an fd open.
Fixes#607739
If the GST_PLUGIN_SCANNER environment variable is set, we should try
the scanner specified there first, to make sure the right scanner binary
is used for uninstalled setups and builds from source when there's
already an installed version.
We require threads to be supported in any case and defining this
will simplify the mutex, condition variable, etc. macros from gthread
to not always check if threads are really supported.
Fixes bug #607481.
For the reason outlined at the beginning of gst_private.h (inline
functions in glib may need the g_log_domain variable). Also include
gst_private.h before using any G_OS_* defines, esp. in plugin loader.
This check is not necesarry as we are not negotiating anymore. And it can
be wrong if upstream can't produce this caps anymore, but downstream can
process them fine.
All callers of this static function already check for NULL-ness
themselves, so no need to do it again (and if we do it, we should
probably do so before dereferencing the pointer for the first time).
Avoid checking the GType of the value twice (once on our side and
once in g_value_get_*()) by by-passing g_value_get() and accessing
the GValue structure directly.
Fix link to gst-uninstalled now that it's been moved, and fix a typo
while we're at it. Also add a new section to 'Building GStreamer from
git' that points to the 'How do I develop against an uninstalled copy
of GStreamer' section.
Strings in the binary registry are NUL-terminated, so we can just use them
directly if we only need them temporarily, and avoid unnecessary mallocs
and frees.
Add a method to perform get_range typefinding that also uses the
uri/location extension as an extra hint. It will first try to call the
typefind functions of the factories that handle the given extension. The result
is that in the common case, we only call one typefind function, which speeds up
the typefinding a lot.
Protect the ->removed field with the object lock as well. Take the DYN lock
earlier so that we can mark the pad removed and avoid a race in pad_alloc.
Fixes#606435