Commit graph

70 commits

Author SHA1 Message Date
Thibault Saunier 2d810bd7b7 formatter: Serialize source properties
This way we ensure that the TrackElement 'active' property is
properly serialized
2020-03-25 15:40:25 -03:00
Thibault Saunier f9f30c4ced ges: Add a way to set layer activeness by track
a.k.a muting layers.

Adding unit tests and making sure serialization works properly
2020-03-25 15:40:25 -03:00
Edward Hervey 0219631f5a xml-formatter: Free structure after usage
CID: 1416901
CID: 1439518
CID: 1439527
2019-11-20 07:52:56 +01:00
Henry Wilkes 6c3528fb4d xml-formatter: increase xges version to 0.6
Increase minor_version to 6 if a sub-project is saved under an asset or an asset includes a child stream-info element.
2019-09-23 18:49:42 +00:00
Henry Wilkes f19bf3edb4 xml-formatter: strip "caps" from the "properties" attribute of a track
element

We already have the separate "caps" attribute for xges track
elements, which is actually used in parsing.
2019-08-19 19:54:21 +00:00
Henry Wilkes bd3518abc5 xml-formatter: fix cb of ::error-loading-asset
Corrected typo that attached project_loaded_cb, rather than error_loading_asset_cb, to ::error-loading-asset, which meant data.error would be left unset if an error occurred in loading.
2019-08-19 19:20:31 +01:00
Sebastian Dröge 894df73011 ges-xml-formatter: Use g_filename_to_uri() instead of deprecated gst_uri_construct()
ges-xml-formatter.c: In function ‘_parse_asset’:
ges-xml-formatter.c:357:7: error: ‘gst_uri_construct’ is deprecated: Use 'gst_uri_new' instead [-Werror=deprecated-declarations]
  357 |       id = gst_uri_construct ("file", subproj_data->filename);
      |       ^~
2019-08-12 14:58:45 +00:00
Thibault Saunier 0d870428ed xml-formatter: Serialize DiscovererStreamInfo
We do not use it yet but it gives interesting information to
users
2019-07-26 14:23:55 -04:00
Thibault Saunier 955d177dd6 formatter: Plug lists of TimedValue leak 2019-07-26 13:48:52 -04:00
Thibault Saunier 2c9cbc6d06 formatter: Better document metadata registration
And fix xges mimetype to match typefind mimetype
2019-07-26 13:48:52 -04:00
Thibault Saunier 6c5a775a77 xml-formatter: Lower down borring debug to _LOG 2019-07-26 13:48:51 -04:00
Thibault Saunier a5fa2c35aa ges: Implement subprojects
Subprojects simply consist of adding the GESProject
to the main project asset list. Then those are recursively
serialized in the main project in the <asset> not, when deserializing,
temporary files are created and those will be used in clips
as necessary
2019-07-26 13:48:48 -04:00
Thibault Saunier 032200577a xml-formatter: Plug some leaks 2019-07-05 17:47:53 -04:00
Thibault Saunier 33cf9ec180 xml-formatter: Plug some leaks 2019-04-15 17:11:48 -04:00
Thibault Saunier aa2f29bad3 s/accured/occurred/g 2019-01-29 00:06:32 +00:00
Thibault Saunier d9f457c578 xml-formatter: Minor debug enhancement 2019-01-29 00:06:32 +00:00
Thibault Saunier 031803e947 xml-formatter: Do not forget to serialize clips metadata 2019-01-20 14:06:28 +00:00
Thibault Saunier 1f1b1c8cba xml-formatter: Serialize groups metadatas 2019-01-20 14:06:28 +00:00
Tim-Philipp Müller a7347ca8f7 WIP: ges: fix API export/import and 'inconsistent linkage' on MSVC
Export GES library API in headers when we're building the
library itself, otherwise import the API from the headers.

This fixes linker warnings on Windows when building with MSVC.

Fix up some missing config.h includes when building the lib which
is needed to get the export api define from config.h

Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/42
2018-12-15 00:14:51 +00:00
Sebastian Dröge ee7c2d07b8 ges: Fix compilation with latest GLib
g_clear_pointer() is now preserving the type of its arguments for the
free function.

ges-xml-formatter.c: In function ‘_dispose’:
ges-xml-formatter.c:1635:7: error: function called through a non-compatible type [-Werror]
       (GDestroyNotify) g_hash_table_unref);
/usr/include/glib-2.0/glib/gmem.h:121:8: note: in definition of macro ‘g_clear_pointer’
       (destroy) (_ptr);                                                        \
        ^~~~~~~

https://bugzilla.gnome.org/show_bug.cgi?id=797310
2018-10-22 08:14:28 +01:00
Thibault Saunier 13b8c8554d Update for g_type_class_add_private() deprecation in recent GLib 2018-09-05 22:57:27 -03:00
Thibault Saunier e4d4e0df1e formatter: Fix mixup in variable check 2018-07-29 16:26:49 -04:00
Thibault Saunier 2381090378 xml-formatter: Bump format version
Previous commit makes the format not forward compat.
2018-07-28 14:29:11 -04:00
Thibault Saunier bfb943be1b formatter: Serialize Transition border and invert properties
Marking them as children properties and properly allow serializing
clips children properties.

This doesn't handle several TrackElement of a same type with
different property values but this require more worked already
marked as fixme to allow specifying full path of elements in the
children properties API.

See https://gitlab.gnome.org/GNOME/pitivi/issues/1687
2018-07-28 14:25:07 -04:00
Edward Hervey 9a45d0ef85 ges: Fix a bunch of leaks
There are definitely more left, but don't have time for more debugging
2017-11-27 11:49:43 +01:00
Stefan Popa 6b67ff61ad xml-formatter: Save encoder and muxer advanced settings
Added support for saving/loading encoder and muxer advanced settings.

Differential Revision: https://phabricator.freedesktop.org/D1837
2017-08-26 11:20:42 -03:00
Thibault Saunier daca7acf96 xml-formatter: Serialize encoding profiles in reverse order
So they are reloaded in the right order.
2017-07-26 19:25:48 -04:00
Alexandru Băluț a63c754222 timeline: Make get_groups public
Had to separate timeline_emit_group_added from timeline_add_group
to avoid emitting group-added when the project is being loaded.

Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D1302
2016-09-13 16:47:24 -03:00
Thibault Saunier 219c8791e6 formatter: Prefix all children properties in the XML formatter
Otherwise it will fail on properties that are mandatorily prefixed
like the newly added deinterlacing properties
2016-05-06 18:28:01 -03:00
Thibault Saunier fa512ecdba Implement asset proxying support
API:
  ges_asset_set_proxy
  ges_asset_get_proxy
  ges_asset_list_proxies
  ges_asset_get_proxy_target

Differential Revision: https://phabricator.freedesktop.org/D504
2015-12-10 14:48:02 +01:00
Thibault Saunier fcf8d5382e formatter: Do not serialize top effect priorities
We just need to make sure they are always serialized in the right
order (which is the case) and de serializing them will lead to the
right behaviour.

We should not serialize the priority as the priority of the source
itself depends on the action having been done on the parent clip,
and we do not serialize the source priorities (and should not, GES
should just do the right thing).

Differential Revision: https://phabricator.freedesktop.org/D491
2015-11-04 21:13:07 +01:00
Justin Kim 0defd9a893 xml-formatter: handle dispose properly
Summary:
To dispose properly, a child object should call same function
of parent class.

Reviewers: thiblahute

Differential Revision: https://phabricator.freedesktop.org/D311
2015-10-01 16:26:05 +02:00
Justin Kim 61da5ad63c don't leaks caps and converted strings
Summary:
Valgrind reports trivial leakages related to handling
objects and their converted strings.

Reviewers: thiblahute

Differential Revision: https://phabricator.freedesktop.org/D303
2015-10-01 11:28:38 +02:00
Thibault Saunier 7f4f1b0a07 ges: Handle absolute GstDirectControlBindings 2015-07-03 11:20:54 +02:00
Thibault Saunier 241e809a81 ges: Enhance xges format versioning
Summary:
Handle the fact that some new features can be added and that means
generated files will not be fully understandable by older versions of
the formatter.

Make sure that we set the format version to 0.2 when we serialize the
GstEncodingProfile.enabled property.

Add some tests around that.

+ Fix a minor bug in the test-utils
+ Add a meta on the projects to tell in what format version a project
  has been serialized/parsed back

API:
  GES_META_FORMAT_VERSION

Depends on D178

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D184
2015-05-18 21:27:48 +02:00
Thibault Saunier 8558a03272 xml-formatter: De/serialize whether encoding profiles are enabled or not
Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D151
2015-05-14 11:15:00 +02:00
Thibault Saunier fd268f0387 element: Add a property allowing user to avoid serializing TimelineElements on demand 2014-11-10 17:03:46 +01:00
Thibault Saunier 5665e3abb1 xml-formatter: Serialize groups
They were not serialized until now.

That implies several changes:

* Override GESTimelineElement [start, inpoint, duration] properties in
  GESGroup to ensure that those properties are not serialized as they
  should not be.

* Rename GESBaseXmlContainer->clips field to
  GESBaseXmlContainer->containers as the hashtable now contains Groups

https://bugzilla.gnome.org/show_bug.cgi?id=709148
2014-11-10 16:22:43 +01:00
Thibault Saunier 24e2c88180 track-element: Add an API to list all set ControlBinding
API:
    ges_track_element_get_all_control_bindings
2014-11-10 16:22:40 +01:00
Thibault Saunier a022b4b394 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.
2014-11-10 16:22:40 +01:00
Joris Valette 84610050ae formatter: save and load source's children properties 2014-11-10 16:22:39 +01:00
Mathieu Duponchelle 0d2256b5bd xml-formatter: Set errno to 0 before g_ascii_strtoll. 2014-07-18 20:23:57 +02:00
Edward Hervey 8da506f931 xml-formatter: Don't leak children_props
By going through the cleanup code-path

CID #1212146
2014-05-13 14:30:39 +02:00
Thibault Saunier cf492d3839 ges-xml-formatter: fix memory leak
COVERTY CID 1212148
2014-05-10 22:45:34 +02:00
Thibault Saunier 9cbdfad546 ges-xml-formatter: fix memory leak in error path
COVERITY CID 1212147
2014-05-10 22:41:23 +02:00
Tim-Philipp Müller 6d68f55c63 ges-xml-formatter: fix memory leak in error path
CID 1212146
2014-05-09 13:00:32 +01:00
Thibault Saunier 1adb9a0030 Add a notion of 'name' in GESTimelineElement
https://bugzilla.gnome.org/show_bug.cgi?id=729382
2014-05-02 16:27:25 +02:00
Edward Hervey 73713c157d xml-formatter: Use proper value for string extraction
The pass would be filled with some bogus (pointer) numerical value

CID #1139652
2014-04-10 18:01:03 +02:00
MathieuDuponchelle 1fac84c7b9 xml-formatter: add support for restriction caps. 2013-09-25 23:54:49 +02:00
Thibault Saunier ec28489b84 formatter: Keep timeline duration as a meta 2013-09-13 20:37:58 -03:00