When registering a new debug category after gst_init(), simply check
the existing patterns against that new category.
No need to iterate over all categories and recheck them all against
the existing patterns.
Also, no need to re-parse the existing pattern string set via GST_DEBUG
and add the same set of match patterns all over again to the existing
list of match patterns every time we register a new debug category.
Combined with iterating all debug categories on a change this would
make adding debug categories after gst_init() very very very slow.
The check for dropping precision was wrong when sxx and syy were negative.
if they are negative then "G_MAXINT64 - val" would always overflow
The check was meant to use G_MININT64 (like in the loop contained just
after).
The following could happen previously:
* T1: calls gst_pad_set_active()
* T2: currently (de)activating it
* T1: gst_pad_set_active() returns, caller assumes that the pad has
completed the requested (de)activation ... whereas it is not
the case since the actual (de)activation in T2 might still be
going on.
To ensure atomicity of pad (de)activation, we use a internal
variable (and cond) to ensure only one thread at a time goes through
the actual (de)activation block
https://bugzilla.gnome.org/show_bug.cgi?id=790431
checking whether we already were in the target GstPadMode was being
done too early and there was the risk that we *would* end up
(de)activating a pad more than once.
Instead, re-do the check for pad mode when entering the final pad
(de)activation block.
https://bugzilla.gnome.org/show_bug.cgi?id=790431
Without the former, event changes (e.g. setting a pad offset) does not
take effect for the current buffer but only for the next one. Without
the latter, non-blocking event probes would not see any updated events
yet.
The gst_uri_construct function was escaping the location string
as a generic uri string. This is incorrect since the slash('/')
characters are reserved for use in this exact case. The patch
changes the escape_string function mode to handle the path correctly.
In 1.14 this function will be deprecated.
https://bugzilla.gnome.org/show_bug.cgi?id=783787
It is possible to use gst_deinit() without registering the base
classes. For example, when using gst_init_get_option_group() and
call the program with an invalid parameter. In that case,
gst_deinit() will lead to a segmentation fault, since there is a
dereference to a pointer that is null.
This patch validates if the type is non-null before dereferencing
it.
https://bugzilla.gnome.org/show_bug.cgi?id=781914
Use g_object_new() instead which nowadays has a shortcut for the
no-properties check. It still does an extra GType check in the
function guard, but there's a pending patch to remove that
and it's hardly going to be a performance issue in practice,
even less so on a system that's compiled without run-time checks.
Alternative would be to move to the new g_object_new_properties()
with a fallback define for older glib versions, but it makes the
code look more unwieldy and doesn't seem worth it.
Fixes deprecation warnings when building against newer GLib versions.
https://bugzilla.gnome.org/show_bug.cgi?id=780903
They were (signed!) gint64 before because of G_GINT64_CONSTANT() already
and they are actually used in signed calculations.
With this change we at least ensure that an integer type of the correct
size is used for GI (it was using gint before).
The issue happens when the structure is printed by the logging
subsystem: the object is included in the log, and this will cause the
full object printout to be done there. However, after dispose, the queue
was already cleared, so the access to it (to print the object) would
assert, as the queue was already freed. The patch changes it so that the
queue is merely empty, and only freed in _finalize.
https://bugzilla.gnome.org/show_bug.cgi?id=776293
A paramspec validation should modify the content to match what the spec
requires and return TURE if a modification happened. This previous
implementation would only fix the first element of the array and return.
It was also return TRUE for empty array, while no modification was
needed.
https://bugzilla.gnome.org/show_bug.cgi?id=780111
The GST_TYPE macro points to global variables initialized by the
first call to get_type. This is not an issue if you call gst_init()
but unfortunatly pygi will need to acces the param type before
init can be called. This removes an assertion.
Those aren't suppose to be called from multiple thread, but all
fundamental get_type() function are thread safe. Fix it to
be consistent and it may help if we change the typing mechanism
in GStreamer come day.
This is to help bindings access properties of type GST_TYPE_ARRAY.
This function will get/set the property and convert form/to
GValueArray.
New API:
gst_util_set_object_array
gst_util_get_object_array
https://bugzilla.gnome.org/show_bug.cgi?id=753754
This adds a binding friendly interface to get and set arrays
and list into GstStructure.
New API:
- gst_structure_set_array
- gst_structure_set_list
- gst_structure_get_array
- gst_structure_get_list
https://bugzilla.gnome.org/show_bug.cgi?id=753754
When registering GstParamSpecArray, use the gst_value_array_get_type()
function to get the type, rather than the GST_TYPE_ARRAY macro, which
gets it from the _gst_value_array_type, which is in turn only
initialised during gst_init()
Fixes criticals with (python) bindings that look up all the
types from the gobject-introspection info as soon as they
are imported.
/usr/lib64/python3.5/site-packages/gi/module.py:178: Warning: g_param_type_register_static: assertion 'g_type_name (pspec_info->value_type) != NULL' failed
g_type = info.get_g_type()
/usr/lib64/python3.5/site-packages/gi/module.py:212: Warning: g_type_get_qdata: assertion 'node != NULL' failed
type_ = g_type.pytype
/usr/lib64/python3.5/site-packages/gi/module.py:226: Warning: g_type_get_qdata: assertion 'node != NULL' failed
g_type.pytype = wrapper
/usr/lib64/python3.5/site-packages/gi/module.py:226: Warning: g_type_set_qdata: assertion 'node != NULL' failed
g_type.pytype = wrapper