Commit graph

12 commits

Author SHA1 Message Date
Thibault Saunier
e7b2570c39 python: Cleanup overrides using monkey patching
Following the PyGObject guidelines[0], this starts monkey patching
overridden elements instead of subclassing them.

[0]: https://pygobject.readthedocs.io/en/latest/devguide/override_guidelines.html#python-override-guidelines
2020-03-03 21:34:23 +00:00
Thibault Saunier
3b182342e0 python: Add a Timeline.iter_clips() helper to iterate clips 2020-03-02 19:14:01 -03:00
Thibault Saunier
c802a40a96 ges: Call the right ->set_child_property vmethod
We used to always call the `->set_child_property` virtual method
of the object that `ges_timeline_element_set_child_property` was called
from, but that means that, in the case of referencing GESContainer
children properties from its children, the children wouldn't know
what child property have been set, and the children override wouldn't
be takent into account, in turns, it means that the behaviour could be
different in the setter depending on parent the method was called,
which is totally unexpected.

We now make sure that the vmethod from the element that introduced the
child property is called whatever parent method is called, making the
behaviour more uniform.

Fix the python override to make sure that new behaviour is respected.
2020-02-26 13:36:30 -03:00
Thibault Saunier
2c08770cf0 python: Add a better asset __repr__ 2019-07-26 13:48:51 -04:00
Thibault Saunier
9b2cdbb355 overrides: Make sure overrides are in hierarchy order
Otherwise method order resolution will not be correct
2019-05-23 18:54:42 -04:00
Thibault Saunier
4ded3b8838 python: Avoid warning about using deprecated methods
Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/69
2019-05-04 10:47:27 -04:00
Thibault Saunier
2ab26ab306 ges: Move ges_container_edit to GESTimelineElement
Now that the notion of layer has been moved down to #GESTimelineElement
(through the new #ges_timeline_element_get_layer_priority method), this
method make much more sense directly in the base class.
2019-05-01 12:24:30 -04:00
Thibault Saunier
fe1595aef1 python: Implement TimelineElement.__repr__ 2019-03-15 23:51:55 +00:00
Thibault Saunier
a3c1734316 python:overrides: Remove spurious print 2018-07-08 16:09:46 -04:00
Thibault Saunier
db827dbd00 python: Fix GES.Timelineset_child_property
Implementing it in the overrides as PyGObject won't be able to properly
convert python values to GValues in some cases. Using
g_object_set_property works as some logic is implemented inside
PyGObject for that particular case. This is a "regression" due
to https://bugzilla.gnome.org/review?bug=769789&attachment=348766 were
we end up with an OverflowError while setting G_TYPE_UINT children
properties.
2018-07-08 16:02:28 -04:00
Thibault Saunier
c22e2dcfac python: Do not initialize GES at import time 2013-08-26 17:41:14 -04:00
Thibault Saunier
df4040a106 bindings: Start implementing overrides for python 2012-12-19 18:59:48 -03:00