Commit graph

418 commits

Author SHA1 Message Date
Alexandru Băluț
a63c754222 timeline: Make get_groups public
Had to separate timeline_emit_group_added from timeline_add_group
to avoid emitting group-added when the project is being loaded.

Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D1302
2016-09-13 16:47:24 -03:00
Alexandru Băluț
2df506e5ba tests_: Make sure child-removed is emitted when ungrouping
Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D1301
2016-09-13 16:47:21 -03:00
Thibault Saunier
e619a9858d tests: Move -DGES_TEST_FILES_PATH to common_cflags
As it is needed to build the utils lib
2016-09-09 17:14:43 -03:00
Thibault Saunier
c0d40737a9 tests: Fix the way we get tests assets
Using __FILE__ won't work properly with meson.
2016-09-09 16:43:46 -03:00
Thibault Saunier
4434392b2c meson: Do not build libges against libcheck 2016-09-07 16:53:06 -03:00
Thibault Saunier
042de8118b meson: Properly find where other GStreamer plugins are when using subprojects 2016-09-05 18:19:49 -03:00
Thibault Saunier
383c5d1f6d Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson
2016-08-24 16:44:32 -03:00
Thibault Saunier
855488f58e ges: Do not rescale videos if the track aspect ratio changes
Differential Revision: https://phabricator.freedesktop.org/D1242
2016-08-05 21:40:57 -04:00
Thibault Saunier
fff6a73735 timeline: Ripple from start of clips and not the end.
Fixes https://phabricator.freedesktop.org/T7503
2016-07-28 19:37:25 -04:00
Thibault Saunier
156eaecb28 tests: Make sure to run python tests against the build in tree 2016-06-20 21:29:44 -04:00
Thibault Saunier
346f887553 ges: Don't remove track elements from clips when removing from layer
And reuse the same previously created element when adding the clip
back to a layer, avoiding losing all setting done on clip children
in that situation

This is a behaviour change but previous behaviour was actually totally
unexpected and people working around that weird behaviour will moste
probably not care about that change

Differential Revision: https://phabricator.freedesktop.org/D1094
2016-06-20 14:49:17 -04:00
Thibault Saunier
c9c4a60de2 title_: Do not forget to link up child_added/removed vmethod
Otherwise effect handling is broken

Differential Revision: https://phabricator.freedesktop.org/D1099
2016-06-20 14:21:12 -04:00
Thibault Saunier
716c0dbe8d auto-transitions: Do not remove auto transitions when moving neighboor from the same group
Differential Revision: https://phabricator.freedesktop.org/D1097
2016-06-20 14:19:53 -04:00
Thibault Saunier
7d34e33ac4 title: Do not concider inpoints
It does not make sense for titles
Handle element with no inpoint handling in the timeline

Fixes https://phabricator.freedesktop.org/T7319
2016-04-22 16:15:33 -03:00
Sebastian Dröge
9557abaeda tests: Rename positionner to positioner in the tests too 2016-04-13 12:32:53 +03:00
Sebastian Dröge
c222da6862 tests: Add some things to .gitignore 2016-04-04 10:53:13 +03:00
Sjors Gielen
84f7f04a64 Handle changing playback rate
Before this patch, NLE and GES did not support NleOperations (respectively
GESEffects) that changed the speed/tempo/rate at which the source plays. For
example, the 'pitch' element can make audio play faster or slower. In GES 1.5.90
and before, an NleOperation containing the pitch element to change the rate (or
tempo) would cause a pipeline state change to PAUSED after that stack; that has
been fixed in 1.5.91 (see #755012 [0]). But even then, in 1.5.91 and later,
NleComposition would send segment events to its NleSources assuming that one
source second is equal to one pipeline second. The resulting early EOS event
(in the case of a source rate higher than 1.0) would cause it to switch stacks
too early, causing confusion in the timeline and spectacularly messed up
output.

This patch fixes that by searching for rate-changing elements in
GESTrackElements such as GESEffects. If such rate-changing elements are found,
their final effect on the playing rate is stored in the corresponding NleObject
as the 'media duration factor', named like this because the 'media duration',
or source duration, of an NleObject can be computed by multiplying the duration
with the media duration factor of that object and its parents (this is called
the 'recursive media duration factor'). For example, a 4-second NleSource with
an NleOperation with a media duration factor of 2.0 will have an 8-second media
duration, which means that for playing 4 seconds in the pipeline, the seek
event sent to it must span 8 seconds of media. (So, the 'duration' of an
NleObject or GES object always refers to its duration in the timeline, not the
media duration.)

To summarize:

* Rate-changing elements are registered in the GESEffectClass (pitch::tempo and
  pitch::rate are registered by default);
* GESTimelineElement is responsible for detecting rate-changing elements and
  computing the media_duration_factor;
* GESTrackElement is responsible for storing the media_duration_factor in
  NleObject;
* NleComposition is responsible for the recursive_media_duration_factor;
* The latter property finally fixes media time computations in NleObject.

NLE and GES tests are included.

[0] https://bugzilla.gnome.org/show_bug.cgi?id=755012

Differential Revision: https://phabricator.freedesktop.org/D276
2016-02-26 19:54:40 +01:00
Thibault Saunier
c4fd9cd2b1 Fix and test priority of TrackElement after splitting
And make sure we properly handle transitions in that case
2016-02-09 12:38:29 +01:00
Thiago Santos
c0dbfeb433 tests: extend the AM_TESTS_ENVIRONMENT from check.mak
To get the CK_DEFAULT_TIMEOUT defined for all tests

https://bugzilla.gnome.org/show_bug.cgi?id=761472
2016-02-05 20:02:40 -03:00
Thibault Saunier
8c672f8366 effect: Determine the effect type as soon as possible
Making it possible to create the nleobject right at the creation
of the element.

Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D738
2016-02-04 15:23:26 +01:00
Thibault Saunier
3ffdad6db8 title-clip: Return default GESTitleSource value if no child set yet
In get_property we should return the default values if
we have not created any GESTitleSource yet
(instead of segfaulting).

And fix GESTitleSource default values!

Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D737
2016-02-04 15:23:24 +01:00
Thibault Saunier
2fae9ee50d group: Make deep copying actually copy deep
Allowing pasting groups paste exactly what had been copied

And not the new version of the contained objects

This technically breaks the C API but this is a new API and I believe
and hope nobody is using it right now.

Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D616
2016-01-17 09:23:35 +01:00
Thibault Saunier
1c875961fc tests_: Add a simple python copy/paste test for groups
Integrating python tests in the build system

And cleanup configure.ac

Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D601
2016-01-17 09:23:32 +01:00
Thibault Saunier
fa512ecdba Implement asset proxying support
API:
  ges_asset_set_proxy
  ges_asset_get_proxy
  ges_asset_list_proxies
  ges_asset_get_proxy_target

Differential Revision: https://phabricator.freedesktop.org/D504
2015-12-10 14:48:02 +01:00
Thibault Saunier
5bcb7be179 tests: Properly setup GST_PLUGIN_PATH in test environement 2015-11-21 00:24:33 +01:00
Thibault Saunier
844ce69650 tests: Do not use gst-structured-interface in the tests
It breaks $ make distcheck
2015-07-23 12:28:14 +02:00
Thibault Saunier
7be28b29b2 asset: Port use of deprecated GSimpleAsyncResult to GTask 2015-07-06 10:32:32 +02:00
Thibault Saunier
58fb9a6720 track-element: Fix splitting bindings and add unit tests 2015-07-03 14:06:54 +02:00
Thibault Saunier
d23e43ae1a timeline: Disable movement that lead to 2 transition at a position
We should never let 3 objects to overlap at a same position, for that
we introduce a "rollback" feature and whenever such an editing happens,
we rollback object position to whatever it was before the move.
2015-07-03 14:06:54 +02:00
Thibault Saunier
a0ee7e1f44 timeline: Never change output media time when trimming start
+ Fix testsuite

https://bugzilla.gnome.org/show_bug.cgi?id=638802
2015-07-03 09:31:07 +02:00
Thibault Saunier
53defaab7a track-element: Return right value when editing
We used to always return TRUE which was wrong

+ Fix testsuite and remove randomness from the tests
2015-07-03 09:30:50 +02:00
Thibault Saunier
55f0601211 nle: Port tests to the "commit" action signals
Now that nle_object_commit symbol is hidden, we can't use it
in the tests.
2015-06-25 11:03:12 +02:00
Thibault Saunier
c70a654dd6 ges: Handle trimming auto transitions
Meaning trimming neighbors.

+ And add a test
2015-06-01 10:24:11 +02:00
Thibault Saunier
241e809a81 ges: Enhance xges format versioning
Summary:
Handle the fact that some new features can be added and that means
generated files will not be fully understandable by older versions of
the formatter.

Make sure that we set the format version to 0.2 when we serialize the
GstEncodingProfile.enabled property.

Add some tests around that.

+ Fix a minor bug in the test-utils
+ Add a meta on the projects to tell in what format version a project
  has been serialized/parsed back

API:
  GES_META_FORMAT_VERSION

Depends on D178

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D184
2015-05-18 21:27:48 +02:00
Mathieu Duponchelle
506662e2dc nleobject: It is wrong to update object->stop in set_property.
Summary: It must only be done when the object is commited.
We can do that in constructed though, as the changes will
anyway be commited when the object is added to a composition.

Also update the tests, as we set properties spearately then
check the stop, we can commit the source at its creation without
removing meaning from the tests.

Reviewers: thiblahute

Differential Revision: http://phabricator.freedesktop.org/D84
2015-04-09 15:40:32 +02:00
Edward Hervey
6753ad5bd1 tests: Use AM_TESTS_ENVIRONMENT
Needed by the new automake test runner
2015-04-08 17:05:19 +02:00
Thibault Saunier
42477a5ec3 ges: Move the notion of children properties to GESTimelineElement
Summary:
Deprecate the old GESTrackElement children property handling API.

New APIs:
  * ges_timeline_element_list_children_properties
  * ges_timeline_element_lookup_child
  * ges_timeline_element_get_child_property_by_pspec
  * ges_timeline_element_get_child_property_valist
  * ges_timeline_element_get_child_properties
  * ges_timeline_element_set_child_property_valist
  * ges_timeline_element_set_child_property_by_pspec
  * ges_timeline_element_set_child_properties
  * ges_timeline_element_set_child_property
  * ges_timeline_element_get_child_property
  * ges_timeline_element_add_child_property
  * ges_timeline_element_remove_child_property

Deprecated APIs:
  * ges_track_element_list_children_properties
  * ges_track_element_lookup_child
  * ges_track_element_get_child_property_by_pspec
  * ges_track_element_get_child_property_valist
  * ges_track_element_get_child_properties
  * ges_track_element_set_child_property_valist
  * ges_track_element_set_child_property_by_pspec
  * ges_track_element_set_child_properties
  * ges_track_element_set_child_property
  * ges_track_element_get_child_property
  * ges_track_element_add_child_property

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D40
2015-03-18 20:36:39 +01:00
Thibault Saunier
f470222f3d Revert "ges: Move the notion of children properties to GESTimelineElement"
I got some trouble with

  arc land

and I wanted to push the 3 commit coming after this revert as 3
different commits but they ended up being all squash into one single
commit, which is clearly not cool for later bisecting and blaming.
Reverting that commit and re pushing those 3 commits as they were
supposed to be.

This reverts commit 9fe15ef435.
2015-03-18 20:33:48 +01:00
Thibault Saunier
9fe15ef435 ges: Move the notion of children properties to GESTimelineElement
Summary:
Deprecate the old GESTrackElement children property handling API.

New APIs:
  * ges_timeline_element_list_children_properties
  * ges_timeline_element_lookup_child
  * ges_timeline_element_get_child_property_by_pspec
  * ges_timeline_element_get_child_property_valist
  * ges_timeline_element_get_child_properties
  * ges_timeline_element_set_child_property_valist
  * ges_timeline_element_set_child_property_by_pspec
  * ges_timeline_element_set_child_properties
  * ges_timeline_element_set_child_property
  * ges_timeline_element_get_child_property
  * ges_timeline_element_add_child_property
  * ges_timeline_element_remove_child_property

Deprecated APIs:
  * ges_track_element_list_children_properties
  * ges_track_element_lookup_child
  * ges_track_element_get_child_property_by_pspec
  * ges_track_element_get_child_property_valist
  * ges_track_element_get_child_properties
  * ges_track_element_set_child_property_valist
  * ges_track_element_set_child_property_by_pspec
  * ges_track_element_set_child_properties
  * ges_track_element_set_child_property
  * ges_track_element_get_child_property
  * ges_track_element_add_child_property

Reviewers: Mathieu_Du

Reviewed By: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D40
2015-03-18 20:23:55 +01:00
Mathieu Duponchelle
1bfe0b7ef3 Cleanly handle removing the last object in a composition
The strategy here is to seek at the new end of the composition. And in
GES we always add a 1ns long gap at the end of the tracks so that all
track have the exact same duration, and we have black frames when the
timeline is empty
2015-02-03 12:03:33 +01:00
Thibault Saunier
78913931b2 ges: Recompute Group priority when one of its clip.layer change priority
And add a unit test for that case where it was previously failing
2014-12-06 10:34:18 +01:00
Thibault Saunier
18f14de105 tests: Remove integration tests, GstValidate is the way forward! 2014-12-06 10:34:18 +01:00
Mathieu Duponchelle
d109c37343 check/ges/track: add forgotten test file. 2014-12-05 22:19:32 +01:00
Mathieu Duponchelle
f85c463b93 track: [API]: ges_track_update_restriction_caps.
+ And specify default restriction caps for audio tracks.
+ Add ges_track_set_restriction_caps to the sections, it
  was missing.

https://bugzilla.gnome.org/show_bug.cgi?id=740726
2014-12-05 22:12:11 +01:00
Thibault Saunier
fedee39900 tests: Fix make distcheck
Some xges project are not used anymore and some new appeared, clean
that up in the Makefile.am
2014-11-10 17:24:11 +01:00
Thibault Saunier
5665e3abb1 xml-formatter: Serialize groups
They were not serialized until now.

That implies several changes:

* Override GESTimelineElement [start, inpoint, duration] properties in
  GESGroup to ensure that those properties are not serialized as they
  should not be.

* Rename GESBaseXmlContainer->clips field to
  GESBaseXmlContainer->containers as the hashtable now contains Groups

https://bugzilla.gnome.org/show_bug.cgi?id=709148
2014-11-10 16:22:43 +01:00
Thibault Saunier
08af3721bf frameposition: In case sources have the same size as track, follow track size
For example if the size has been serialized in a file, but the user has
not personalized the size, we want that whenever the restriction caps
change the size, the video should take the size of the track
restriction caps.

We know need to keep track of the current positionner.size even if
setting through caps size changes.

https://bugzilla.gnome.org/show_bug.cgi?id=739527
2014-11-10 16:22:42 +01:00
Thibault Saunier
79230eef1f nle: Handle sending SEEK event recursively to our children
Instead of relying on it being implemented in core (as it is currently
not!)
2014-11-10 16:22:40 +01:00
Thibault Saunier
d3d1f85373 tests: Use audiomixer as an audio mixing element
Adder is the past!
2014-11-10 16:22:40 +01:00
Joris Valette
b89ffaea82 tests: project: Add children properties check
Rename test_project_add_keyframes into test_project_add_properties
2014-11-10 16:22:39 +01:00