Since the default number of max unused threads in GThreadPool has been
changed from 0 to 2 it needs to be set to 0 to stop all threads or
valgrind will report them as memory leaks.
Before this patch gst_init would intercept --help, causing for example
cheese's --help to look like this:
[hans@shalem cheese]$ cheese --help
Usage:
cheese [OPTION...] - GStreamer initialization
Help Options:
-h, --help Show help options
--help-all Show all help options
--help-gst Show GStreamer Options
gst_init is the only gfoo_init function which does this.
https://bugzilla.gnome.org/show_bug.cgi?id=702089
These are meant to specify features in caps that are required
for a specific structure, for example a specific memory type
or meta.
Semantically they could be though of as an extension of the media
type name of the structures and are handled exactly like that.
The function init_pre() in gstreamer/gst/gst.c calls setlocale(LC_ALL, ""),
which sets the locale to the values specified in the environment. This is
wrong for two reasons:
1. It is absolutely not the task of a library to decide on the correct locale
for a program. Some programs change the locale for various (good or bad)
reasons, and libraries should respect that. Programs where GStreamer's
overwriting of the locale causes bugs include Emacs [1, 2], Sublime Text [3],
and Lua [4].
[1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12392
[2] http://bugzilla.novell.com/show_bug.cgi?id=779426
[3] http://www.sublimetext.com/forum/viewtopic.php?f=3&t=8543
[4] https://github.com/pavouk/lgi/issues/19
Note that setting the locale can cause problems for programs that are not even
linked against GStreamer. In the case of Emacs, for example, GStreamer seems
to be initialized through GTK via libcanberra.
2. Setting the locale is not thread-safe, and therefore should not be done in a
library.
https://bugzilla.gnome.org/show_bug.cgi?id=685650
This is because we need to be able to signal different TOCs
to downstream elements such as muxers and the application,
and because we need to send both types as events (because
the sink should post the TOC messages for the app in the
end, just like tag messages are now posted by the sinks),
and hence need to make TOC events multi-sticky.
https://bugzilla.gnome.org/show_bug.cgi?id=678742
The linking behaviour of external variables that are not initialized
in the compilation unit where they are defined is undefined. On OS X
this causes a linking failure when statically linking GStreamer.
Also register queries with a QueryType that allows us to check if the event is
sent in the right direction. Add a serialized query type because we will need
this for the allocation query.
Remove the QueryTypeDefinition stuff, it is not used anymore and we now use
custom queries and separate API for them.
Update defs.
Remove trace, we use debug log for that
Make alloc trace simpler, removing some methods.
Activate alloc trace with a GST_TRACE=3 environment variable.
Dump leaked objects atexit.
Provide an offset in the object where the GType can be found so that more
verbose info can be given for objects.
Remove -T option from gst-launch because tracing is now triggered with the
environment variable.
We introduced our own when GLib didn't want to add a GType
for GError. But now that there is one, we can use GLib's
unconditionally and remove our version.
There are many good use cases for GstIndex and we want
to add it back again in some form, but possibly not with
the current API, which is very powerful (maybe too powerful),
but also a bit confusing. At the very least we'd need to
make the API bindings-friendly.
Add a GstControlBinding class. This is a preparation for making the
controlsources generate double valued control curves and do the gparamspec
mapping in the control binding. Now the API in GstObject is again mostly
for convenience.