Instead of linking pygstminiobject.c into all the modules,
we can link it only into _gst and export the symbols for
the other modules. This fixes bug #590348 because now the
class key/id is common for all modules as a side-effect.
Also makes the modules smaller.
It seems pygst_value_from_pyobject should not unref the passed
in object. Wrap the original pygst_value_from_pyobject in a function
that converts unicode python objects and then unrefs the temporary
object after extraction into a GValue.
Setting gst.TAG_TRACK_NUMBER was failing because GStreamer
expects a uint while Python object -> GValue conversion was
giving an int. gst_tag_to_vorbis_comment was wrapped so
this conversion could be tested and failed on properly.
The way to properly fix this issue was in fact to disable the registry
scanning when we import gst from the python plugin loader since...
we are 100% guaranteed this is being called from a registry scan :)
Those two lines will never be called, because caps2 will always be NULL
if we go to error (either we haven't used it yet (first goto and in this
case it's NULL), or.. it's NULL (second goto)).
This means that we take a completely new caps for the sole usage of
gst-python. The GstCaps return by gst_static_pad_template_get_caps() are
(surprise) static and therefore will always exist... as long as the
GstStaticPadTemplate (and the factory providing it) still exist.
This solves the case of getting the caps of a static pad template *before*
any element was created using the GstElementFactory. When the factory is
used to create an element, a new factory is created, replacing the old one,
and plainly discarding any static values (including those caps).
This behaviour is symmetrical to what we do at the very beginning (incrementing
the Python refcount of the wrapper object and decrementing the C refcount of the
actual object).
Original commit message from CVS:
* gst/pygstiterator.c: (pygst_iterator_new):
* testsuite/test_iterator.py:
Raise an Exception when wrapping a NULL GstIterator.
Fixes#566903
Original commit message from CVS:
patch by: Vincent GENIEUX <mutex at runbox dot com>
* gst/gststructure.override:
Don't leak key names in _wrap_gst_structure_keys.
Original commit message from CVS:
Patch by : Vincent Genieux <mutex at runbox dot com>
* gst/arg-types.py:
Fix memory leak for GstMiniObjects used as parameters in class method
overrides.
Fixes#543961
Original commit message from CVS:
* gst/gstpad.override:
Fix memory leak for functions that return a newly created buffer as
a function argument.
Fixes#554545
Original commit message from CVS:
* codegen/argtypes.py:
Add handling of 'keep-refcount' for GBoxed arguments.
* gst/gst.defs:
Mark the appropriate 'gst_message_new_*' arguments when the method
takes the ownership of the passed gst.Structure/gst.TagList
* testsuite/test_message.py:
Test for creating messages that take a gst.Structure/gst.TagList as
argument and make sure they're properly created.
Fixes#556054
Original commit message from CVS:
reviewed by: Edward Hervey <edward.hervey@collabora.co.uk>
* gst/__init__.py:
Fix on systems that don't have dlopen or don't support RTLD_GLOBAL and
RTLD_LAZY.
Original commit message from CVS:
Patch by: Thiemo Seufer <ths at networkno dot de>
* gst/__init__.py:
Use correct values for RTLD_GLOBAL and RTLD_LAZY on Linux/MIPS
as the values are different there from all other Linux platforms.
Fixes bug #553134.
Original commit message from CVS:
Patch by: Alexander Wirt <formorer at debian dot org>
* gst/__init__.py:
Import modules in the correct order, i.e. libxml2 before
GStreamer stuff, to prevent unresolved symbols. Fixes bug #553131.
Original commit message from CVS:
* gst/gstcaps.override:
Override gst_caps_append_structure() and make a copy of the structure
given as argument.
Fixes#549450
Original commit message from CVS:
* gst/gst-0.10.15.ignore:
* gst/gst-types.defs:
* gst/gst.defs:
Add gstdebugutils.[ch] methods that weren't wrapped previously.
We can now dump pipeline graphviz files from python ! :)
Original commit message from CVS:
* gst/gstbuffer.override:
the GstBuffer overrides seem to be confused about whether they're
mini-objects or a GBoxed, and it makes copy_on_write no actually
return a usable gst.Buffer. Fix up places where GstBuffers are
treated as GBoxed to use pygstminiobject functions.
Makes gst.Buffer('blah').copy_on_write() work.
* testsuite/test_buffer.py:
Add test for copy-on-write writability
* examples/buffer-draw.py:
Add an example of drawing on a GStreamer buffer with cairo
* gst/gstpad.override:
Make function static
Original commit message from CVS:
* gst/gstevent.override:
gst_event_new_tag takes ownership of the GstTagList given
as argument, therefore make a copy before calling the
C function.
Fixes#534888
Original commit message from CVS:
Patch by: Jan Schmidt <thaytan at mad dot scientist dot com>
* gst/__init__.py:
Make gst.Fraction simplify like the C counterpart
Fixes#532809
Original commit message from CVS:
Patch by: Johan Dahlin <johan at gnome dot org>
* gst/__init__.py:
* gst/gstelement.override:
* testsuite/test_element.py:
New 'fancy' constructor for gst.Element, allows creating elements in a
more pythonic way (i.e. myelement = gst.Element("oggmux")).
Fixes#530417
Original commit message from CVS:
Patch by: Alessandro Decina <alessandro at nnva dot org>
* gst/gstelementfactory.override:
Release GIL in gst_element_factory_overrides.
Fixes#529731