Commit graph

1854 commits

Author SHA1 Message Date
Thibault Saunier
0be8bc9d98 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.
2020-02-12 17:50:37 -03:00
Thibault Saunier
82159882d7 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
2020-02-07 11:58:37 -03:00
Thibault Saunier
000edd268e 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
2019-12-18 15:48:23 -03:00
Henry Wilkes
7b5f655c9a 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.
2019-12-14 18:12:51 +00:00
Thibault Saunier
eabcaa1a56 pipeline: Ensure that encodebin enforces a single segment sent to encoders 2019-12-05 14:23:04 -03:00
Edward Hervey
0219631f5a xml-formatter: Free structure after usage
CID: 1416901
CID: 1439518
CID: 1439527
2019-11-20 07:52:56 +01:00
Edward Hervey
9e6be472a4 formatter: Free path object after usage
As it's done everywhere else

CID: 1455511
2019-11-20 07:46:47 +01:00
Niels De Graef
35d140ad92 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.
2019-10-24 15:19:09 +02:00
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