Commit graph

3085 commits

Author SHA1 Message Date
Thibault Saunier
1e488d4311 launcher: Use the output URI extension to set encoding format
And print a description of the encoding profile.
2019-10-21 10:25:25 +00:00
Thibault Saunier
5234885c8a pipeline: Be smarter about how we match encoding profiles and tracks 2019-10-21 10:25:25 +00:00
Tim-Philipp Müller
b9307eaac1 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
2019-10-18 00:50:16 +01:00
Henry Wilkes
cab4a52dde 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
2019-10-16 17:58:15 +01:00
Tim-Philipp Müller
0c96b9dd10 Remove autotools build system
Todo:
 - hook up data/completions/ges-launch-1.0 in Meson (#77)
2019-10-13 13:54:19 +01:00
Sebastian Dröge
1d12f0b1a1 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.
2019-10-02 08:52:57 +03:00
Sebastian Dröge
eabfd98e6d gesdemux: Initialize debug category before first using it
Prevents critical warnings during class_init()
2019-10-01 18:01:21 +03:00
Thibault Saunier
e0f8b54a03 project: Add missing safe guard when listing assets 2019-09-30 12:58:24 +00:00
Thibault Saunier
29f25c6c43 launch: Add an option to embed nested timelines when saving 2019-09-30 12:58:24 +00: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
Thibault Saunier
d3e2cf55e3 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
2019-08-28 13:51:02 +00:00
Thibault Saunier
8477a3236d 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.
2019-08-28 13:51:02 +00:00
Thibault Saunier
dcae483bca ges: Expose ges mixer to be used as effects 2019-08-28 13:51:02 +00:00
Thibault Saunier
99c44bdb34 ges: Add support for EffectClip assets 2019-08-28 13:51:02 +00:00
Matthew Waters
c2bba9e0e5 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
^
2019-08-28 18:46:36 +10:00
Thibault Saunier
82a970f415 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
^
2019-08-27 10:43:11 -04:00
Matthew Waters
2e8528bb40 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)
^
2019-08-27 03:58:42 +00:00
Thibault Saunier
cec6fef8b3 doc: Update cache and fix usage of <ulink> 2019-08-23 16:56:47 +00:00
Millan Castro
68288a76f7 markerlist: implement GESMarkerList
Co-authored by Mathieu Duponchelle <mathieu@centricular.com>
2019-08-22 21:24:02 +02:00
Thibault Saunier
19426863e9 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
2019-08-20 15:29:57 -04: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
Henry Wilkes
4d60fcd7ff 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.
2019-08-16 17:03:06 +01:00
Thibault Saunier
448091583a structured-interface: Properly error out when a child property could not be set 2019-08-14 15:49:20 -04:00
Thibault Saunier
eac22d333a 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.
2019-08-12 17:40:33 -04: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
Sebastian Dröge
5feeb35dba 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 ()
      | ^~~~~~~~~~~~~~~~~
2019-08-12 14:58:45 +00:00
Thibault Saunier
91dd3e44a7 doc: Add some missing Since: 2019-08-12 10:10:22 -04:00
Thibault Saunier
96e022658e project: Properly handle NULL project asset ID 2019-08-11 21:20:21 -04:00
Thibault Saunier
ea043c2f0e structured: Enhance error message when no clip duration set 2019-07-30 18:24:07 -07:00
Thibault Saunier
43907adc1d structured-interface: Avoid setting invalid clip duration 2019-07-30 18:22:18 -07:00
Thibault Saunier
badede6d1c track: Add a getter for restriction_caps 2019-07-26 14:23:55 -04:00
Thibault Saunier
f9d7fa36e0 launch: Set user restriction caps even when loading projects 2019-07-26 14:23:55 -04:00
Thibault Saunier
ea2b5bded8 track: Enhance restriction capsfilter name 2019-07-26 14:23:55 -04: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
ab340b5de0 doc: Do not require the GStreamer cache generator 2019-07-26 13:48:52 -04:00
Thibault Saunier
f51f2f70de 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)
2019-07-26 13:48:51 -04:00
Thibault Saunier
7caa424aaf 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.
2019-07-26 13:48:51 -04:00
Thibault Saunier
c5c451fc1c Implement a formatter based on [OpenTimelineIO]
[OpenTimelineIO]: http://opentimeline.io/
2019-07-26 13:48:51 -04:00
Thibault Saunier
451f67e3d6 formatter: Handle coma separated extensions in formatter metas 2019-07-26 13:48:51 -04:00
Thibault Saunier
fa7a5db1fc formatter: Duplicate const gchar* for metadatas 2019-07-26 13:48:51 -04:00
Thibault Saunier
d7b0e50b07 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.
2019-07-26 13:48:51 -04:00
Thibault Saunier
abb4f005e3 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.
2019-07-26 13:48:51 -04:00
Thibault Saunier
6f9e6d3586 formatter: Enhance error reporting
And add a "loading-error" signal in GESProject so we can report
issue when loading async elements for the timeline.
2019-07-26 13:48:51 -04:00
Thibault Saunier
c125093bb1 xml-formatter: Fix loading sources
And fix the project file which couldn't be load now that we
properly check clips coherency
2019-07-26 13:48:51 -04:00
Thibault Saunier
18eedb3c28 gesdemux: Add a testsrc to timelines if parent nleobject duration is too long 2019-07-26 13:48:51 -04:00
Thibault Saunier
9dc958e8ab ges:validate: Properly error when editing container fails 2019-07-26 13:48:51 -04:00
Thibault Saunier
a55296314c 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.
2019-07-26 13:48:51 -04:00