After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 727880 - Expose TitleSource children properties as any other child properties in a GESTrackElement
Expose TitleSource children properties as any other child properties in a GES...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-editing-services
git master
Other Linux
: Normal normal
: 1.5.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-09 08:02 UTC by Alex Băluț
Modified: 2015-06-24 14:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
title-source: Properly expose children properties (8.75 KB, patch)
2014-10-27 17:11 UTC, Thibault Saunier
committed Details | Review
title: Deprecate all method related to child properties (21.03 KB, patch)
2014-10-29 12:49 UTC, Thibault Saunier
committed Details | Review
trackelement: Add a lookup_child vnethod (8.34 KB, patch)
2014-10-29 12:49 UTC, Thibault Saunier
committed Details | Review

Description Alex Băluț 2014-04-09 08:02:39 UTC
In Pitivi when setting the text of a GESTitleClip object it's saved fine in the xges file. As we want to use the GESTitleSource instead of GESTitleClip, and deprecate GESTitleClip.set_text & co, we need to save and load the GESTitleSource objects as well.
Comment 1 Thibault Saunier 2014-10-27 16:31:22 UTC
That is not really true, we should still use GESTitleClip because this is how we are supposed to use GES API currently, but then, we should use the GESTitleSource API to set the various properties of the source.

Closing as NOTABUG.
Comment 2 Thibault Saunier 2014-10-27 17:10:24 UTC
OK, reopening it changing the title of the bug as it was not describing the problem properly
Comment 3 Thibault Saunier 2014-10-27 17:11:18 UTC
Created attachment 289472 [details] [review]
title-source: Properly expose children properties

+ Make sure that the TitleClip properties are not serialized anymore as
  they are serialized through children properties now.

+ Enhance debugging for not serialized properties in GESXmlFormatter.
Comment 4 Thibault Saunier 2014-10-29 12:49:10 UTC
Created attachment 289589 [details] [review]
title: Deprecate all method related to child properties

The standard way setting children properties is by using the
GESTrackElement::set_child_propery and friend methods
Comment 5 Thibault Saunier 2014-10-29 12:49:16 UTC
Created attachment 289590 [details] [review]
trackelement: Add a lookup_child vnethod

This method can be used for subclass to override the default behaviour
for child lookup. This vmethod can be used for example in the case where
you want the name of a child property to be 'overriden'.

As an ex example in the GESTitleSource where we have a videotestsrc
which has a 'foreground-color' property that is used in the TitleSource
to set the background color of the title, this vmethod is now used to
tweak the name passed has parametter to rename "background" to
"foreground-backend" making our API understandable.

API:
  GESTrackElement::lookup_child
Comment 6 Mathieu Duponchelle 2014-10-29 12:57:59 UTC
Review of attachment 289472 [details] [review]:

OK

::: ges/ges-title-source.c
@@ -142,3 @@
 ges_title_source_create_source (GESTrackElement * object)
 {
-  GESTitleSource *self = GES_TITLE_SOURCE (object);

ain't no need to move that ?

::: ges/ges-xml-formatter.c
@@ +782,3 @@
+  }
+
+  return TRUE;

far more readable, cool
Comment 7 Mathieu Duponchelle 2014-10-29 12:58:40 UTC
Review of attachment 289589 [details] [review]:

OK, didn't read in details to be honest :)
Comment 8 Mathieu Duponchelle 2014-10-29 13:01:05 UTC
Review of attachment 289590 [details] [review]:

OK

::: ges/ges-track-element.c
@@ +136,3 @@
+  names = g_strsplit (prop_name, "::", 2);
+  if (names[1] != NULL) {
+    classename = names[0];

classe ?
Comment 9 Thibault Saunier 2014-10-29 15:13:29 UTC
Review of attachment 289590 [details] [review]:

::: ges/ges-track-element.c
@@ +136,3 @@
+  names = g_strsplit (prop_name, "::", 2);
+  if (names[1] != NULL) {
+    classename = names[0];

It is "la class" :P
Comment 10 Thibault Saunier 2014-10-29 15:16:35 UTC
Review of attachment 289472 [details] [review]:

::: ges/ges-title-source.c
@@ -142,3 @@
 ges_title_source_create_source (GESTrackElement * object)
 {
-  GESTitleSource *self = GES_TITLE_SOURCE (object);

I prefer to have:

1- Declarations without assignations
2- Declarations with assignations

Just a details
Comment 11 Thibault Saunier 2014-11-10 16:26:50 UTC
Attachment 289589 [details] pushed as 1906435 - title: Deprecate all method related to child properties