Commit graph

1896 commits

Author SHA1 Message Date
Henry Wilkes
44420b2e56 marker: add color meta
Support optionally coloring markers by reserving GES_META_MARKER_COLOR
for an ARGB guint.
2019-10-24 09:45:19 +00:00
Henry Wilkes
e53b3fadf1 meta-container: add register_static_meta
Allows us to register a static meta without having to set a value.
2019-10-24 09:45:19 +00:00
Henry Wilkes
a70d0198df meta-container: move comment
The comment that was above _register_meta is actually meant for
_set_value.
2019-10-24 09:45:19 +00:00
Thibault Saunier
c5a2947afa ges-launch: Document timeline description format under --help
Making it simpler for user to get the documentation
2019-10-23 17:51:27 +02:00
Rico Tzschichholz
d760910448 marker-list: Use proper parameters names even in the docs
Otherwise there will be parameters with hyphen in their name in the GIR.
2019-10-22 22:51:41 +02:00
Thibault Saunier
8e145e7f32 ges: Handle empty marker lists 2019-10-22 19:55:01 +02:00
Thibault Saunier
fe96405692 validate: Tear down pipeline when openning a new project
Avoiding potential deadlock when we remove tracks on a playing pipeline
2019-10-22 19:25:09 +02:00
Thibault Saunier
64bb85e6a1 ges: Fix setting GError when adding children to containers
We were misusing assertion and not properly setting the GError value
2019-10-22 19:25:09 +02:00
Thibault Saunier
d58d992674 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.
2019-10-22 19:25:09 +02:00
Thibault Saunier
5234885c8a pipeline: Be smarter about how we match encoding profiles and tracks 2019-10-21 10:25:25 +00: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
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
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
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
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
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
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
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
Thibault Saunier
70d423575d ges:validate: Add a way to execute actions on serialized timelines
This way we can modify nested timelines.
2019-07-26 13:48:51 -04:00
Thibault Saunier
5847c6e5ed ges: Implement our own idle_add which uses the thread local maincontext 2019-07-26 13:48:51 -04:00
Thibault Saunier
35096e4d94 validate: Allow passing 'uri' to 'load-project'
The action type was thought to allow that but it wasn't implemented.
2019-07-26 13:48:51 -04:00
Thibault Saunier
6c5a775a77 xml-formatter: Lower down borring debug to _LOG 2019-07-26 13:48:51 -04:00
Thibault Saunier
cb1ee4b641 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.
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
5f3adbc1a3 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.
2019-07-24 10:49:38 -04:00
Thibault Saunier
b8c897308d asset: Handle trying to proxy an asset to itself
And avoid infinite recursion
2019-07-15 10:30:44 -04:00
Thibault Saunier
bb10b9faa6 track: Disable last gap by default
And let the GESPipeline logic handle that
2019-07-05 18:30:41 -04:00
Thibault Saunier
5e4555c6b3 validate: Create folders as needed when serializing timelines 2019-07-05 18:30:41 -04:00
Thibault Saunier
564505e16f uri-asset: Fix retrieving a relocated asset sync twice
Add a simple test for that.
2019-07-05 18:11:04 -04:00
Thibault Saunier
a2b0dd3859 timeline: Make adding/removing track MT safe
It was almost the case already so make it happen fully
2019-07-05 18:11:04 -04:00
Thibault Saunier
eb53e62c6d 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.
2019-07-05 17:58:13 -04:00
Thibault Saunier
61c952c714 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.
2019-07-05 17:56:03 -04:00
Thibault Saunier
cb96d0287e Use the new GstDiscoverer caching feature 2019-07-05 17:54:29 -04:00
Thibault Saunier
31ccb3106f 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).
2019-07-05 17:53:57 -04:00
Thibault Saunier
1e23799a24 structured-interface: Handle track-types in clip addition
The field was already expected in the launcher
2019-07-05 17:53:41 -04:00
Thibault Saunier
5ea4667be6 Implement and use the GstStream API 2019-07-05 17:53:15 -04:00
Thibault Saunier
5be359cf7f timeline: Create stable stream IDs 2019-07-05 17:52:55 -04:00
Thibault Saunier
032200577a xml-formatter: Plug some leaks 2019-07-05 17:47:53 -04:00
Thibault Saunier
90943667ce xml-formatter: Refactor the way we handle loading state 2019-07-05 17:47:39 -04:00
Thibault Saunier
33bac10cc8 xml-formatter: Cleanup removing all now useless pending fields 2019-07-05 17:45:20 -04:00
Thibault Saunier
14d1f558b1 xml-formatter: Load assets before their proxies
Paving the way to removing pending fields to make the code
simpler to follow.
2019-07-05 17:44:31 -04:00
Thibault Saunier
5774d5256a assets: Recurse in the chain of proxies
When linking loaded proxies and trying to setup their targets
2019-06-16 23:20:12 -04:00
Thibault Saunier
7b1cb7a1d7 validate: Add action type to copy/paste clips 2019-06-05 00:43:48 +00:00
Thibault Saunier
b3e449fd4f container: Handle children pasting failures 2019-06-05 00:43:48 +00:00
Thibault Saunier
3b95bec095 clip: Fix layer managament when copying a clip that was pasted 2019-06-05 00:43:48 +00:00
Thibault Saunier
ded3a5fb2f element: Properly handle the fact that pasting can return NULL
And fix paste annotation
2019-06-05 00:43:48 +00:00
Thibault Saunier
1729104c2c video-transition: When using non crossfade effect use 'over' operations
For smptealph element to work as expected the following compositing
element should mix with the default "over" operator, as described
in its documentation.
2019-05-24 21:13:03 +00:00
Thibault Saunier
b8c0894f34 docs: Minor documentation fixes 2019-05-23 18:54:42 -04:00
Thibault Saunier
ab2582c97e ges: Minor reorganisation of timeline-element.c 2019-05-23 18:54:42 -04:00
Thibault Saunier
759d1580dc ges: Cleanup timeline-element.h indentation 2019-05-23 18:54:42 -04:00
Thibault Saunier
85e966963e project: Add a signal to notify when a new timeline is starting to load 2019-05-23 18:54:42 -04:00
Sebastian Dröge
acf3e31907 timeline-element: Mark edit() as Since: 1.18 2019-05-16 15:09:51 +03:00
Sebastian Dröge
214987bd8a ges: Sprinkle around some Since: 1.16 markers 2019-05-16 15:09:13 +03:00
Thibault Saunier
99cee9218b ges: Deprecate ges_play_sink_convert_frame
It has nothing to do in our namespace/API
2019-05-13 17:00:00 -04:00
Thibault Saunier
fcfa18ac76 More porting to markdown 2019-05-13 10:30:35 -04:00
Thibault Saunier
4cd054dea0 title-clip: Enhance documentation 2019-05-13 10:30:35 -04:00
Thibault Saunier
e7816eba1d doc: Build documentation with hotdoc 2019-05-13 10:30:35 -04:00
Thibault Saunier
5caf822526 docs: Minor fixes 2019-05-13 10:30:19 -04:00
Thibault Saunier
d87578c843 element: Make return value of setters mean something
Setters return values should return %FALSE **only** when the value
could not be set, not when unchanged or when the subclass handled
it itself!

This patches makes it so the return value is meaningul by allowing
subclasses return anything different than `TRUE` or `FALSE` (convention
is -1) to let the subclass now that it took care of everything and
no signal should be emited.
2019-05-02 12:10:11 -04:00
Thibault Saunier
2ab26ab306 ges: Move ges_container_edit to GESTimelineElement
Now that the notion of layer has been moved down to #GESTimelineElement
(through the new #ges_timeline_element_get_layer_priority method), this
method make much more sense directly in the base class.
2019-05-01 12:24:30 -04:00
Thibault Saunier
b09ed0d0c3 asset: Avoid unrefing a task we do not own 2019-04-18 16:44:41 -04:00
Alexandru Băluț
056198b15e clip: Optimize set_top_effect_index by checking parent sooner 2019-04-17 21:56:21 +00:00
Alexandru Băluț
5e008dbc77 clip: Return TRUE when the the effect index does not change 2019-04-17 21:56:21 +00:00
Alexandru Băluț
547a340629 clip: Remove obsolete FIXME 2019-04-17 21:56:21 +00:00
Alexandru Băluț
07ee386d30 container: Call _remove_child when cannot set parent
ges_container_add removes the child being added if the call to
ges_timeline_element_set_parent fails. In this case, subclasses should
be given the chance to revert the effects of the add_child vmethod which
has just been called.
2019-04-17 21:56:21 +00:00
Alexandru Băluț
134e2ffae1 ges: Remove unused nb_effects field 2019-04-17 21:56:21 +00:00
Mart Raudsepp
0c592ad6ac track: Avoid various sorting operations before timeline commit
These are showing up in performance profile of 1000+ clips looped addition.
All this is done at commit time as well, so let that do only one update and
sorting.
2019-04-17 20:17:59 +00:00
Thibault Saunier
6a0f2358ce asset: Do not take an extra ref on asset when already initialized
The task already has a ref so this one doesn't make sense and leads to leaks
2019-04-15 17:11:48 -04:00
Thibault Saunier
2d8be79cb7 xml-formatter: Fix some asset leaks 2019-04-15 17:11:48 -04:00