platform/upstream/gst-editing-services.git
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

5 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

5 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

5 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

5 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

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

5 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

5 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

5 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

5 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

5 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)

5 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.

5 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/

5 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

5 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

5 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.

5 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.

5 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.

5 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

5 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

5 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

5 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.

5 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.

5 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

5 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.

5 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

5 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.

5 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__

5 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

5 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

5 years agovalidate: Allow scenarios to set track types
Thibault Saunier [Fri, 28 Jun 2019 21:35:40 +0000 (17:35 -0400)]
validate: Allow scenarios to set track types

5 years agotests: Add ges-sample-path-recurse with projects location
Swayamjeet [Wed, 19 Jun 2019 10:22:21 +0000 (15:52 +0530)]
tests: Add ges-sample-path-recurse with projects location

So that project files are found when using nested timelines

5 years agovalidate: Add a way to use validate configs with scenarios
Thibault Saunier [Sun, 23 Jun 2019 17:03:54 +0000 (13:03 -0400)]
validate: Add a way to use validate configs with scenarios

Config files should have the-scenario-name.scenario.config to be picked automatically

5 years agovalidate: Use proper sink and give them good names
Thibault Saunier [Sun, 23 Jun 2019 17:03:04 +0000 (13:03 -0400)]
validate: Use proper sink and give them good names

5 years agovalidate: Create folders as needed when serializing timelines
Thibault Saunier [Sun, 23 Jun 2019 16:42:21 +0000 (12:42 -0400)]
validate: Create folders as needed when serializing timelines

5 years agonlesource: Wait for the seek to actualy happen before removing the probe
Thibault Saunier [Sun, 23 Jun 2019 03:49:50 +0000 (23:49 -0400)]
nlesource: Wait for the seek to actualy happen before removing the probe

Make sure that an event resulting from the seek happens before removing
the pad probe, dropping anything while it is not the case.

This guarantees that the seek happens before `nlesource` outputs
anything. This was not necessary as with decodebin or usual source
flushing seeks lead to synchronous flush_start/flush_stop and we could
safely assume that once the seek is sent, it was happenning.
With nested `nlecomposition` this assumption is simply not true as
in the composition seeks are basically cached and happen later in
the composition updating thread.

This fixes races where we ended up removing the blocking probe before
the seek actually started to be executed in the nlecomposition
nested inside an nlesource which leaded to data from *before* the seek
to be outputed which means we could display wrong frames,
and it was leading to interesting deadlocks.

5 years agonlecomposition: Minor debugging enhancements
Thibault Saunier [Sun, 23 Jun 2019 03:25:57 +0000 (23:25 -0400)]
nlecomposition: Minor debugging enhancements

5 years agouri-asset: Fix retrieving a relocated asset sync twice
Thibault Saunier [Fri, 21 Jun 2019 15:45:20 +0000 (11:45 -0400)]
uri-asset: Fix retrieving a relocated asset sync twice

Add a simple test for that.

5 years agotimeline: Make adding/removing track MT safe
Thibault Saunier [Fri, 21 Jun 2019 14:47:34 +0000 (10:47 -0400)]
timeline: Make adding/removing track MT safe

It was almost the case already so make it happen fully

5 years agonlecomposition: Ensure flushes after seek have the right seqnum
Thibault Saunier [Wed, 19 Jun 2019 22:14:52 +0000 (18:14 -0400)]
nlecomposition: Ensure flushes after seek have the right seqnum

Seeks that lead to a stack change lead to deactivating the current
stack. At that point we explicitely flush downstream as a reaction to
the flushing seek. Until now those flushes had a random seqnum, this
fails if we are a nested compostion as the parent composition will end
up dropping that flush which in turns might lead to deadlocks. For
example, the flush goes through a `compositor` which wants to flush
downstream to stop its srcpad task, but that flush wouldn't have
"released" its srcpad thread if the composition srcpad drops it, meaning
it won't be able to stop the task ever.

5 years agonlecomposition: Shutdown children when setting state to NULL
Thibault Saunier [Mon, 17 Jun 2019 22:23:43 +0000 (18:23 -0400)]
nlecomposition: Shutdown children when setting state to NULL

Otherwise if we shutdown a composition whith an nested composition
(inside a source in the test) and leak it, we end up with the nested
composition task still running (in READY) which is bad.

Add a test for that which leaks the pipeline on purpose.

5 years agonle: Parent the GstTask to ourself
Thibault Saunier [Mon, 17 Jun 2019 22:23:07 +0000 (18:23 -0400)]
nle: Parent the GstTask to ourself

This allows accessing the nlecomposition in gdb when a task is
'dangling' making debugging easier.

5 years agotests: Implement nested timelines tests
Swayamjeet [Tue, 11 Jun 2019 18:21:14 +0000 (23:51 +0530)]
tests: Implement nested timelines tests

5 years agonlecomposition: Properly set seqnum on flush events
Thibault Saunier [Mon, 17 Jun 2019 03:03:44 +0000 (23:03 -0400)]
nlecomposition: Properly set seqnum on flush events

5 years agotimeline: Drop ASYNC_/START/DONE messages
Thibault Saunier [Mon, 17 Jun 2019 03:00:31 +0000 (23:00 -0400)]
timeline: Drop ASYNC_/START/DONE messages

When we have nested timelines, we do not want those messages to pop
to the parent timelines as we handle the sequence ourself in the
timeline.

5 years agodemux: Create timeline from the streaming thread
Thibault Saunier [Sat, 15 Jun 2019 03:48:20 +0000 (23:48 -0400)]
demux: Create timeline from the streaming thread

First marshilling it to the main thread is dangerous as it is a blocking
operation and it should never happen there.

The asset cache is MT safe now so it is possible to load the timeline
from that thread directly

5 years agouri-asset: Implement multi threading support
Thibault Saunier [Mon, 17 Jun 2019 01:27:47 +0000 (21:27 -0400)]
uri-asset: Implement multi threading support

Making sure to have 1 GstDiscoverer per thread.

Use that new feature in gesdemux by loading the timeline directly from
the streaming thread. Modifying the timeline is not supported allowed
anyway.

5 years agonle: Add a seeking test for nested composition
Thibault Saunier [Sun, 9 Jun 2019 23:35:21 +0000 (19:35 -0400)]
nle: Add a seeking test for nested composition

5 years agoUse the new GstDiscoverer caching feature
Thibault Saunier [Fri, 7 Jun 2019 20:12:26 +0000 (16:12 -0400)]
Use the new GstDiscoverer caching feature

5 years agotimeline: Do not post upstream translated composition update messages
Thibault Saunier [Fri, 7 Jun 2019 20:06:39 +0000 (16:06 -0400)]
timeline: Do not post upstream translated composition update messages

In the case of nested timeline in the toplevel timeline we ended up
with CompositionUpdate for seeks sent by our own composition to
granchildren composition. This was not causing essential issues
if all tracks where containing nested timelines but in cases
where one of the tracks only had a nested timelines, then we
were waiting forever for a `CompositionUpdateDone`.

CompositionUpdate translated into ASYNC_START/ASYNC_DONE should
be kept inside the GESTimeline and not travel up (possibly to some
parent GESTimeline).

5 years agostructured-interface: Handle track-types in clip addition
Thibault Saunier [Fri, 7 Jun 2019 13:10:53 +0000 (09:10 -0400)]
structured-interface: Handle track-types in clip addition

The field was already expected in the launcher

5 years agoImplement and use the GstStream API
Thibault Saunier [Fri, 7 Jun 2019 03:19:38 +0000 (23:19 -0400)]
Implement and use the GstStream API

5 years agotimeline: Create stable stream IDs
Thibault Saunier [Thu, 6 Jun 2019 21:21:01 +0000 (17:21 -0400)]
timeline: Create stable stream IDs

5 years agodocs: Generate ges plugin doc
Thibault Saunier [Thu, 6 Jun 2019 19:40:57 +0000 (15:40 -0400)]
docs: Generate ges plugin doc

5 years agoplugins:ges: Factor out a GESBaseBin class
Thibault Saunier [Thu, 6 Jun 2019 17:51:45 +0000 (13:51 -0400)]
plugins:ges: Factor out a GESBaseBin class

And use it in both gesdemux and gessrc

5 years agogesdemux: Emit no-more-pad as required
Thibault Saunier [Thu, 6 Jun 2019 17:02:33 +0000 (13:02 -0400)]
gesdemux: Emit no-more-pad as required

5 years agonlecomposition: Respect seek seqnum in output EOS/SEGMENT
Thibault Saunier [Thu, 6 Jun 2019 16:46:08 +0000 (12:46 -0400)]
nlecomposition: Respect seek seqnum in output EOS/SEGMENT

Allowing a proper seek EOS handling with nested compositions

5 years agogesdemux: Properly combine flows
Thibault Saunier [Thu, 6 Jun 2019 15:26:45 +0000 (11:26 -0400)]
gesdemux: Properly combine flows