platform/upstream/gst-editing-services.git
4 years agoges: Call the right ->set_child_property vmethod
Thibault Saunier [Wed, 19 Feb 2020 18:31:28 +0000 (15:31 -0300)]
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.

4 years agoges: Deprecate the GESTimeline::track field
Thibault Saunier [Tue, 18 Feb 2020 19:31:15 +0000 (16:31 -0300)]
ges: Deprecate the GESTimeline::track field

It is not MT safe to access it, and user should use the proper getter

4 years agoges: Set default caps for GESVideoTrack
Thibault Saunier [Tue, 18 Feb 2020 19:09:55 +0000 (16:09 -0300)]
ges: Set default caps for GESVideoTrack

By default, video track output full HD@30fps, this makes the behaviour
of clip position much more understandable and guarantess that we
always have a framerate.

The user can modify the values whenever he wants

4 years agoframepositioner: Stop lying about the source size
Thibault Saunier [Thu, 20 Feb 2020 15:28:59 +0000 (12:28 -0300)]
framepositioner: Stop lying about the source size

Basically we were advertising that the source size would be the
size of the track if it hadn't been defined by end user, but since
we started to let scaling happen in the compositor, this is not true
as the source size is now the natural size of the underlying video
stream.

Remove the unit test and reimplemented using a validate scenario which
make the test much simpler to read :=)

4 years agovalidate: Add action types to set/check various child properties at once
Thibault Saunier [Thu, 20 Feb 2020 15:27:37 +0000 (12:27 -0300)]
validate: Add action types to set/check various child properties at once

And add a way to take into account control bindings.

4 years agoges: Allow setting children property using the set_object_arg format
Thibault Saunier [Thu, 20 Feb 2020 15:22:19 +0000 (12:22 -0300)]
ges: Allow setting children property using the set_object_arg format

This make it much simpler for the user to set enum values and should not cause any issue

4 years agoges: Plug leaks in new ges-launch and related
Thibault Saunier [Thu, 20 Feb 2020 20:13:46 +0000 (17:13 -0300)]
ges: Plug leaks in new ges-launch and related

4 years agovalidate: Port to the new REPORT_ACTION API
Thibault Saunier [Tue, 25 Feb 2020 20:38:15 +0000 (17:38 -0300)]
validate: Port to the new REPORT_ACTION API

4 years agonlesource: When standalone consider object.duration==0 as not set
Thibault Saunier [Wed, 19 Feb 2020 02:08:53 +0000 (23:08 -0300)]
nlesource: When standalone consider object.duration==0 as not set

nleobject.duration defaults to 0, but this is pretty unintuitive for
end user in the case nlesource is use standalone, just consider
duration=0 equivalent to duration=GST_CLOCK_TIME_NONE as it makes
the element much simpler to use, we could actually forbid 0 as a value
in the future.

Also take into account potential CLOCK_TIME_NONE

4 years agoges: Avoid adding unnecessary converters for nested timelines
Thibault Saunier [Mon, 10 Feb 2020 21:05:38 +0000 (18:05 -0300)]
ges: Avoid adding unnecessary converters for nested timelines

Basically we know that if we are using mixing, compositor will be
able to do video conversion and scaling for us, so avoid adding those
usless elements.

This optimizes a lot caps negotiation for deeply nested timelines.

4 years agoplugins:ges: Fix pushing tags after e8c782d119eccf364fa24812cdc90c40f60d65d6
Thibault Saunier [Mon, 10 Feb 2020 21:00:33 +0000 (18:00 -0300)]
plugins:ges: Fix pushing tags after e8c782d119eccf364fa24812cdc90c40f60d65d6

Basically the tags we send before STREAM_START are now ignored, meaning
that we could not detect nested timelines anymore, this commits makes
sure that we send our tag event after getting pushing STREAM_START.

4 years agonlecomposition: Optimize prerolling when using nested compositions
Thibault Saunier [Thu, 6 Feb 2020 19:42:25 +0000 (16:42 -0300)]
nlecomposition: Optimize prerolling when using nested compositions

When a composition is nested into anotherone, we *know* that the
toplevel composition is going to send a stack initializing seek,
we can thus avoid sending it on the subcomposition itself when
prerolling. This avoid seeking roundtrips and we now have one and
only one seek travelling in the overall pipeline (after it has
prerolled).

4 years agonlesource: Fix seeks when used standalone
Thibault Saunier [Thu, 6 Feb 2020 15:43:57 +0000 (12:43 -0300)]
nlesource: Fix seeks when used standalone

The 'start' of nleobject is in the 'composition' scale, inpoint is in
the media scale, when outside a composition, a nleobject->start value
doesn't mean anything.

4 years agonle: Seek the whole stack on initialization
Thibault Saunier [Thu, 6 Feb 2020 15:39:12 +0000 (12:39 -0300)]
nle: Seek the whole stack on initialization

Instead of seeking each nleobject separately to setup new stack, wait
for the whole stack to preroll and then seek that newly setup stack,
leading to the same code path and seek 'tweaking' as when processing
a seek on the composition (without stack changes).

This is mandatory to properly handle filter that tweak segments to handle
time remapping for example.

4 years agonle: Minor typo fixes
Thibault Saunier [Thu, 6 Feb 2020 15:37:37 +0000 (12:37 -0300)]
nle: Minor typo fixes

4 years agovalidate: Allow overriding ges-launch options through scenarios
Thibault Saunier [Tue, 4 Feb 2020 20:07:39 +0000 (17:07 -0300)]
validate: Allow overriding ges-launch options through scenarios

In 99c45d42cfd1cafb658b63abf0b506db20167499 we allowed setting
track-types but in the end we could do it generically using the
following synthax in the scenario 'properties' metadata:

`ges-options={--track-types=video,--disable-mixing}`

4 years agoges: Ignore deprecation of GParameter
Thibault Saunier [Fri, 7 Feb 2020 12:39:39 +0000 (09:39 -0300)]
ges: Ignore deprecation of GParameter

GParameter is part of our API, and for GLib < 2.54 we do not even have
a way around avoiding it (namely `g_object_new_with_properties`).

We should stop using GParameter once we depend on GLib 2.54.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/86

4 years agoges: Use G_DEPRECATE to mark deprecated methods
Thibault Saunier [Tue, 20 Aug 2019 21:46:09 +0000 (17:46 -0400)]
ges: Use G_DEPRECATE to mark deprecated methods

Cleanup a few things on the way.

And move ges-track-element deprecations to a dedicated header file

4 years agoges-source-clip: fixed return of duration setter
Henry Wilkes [Sat, 14 Dec 2019 17:04:54 +0000 (17:04 +0000)]
ges-source-clip: fixed return of duration setter

In general, brought the behaviour of the `start`, `duration` and
`inpoint` setters in line with each other. In particular:
1. fixed return value the GESSourceClip `duration` setter
2. changed the GESClip `start` setter
3. fixed the inpoint callback for GESContainer
4. changed the type of `res` in GESTimelineElement to be gint to
   emphasise that the GES library is using the hack that a return of -1
   from klass->set_duration means no notify signal should be sent out.

Also added a new test for clips to ensure that the setters work for
clips within and outside of timelines, and that the `start`, `inpoint`
and `duration` of a clip will match its children.

4 years agopipeline: Ensure that encodebin enforces a single segment sent to encoders
Thibault Saunier [Thu, 5 Dec 2019 17:23:04 +0000 (14:23 -0300)]
pipeline: Ensure that encodebin enforces a single segment sent to encoders

4 years agovalidate: Move to the new GstValidateEncodingTestInterface API
Thibault Saunier [Fri, 4 Oct 2019 12:58:17 +0000 (09:58 -0300)]
validate: Move to the new GstValidateEncodingTestInterface API

4 years agoxml-formatter: Free structure after usage
Edward Hervey [Wed, 20 Nov 2019 06:52:56 +0000 (07:52 +0100)]
xml-formatter: Free structure after usage

CID: 1416901
CID: 1439518
CID: 1439527

4 years agoformatter: Free path object after usage
Edward Hervey [Wed, 20 Nov 2019 06:46:47 +0000 (07:46 +0100)]
formatter: Free path object after usage

As it's done everywhere else

CID: 1455511

4 years agomeson: Fix disabling of the python support
Nirbheek Chauhan [Thu, 7 Nov 2019 11:24:32 +0000 (16:54 +0530)]
meson: Fix disabling of the python support

Cannot call python.dependency() if the python module was not found.

4 years agoDon't pass default GLib marshallers for signals
Niels De Graef [Thu, 29 Aug 2019 05:45:45 +0000 (07:45 +0200)]
Don't pass default GLib marshallers for signals

By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.

4 years agomarker: add color meta
Henry Wilkes [Wed, 16 Oct 2019 18:26:55 +0000 (19:26 +0100)]
marker: add color meta

Support optionally coloring markers by reserving GES_META_MARKER_COLOR
for an ARGB guint.

4 years agometa-container: add register_static_meta
Henry Wilkes [Wed, 16 Oct 2019 12:40:57 +0000 (13:40 +0100)]
meta-container: add register_static_meta

Allows us to register a static meta without having to set a value.

4 years agometa-container: move comment
Henry Wilkes [Wed, 16 Oct 2019 10:37:23 +0000 (11:37 +0100)]
meta-container: move comment

The comment that was above _register_meta is actually meant for
_set_value.

4 years agoges-launch: Document timeline description format under --help
Thibault Saunier [Wed, 23 Oct 2019 14:04:01 +0000 (16:04 +0200)]
ges-launch: Document timeline description format under --help

Making it simpler for user to get the documentation

4 years agomarker-list: Use proper parameters names even in the docs
Rico Tzschichholz [Tue, 22 Oct 2019 20:51:41 +0000 (22:51 +0200)]
marker-list: Use proper parameters names even in the docs

Otherwise there will be parameters with hyphen in their name in the GIR.

4 years agonlecomposition: Enhance dumping stack output
Thibault Saunier [Tue, 22 Oct 2019 11:30:36 +0000 (13:30 +0200)]
nlecomposition: Enhance dumping stack output

4 years agoges: Handle empty marker lists
Thibault Saunier [Tue, 22 Oct 2019 10:21:04 +0000 (12:21 +0200)]
ges: Handle empty marker lists

4 years agovalidate: Tear down pipeline when openning a new project
Thibault Saunier [Tue, 22 Oct 2019 09:53:36 +0000 (11:53 +0200)]
validate: Tear down pipeline when openning a new project

Avoiding potential deadlock when we remove tracks on a playing pipeline

4 years agoges: Fix setting GError when adding children to containers
Thibault Saunier [Tue, 22 Oct 2019 09:50:02 +0000 (11:50 +0200)]
ges: Fix setting GError when adding children to containers

We were misusing assertion and not properly setting the GError value

4 years agosmart-video-mixer: Handle segment updates
Thibault Saunier [Tue, 22 Oct 2019 09:31:04 +0000 (11:31 +0200)]
smart-video-mixer: Handle segment updates

We were basically ignoring any segment update which could potentially
lead to setting a wrong stream time leading to wrong alpha value
being used.

4 years agolauncher: Enhance printed output
Thibault Saunier [Thu, 17 Oct 2019 14:30:49 +0000 (16:30 +0200)]
launcher: Enhance printed output

4 years agolauncher: Use the output URI extension to set encoding format
Thibault Saunier [Thu, 17 Oct 2019 14:21:28 +0000 (16:21 +0200)]
launcher: Use the output URI extension to set encoding format

And print a description of the encoding profile.

4 years agopipeline: Be smarter about how we match encoding profiles and tracks
Thibault Saunier [Thu, 17 Oct 2019 14:19:11 +0000 (16:19 +0200)]
pipeline: Be smarter about how we match encoding profiles and tracks

4 years agomeson: build gir even when cross-compiling if introspection was enabled explicitly
Tim-Philipp Müller [Thu, 17 Oct 2019 23:50:16 +0000 (00:50 +0100)]
meson: build gir even when cross-compiling if introspection was enabled explicitly

This can be made to work in certain circumstances when
cross-compiling, so default to not building g-i stuff
when cross-compiling, but allow it if introspection was
enabled explicitly via -Dintrospection=enabled.

See gstreamer/gstreamer#454 and gstreamer/gstreamer#381

4 years agomarker-list: add prev position to ::marker-moved
Henry Wilkes [Wed, 16 Oct 2019 15:40:27 +0000 (16:40 +0100)]
marker-list: add prev position to ::marker-moved

Additionally give the previous marker position in the
GESMarkerList::marker-moved signal, since a user may want to know
where a move was from.

Also, fixed the documentation for GESMarkerList::marker-added

https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/78

4 years agoRemove autotools build system
Tim-Philipp Müller [Sun, 13 Oct 2019 12:37:11 +0000 (13:37 +0100)]
Remove autotools build system

Todo:
 - hook up data/completions/ges-launch-1.0 in Meson (#77)

4 years agoges: Hide internal debug category behind a GOnce
Sebastian Dröge [Tue, 1 Oct 2019 15:02:27 +0000 (18:02 +0300)]
ges: Hide internal debug category behind a GOnce

Otherwise it might be used (e.g. by the plugin loader via the GES
plugin!) before ges_init() is called.

4 years agogesdemux: Initialize debug category before first using it
Sebastian Dröge [Tue, 1 Oct 2019 15:01:21 +0000 (18:01 +0300)]
gesdemux: Initialize debug category before first using it

Prevents critical warnings during class_init()

4 years agoproject: Add missing safe guard when listing assets
Thibault Saunier [Mon, 23 Sep 2019 19:10:59 +0000 (16:10 -0300)]
project: Add missing safe guard when listing assets

4 years agolaunch: Add an option to embed nested timelines when saving
Thibault Saunier [Mon, 23 Sep 2019 19:07:58 +0000 (16:07 -0300)]
launch: Add an option to embed nested timelines when saving

4 years agoxml-formatter: increase xges version to 0.6
Henry Wilkes [Mon, 19 Aug 2019 13:38:12 +0000 (14:38 +0100)]
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.

4 years agotests: Fix transition project tests
Thibault Saunier [Fri, 23 Aug 2019 21:26:51 +0000 (17:26 -0400)]
tests: Fix transition project tests

Basically the test project was plain broken as it had fully overlapping
clips is prohibited since the timeline edition API was reimplemented.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/62

4 years agoasset: Fix asset cache for CLips and TrackElement with same ID
Thibault Saunier [Wed, 21 Aug 2019 18:41:46 +0000 (14:41 -0400)]
asset: Fix asset cache for CLips and TrackElement with same ID

We clearly uniquely identify assets by both their IDs and their
extractable type, and we should make sure that you can have a
TrackElement and a Clip with the same ID.

There is one exception in our implementation which is GESFormatter
because we treat their subclasses as 1 type with different IDs.

4 years agoges: Expose ges mixer to be used as effects
Thibault Saunier [Sat, 17 Aug 2019 15:59:38 +0000 (11:59 -0400)]
ges: Expose ges mixer to be used as effects

4 years agoges: Add support for EffectClip assets
Thibault Saunier [Sat, 17 Aug 2019 15:59:02 +0000 (11:59 -0400)]
ges: Add support for EffectClip assets

4 years agobuild: also suppress unused-function warnings about g_autoptr
Matthew Waters [Wed, 28 Aug 2019 08:13:06 +0000 (18:13 +1000)]
build: also suppress unused-function warnings about g_autoptr

../plugins/ges/gesdemux.c:50:1: error: unused function 'glib_autoptr_cleanup_GESDemux' [-Werror,-Wunused-function]
G_DECLARE_FINAL_TYPE (GESDemux, ges_demux, GES, DEMUX, GESBaseBin);
^
/home/matt/Projects/cerbero/build/dist/android_universal/x86_64/include/glib-2.0/gobject/gtype.h:1401:3: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  _GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, ParentName)                                               \
  ^
/home/matt/Projects/cerbero/build/dist/android_universal/x86_64/include/glib-2.0/glib/gmacros.h:451:22: note: expanded from macro '_GLIB_DEFINE_AUTOPTR_CHAINUP'
  static inline void _GLIB_AUTOPTR_FUNC_NAME(ModuleObjName) (ModuleObjName **_ptr) {                     \
                     ^
/home/matt/Projects/cerbero/build/dist/android_universal/x86_64/include/glib-2.0/glib/gmacros.h:441:43: note: expanded from macro '_GLIB_AUTOPTR_FUNC_NAME'
#define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName
                                          ^
<scratch space>:81:1: note: expanded from here
glib_autoptr_cleanup_GESDemux
^

../plugins/ges/gessrc.c:56:1: error: unused function 'glib_autoptr_cleanup_GESSrc' [-Werror,-Wunused-function]
G_DECLARE_FINAL_TYPE (GESSrc, ges_src, GES, SRC, GESBaseBin);
^
/home/matt/Projects/cerbero/build/dist/android_universal/x86_64/include/glib-2.0/gobject/gtype.h:1401:3: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  _GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, ParentName)                                               \
  ^
/home/matt/Projects/cerbero/build/dist/android_universal/x86_64/include/glib-2.0/glib/gmacros.h:451:22: note: expanded from macro '_GLIB_DEFINE_AUTOPTR_CHAINUP'
  static inline void _GLIB_AUTOPTR_FUNC_NAME(ModuleObjName) (ModuleObjName **_ptr) {                     \
                     ^
/home/matt/Projects/cerbero/build/dist/android_universal/x86_64/include/glib-2.0/glib/gmacros.h:441:43: note: expanded from macro '_GLIB_AUTOPTR_FUNC_NAME'
#define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName
                                          ^
<scratch space>:158:1: note: expanded from here
glib_autoptr_cleanup_GESSrc
^

4 years agoges: fix G_DECLARE_FINAL_TYPE -Werror with clang
Thibault Saunier [Tue, 27 Aug 2019 14:02:04 +0000 (10:02 -0400)]
ges: fix G_DECLARE_FINAL_TYPE -Werror with clang

Also fix wrong casing the `G_DECLARE` for GESDemux.

../subprojects/gst-editing-services/plugins/ges/gessrc.c:56:1: warning: unused function 'GES_SRC' [-Wunused-function]
G_DECLARE_FINAL_TYPE (GESSrc, ges_src, GES, SRC, GESBaseBin);
^
/usr/include/glib-2.0/gobject/gtype.h:1405:33: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) {                                     \
                              ^
<scratch space>:39:1: note: expanded from here
GES_SRC
^
../subprojects/gst-editing-services/plugins/ges/gessrc.c:56:1: warning: unused function 'GES_IS_SRC' [-Wunused-function]
/usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) {                                         \
                        ^
<scratch space>:42:1: note: expanded from here
GES_IS_SRC
^

../subprojects/gst-editing-services/plugins/ges/gesdemux.c:50:1: warning: unused function 'GES_Demux' [-Wunused-function]
G_DECLARE_FINAL_TYPE (GESDemux, ges_demux, GES, Demux, GESBaseBin);
^
/usr/include/glib-2.0/gobject/gtype.h:1405:33: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) {                                     \
                              ^
<scratch space>:72:1: note: expanded from here
GES_Demux
^
../subprojects/gst-editing-services/plugins/ges/gesdemux.c:50:1: warning: unused function 'GES_IS_Demux' [-Wunused-function]
/usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) {                                         \
                        ^
<scratch space>:75:1: note: expanded from here
GES_IS_Demux
^

4 years agoges/timeline: remove unused function get_toplevel_container
Matthew Waters [Tue, 27 Aug 2019 03:52:52 +0000 (13:52 +1000)]
ges/timeline: remove unused function get_toplevel_container

Fixes -Werror build with clang:

../subprojects/gst-editing-services/ges/ges-timeline.c:695:1: warning: unused function 'get_toplevel_container' [-Wunused-function]
get_toplevel_container (gpointer element)
^

4 years agodoc: Update cache and fix usage of <ulink>
Thibault Saunier [Fri, 23 Aug 2019 16:36:38 +0000 (12:36 -0400)]
doc: Update cache and fix usage of <ulink>

4 years agomarkerlist: implement GESMarkerList
Millan Castro [Thu, 22 Aug 2019 16:50:00 +0000 (18:50 +0200)]
markerlist: implement GESMarkerList

Co-authored by Mathieu Duponchelle <mathieu@centricular.com>

4 years agogesdemux: Fix querying if we need stack reloading
Thibault Saunier [Tue, 20 Aug 2019 19:29:12 +0000 (15:29 -0400)]
gesdemux: Fix querying if we need stack reloading

We are probing upstream queries, not downstream ones

This was clearly a small test that slipt into previous commit

4 years agoxml-formatter: strip "caps" from the "properties" attribute of a track
Henry Wilkes [Fri, 16 Aug 2019 16:41:17 +0000 (17:41 +0100)]
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.

4 years agoxml-formatter: fix cb of ::error-loading-asset
Henry Wilkes [Mon, 19 Aug 2019 15:35:49 +0000 (16:35 +0100)]
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.

4 years agoTest that gst_structure_get succeeds to ensure gchar *restriction is
Henry Wilkes [Thu, 15 Aug 2019 16:32:12 +0000 (17:32 +0100)]
Test that gst_structure_get succeeds to ensure gchar *restriction is
actually set before reading it.
Warn if no caps are returned by gst_caps_from_string.

4 years agostructured-interface: Properly error out when a child property could not be set
Thibault Saunier [Wed, 14 Aug 2019 19:48:46 +0000 (15:48 -0400)]
structured-interface: Properly error out when a child property could not be set

4 years agotests:nle: Unref the bus before unrefing the pipeline
Thibault Saunier [Mon, 12 Aug 2019 21:37:39 +0000 (17:37 -0400)]
tests:nle: Unref the bus before unrefing the pipeline

Aiming at fixing a rare race condition where we get:

    ../subprojects/gstreamer/libs/gst/check/gstcheck.c:1258:F:nlecomposition:test_seek_on_nested:0: nested_src0_0x1a1a310 is not destroyed, 1 refcounts left!

The idea is that there might have a remaining GstMessage
with the nested_src as `message.src` on the bus that has
yet to be processed in some conditions leading to a reference
still existing when unrefing the pipeline.

4 years agoges-xml-formatter: Use g_filename_to_uri() instead of deprecated gst_uri_construct()
Sebastian Dröge [Mon, 12 Aug 2019 14:17:53 +0000 (17:17 +0300)]
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);
      |       ^~

4 years agoFix old-style C function declarations
Sebastian Dröge [Mon, 12 Aug 2019 14:16:44 +0000 (17:16 +0300)]
Fix old-style C function declarations

ges-uri-asset.c: In function ‘create_discoverer’:
ges-uri-asset.c:53:1: error: old-style function definition [-Werror=old-style-definition]
   53 | create_discoverer ()
      | ^~~~~~~~~~~~~~~~~
ges-uri-asset.c: In function ‘get_discoverer’:
ges-uri-asset.c:67:1: error: old-style function definition [-Werror=old-style-definition]
   67 | get_discoverer ()
      | ^~~~~~~~~~~~~~
  CC       libges_1.0_la-ges-auto-transition.lo
ges-asset.c: In function ‘_get_type_entries’:
ges-asset.c:489:1: error: old-style function definition [-Werror=old-style-definition]
  489 | _get_type_entries ()
      | ^~~~~~~~~~~~~~~~~

4 years agodoc: Add some missing Since:
Thibault Saunier [Mon, 12 Aug 2019 13:49:45 +0000 (09:49 -0400)]
doc: Add some missing Since:

4 years agoproject: Properly handle NULL project asset ID
Thibault Saunier [Mon, 12 Aug 2019 01:20:21 +0000 (21:20 -0400)]
project: Properly handle NULL project asset ID

4 years agostructured: Enhance error message when no clip duration set
Thibault Saunier [Wed, 31 Jul 2019 01:24:07 +0000 (18:24 -0700)]
structured: Enhance error message when no clip duration set

4 years agostructured-interface: Avoid setting invalid clip duration
Thibault Saunier [Wed, 31 Jul 2019 01:22:18 +0000 (18:22 -0700)]
structured-interface: Avoid setting invalid clip duration

4 years agotrack: Add a getter for restriction_caps
Thibault Saunier [Wed, 17 Jul 2019 01:51:10 +0000 (21:51 -0400)]
track: Add a getter for restriction_caps

4 years agolaunch: Set user restriction caps even when loading projects
Thibault Saunier [Sun, 14 Jul 2019 01:27:46 +0000 (21:27 -0400)]
launch: Set user restriction caps even when loading projects

4 years agotrack: Enhance restriction capsfilter name
Thibault Saunier [Sun, 14 Jul 2019 01:26:35 +0000 (21:26 -0400)]
track: Enhance restriction capsfilter name

4 years agoxml-formatter: Serialize DiscovererStreamInfo
Thibault Saunier [Sat, 13 Jul 2019 17:25:48 +0000 (13:25 -0400)]
xml-formatter: Serialize DiscovererStreamInfo

We do not use it yet but it gives interesting information to
users

4 years agoformatter: Plug lists of TimedValue leak
Thibault Saunier [Fri, 12 Jul 2019 20:15:35 +0000 (16:15 -0400)]
formatter: Plug lists of TimedValue leak

4 years agoformatter: Better document metadata registration
Thibault Saunier [Fri, 5 Jul 2019 13:40:57 +0000 (09:40 -0400)]
formatter: Better document metadata registration

And fix xges mimetype to match typefind mimetype

4 years agodoc: Do not require the GStreamer cache generator
Thibault Saunier [Thu, 4 Jul 2019 20:51:54 +0000 (16:51 -0400)]
doc: Do not require the GStreamer cache generator

4 years agogesdemux: Compute sinkpad caps based on formatter mimetypes
Thibault Saunier [Thu, 4 Jul 2019 19:58:44 +0000 (15:58 -0400)]
gesdemux: Compute sinkpad caps based on formatter mimetypes

Implement lazy loading asset cache so gesdemux use the formatters
assets while GES hasn't been initialized.

And set extensions to temporary files as some formatters require
the information (otio)

4 years agoformatter: Add a method to retrieve the best formatter for a givent URI
Thibault Saunier [Thu, 4 Jul 2019 00:15:23 +0000 (20:15 -0400)]
formatter: Add a method to retrieve the best formatter for a givent URI

Uses the file extension as hint falling back to the default formatter
if none is found

Make use of that function in when saving a project and not formatter
is specified.

4 years agoImplement a formatter based on [OpenTimelineIO]
Thibault Saunier [Tue, 5 Feb 2019 18:46:49 +0000 (15:46 -0300)]
Implement a formatter based on [OpenTimelineIO]

[OpenTimelineIO]: http://opentimeline.io/

4 years agoformatter: Handle coma separated extensions in formatter metas
Thibault Saunier [Fri, 19 Apr 2019 13:07:44 +0000 (09:07 -0400)]
formatter: Handle coma separated extensions in formatter metas

4 years agoformatter: Duplicate const gchar* for metadatas
Thibault Saunier [Mon, 11 Mar 2019 22:25:23 +0000 (19:25 -0300)]
formatter: Duplicate const gchar* for metadatas

4 years agoproject: Expose the ges_project_add_formatter method
Thibault Saunier [Tue, 5 Feb 2019 19:08:10 +0000 (16:08 -0300)]
project: Expose the ges_project_add_formatter method

This method is useful when implementing a formatter outside
GES that end up converting to xges and uses the default formatter
to finally load the timeline.

4 years agoMark nested timeline assets as such
Thibault Saunier [Thu, 11 Jul 2019 20:23:47 +0000 (16:23 -0400)]
Mark nested timeline assets as such

Adding a property to let the application know

Also make sure that the duration of nested timeline assets is reported
as CLOCK_TIME_NONE as those are extended as necessary.

And make a difference between asset duration and their max duration
As nested timelines can be extended 'infinitely' those max duration
is GST_CLOCK_TIME_NONE, but their duration is the real duration of
the timeline.

4 years agoformatter: Enhance error reporting
Thibault Saunier [Thu, 11 Jul 2019 19:54:27 +0000 (15:54 -0400)]
formatter: Enhance error reporting

And add a "loading-error" signal in GESProject so we can report
issue when loading async elements for the timeline.

4 years agoxml-formatter: Fix loading sources
Thibault Saunier [Thu, 11 Jul 2019 19:43:47 +0000 (15:43 -0400)]
xml-formatter: Fix loading sources

And fix the project file which couldn't be load now that we
properly check clips coherency

4 years agogesdemux: Add a testsrc to timelines if parent nleobject duration is too long
Thibault Saunier [Wed, 10 Jul 2019 23:36:21 +0000 (19:36 -0400)]
gesdemux: Add a testsrc to timelines if parent nleobject duration is too long

4 years agoges:validate: Properly error when editing container fails
Thibault Saunier [Wed, 10 Jul 2019 16:06:01 +0000 (12:06 -0400)]
ges:validate: Properly error when editing container fails

4 years agonle: Handle nested timelines update when file changes
Thibault Saunier [Wed, 10 Jul 2019 15:02:07 +0000 (11:02 -0400)]
nle: Handle nested timelines update when file changes

When we have nested timelines, we need to make sure the underlying
formatted file is reloaded when commiting the main composition to
take into account the new timeline.

In other to make the implementation as simple as possible we make
sure that whenever the toplevel composition is commited, the decodebin
holding the gesdemux is torn down so that a new demuxer is created
with the new content of the timeline.

To do that a we do a NleCompositionQueryNeedsTearDown query to which
gesdemux answers leading to a full nlecomposition stack
deactivation/activation cycle.

4 years agoges:validate: Add a way to execute actions on serialized timelines
Thibault Saunier [Wed, 10 Jul 2019 14:15:31 +0000 (10:15 -0400)]
ges:validate: Add a way to execute actions on serialized timelines

This way we can modify nested timelines.

4 years agoges: Implement our own idle_add which uses the thread local maincontext
Thibault Saunier [Tue, 9 Jul 2019 05:03:56 +0000 (01:03 -0400)]
ges: Implement our own idle_add which uses the thread local maincontext

4 years agovalidate: Allow passing 'uri' to 'load-project'
Thibault Saunier [Tue, 9 Jul 2019 04:28:29 +0000 (00:28 -0400)]
validate: Allow passing 'uri' to 'load-project'

The action type was thought to allow that but it wasn't implemented.

4 years agoxml-formatter: Lower down borring debug to _LOG
Thibault Saunier [Tue, 9 Jul 2019 04:07:16 +0000 (00:07 -0400)]
xml-formatter: Lower down borring debug to _LOG

4 years agoproject: Use asset ID as URI if possible
Thibault Saunier [Tue, 9 Jul 2019 04:05:21 +0000 (00:05 -0400)]
project: Use asset ID as URI if possible

It was making no sense to consider it an empty timeline when the user
had passed the project URI when requesting the asset. Usually user
use `ges_project_new` with the URI but it is also valid to use
`ges_asset_request` with the uri as ID so let's handle that properly.

4 years agopython: Add a better asset __repr__
Thibault Saunier [Mon, 8 Jul 2019 23:25:32 +0000 (19:25 -0400)]
python: Add a better asset __repr__

4 years agoges: Implement subprojects
Thibault Saunier [Mon, 8 Jul 2019 00:55:53 +0000 (20:55 -0400)]
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

4 years agoproject: Fix our asset cache
Thibault Saunier [Mon, 8 Jul 2019 00:35:14 +0000 (20:35 -0400)]
project: Fix our asset cache

It was not talking into account the fact that you can have
several assets with a same ID but different exactractable types.

5 years agoasset: Handle trying to proxy an asset to itself
Thibault Saunier [Sun, 14 Jul 2019 20:28:23 +0000 (16:28 -0400)]
asset: Handle trying to proxy an asset to itself

And avoid infinite recursion

5 years agogesdemux: Detect recursively loading the same project file
Thibault Saunier [Wed, 3 Jul 2019 16:10:24 +0000 (12:10 -0400)]
gesdemux: Detect recursively loading the same project file

And error out when it is the case.

5 years agogesdemux: Create proper stream-ids
Thibault Saunier [Wed, 3 Jul 2019 16:09:23 +0000 (12:09 -0400)]
gesdemux: Create proper stream-ids

5 years agonle: Check seeking on deeply nested composition
Thibault Saunier [Wed, 3 Jul 2019 14:10:42 +0000 (10:10 -0400)]
nle: Check seeking on deeply nested composition

5 years agotrack: Disable last gap by default
Thibault Saunier [Sat, 29 Jun 2019 00:19:49 +0000 (20:19 -0400)]
track: Disable last gap by default

And let the GESPipeline logic handle that

5 years agonlecomposition: Drop all group-done but the last one
Thibault Saunier [Sat, 29 Jun 2019 00:19:20 +0000 (20:19 -0400)]
nlecomposition: Drop all group-done but the last one