Commit graph

651 commits

Author SHA1 Message Date
Thibault Saunier
9dd859403d tests: Make sure tests can be listed
Initializing GstCheck before creating the testsuite
2016-12-14 09:13:18 -03:00
Thibault Saunier
b6b640d046 test:nle: Soften check on refcount
The composition might already have taken a new ref processing the
source.
2016-12-01 15:52:37 -03:00
Thibault Saunier
3ac6f84259 tests: Fix running python unit tests
Adding missing nose2-junit-xml.cfg.in file and minor fixes in
the way we call nose2 also making sure the .xunit files end
up in the right place.
2016-11-15 19:11:39 -03:00
Alexandru Băluț
d88cee856e tests_: Use nose2 instead of nosetests
Differential Revision: https://phabricator.freedesktop.org/D1394
2016-11-09 18:35:41 -03:00
Mathieu Duponchelle
73cf36fa25 timeline: reimplement snap_to_position a bit more appropriately.
It could yet be made be simpler, but it would require
touching the rest of the timeline editing code.

Fixes https://phabricator.freedesktop.org/T7587

Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D657
2016-11-09 18:35:12 -03:00
Thibault Saunier
951150581e test:validate: Port to python3 2016-11-09 11:16:27 -03:00
Thibault Saunier
1b5c3cb865 timeline: Avoid creating extra transition when rippling clips
In some cases when rippling clip we could get the algo lost because
a transition existed between two clips (for example at the end of c1
and at the begining of c2) but while rippling it would have required
a transition at the end of c2 and beginning of c1, and we were properly
not destroying the old one (as the two clips were in the moving context)
but we were still creating the other transition in the end...

Reviewed-by: Alex Băluț <alexandru.balut@gmail.com>
Differential Revision: https://phabricator.freedesktop.org/D1362
2016-11-04 15:56:36 -03:00
Thibault Saunier
a2ae8762af timeline: Make sure transitions between rippled clips are never deleted
Reviewed-by: Alex Băluț <alexandru.balut@gmail.com>
Differential Revision: https://phabricator.freedesktop.org/D1361
2016-11-04 15:56:34 -03:00
Thibault Saunier
e31b8627ef timeline: Destroy transition if a neighbor is not being moved to a layer
And make sure that we move the transition to the right layer, not trying
to figure it out.

Differential Revision: https://phabricator.freedesktop.org/D1360
2016-11-04 15:56:31 -03:00
Alexandru Băluț
ad6aab49ae tests_: Check transition is gone when editing clip to another layer
Differential Revision: https://phabricator.freedesktop.org/D1359
2016-11-04 15:56:30 -03:00
Nirbheek Chauhan
b63d64cb85 Revert "meson: move gstreamer-check-1.0 dependency to tests/check"
This reverts commit 5665c2bfc9.

Does not actually work. See:
https://bugzilla.gnome.org/show_bug.cgi?id=773114#c31
2016-10-25 11:48:35 +05:30
Thibault Saunier
5665c2bfc9 meson: move gstreamer-check-1.0 dependency to tests/check 2016-10-21 05:49:18 -03:00
Thibault Saunier
1d6167f07d meson: Use environment object to setup test environment variables
Bump meson requirement to 0.35
2016-10-14 17:44:00 +02:00
Thibault Saunier
aec1442d4c meson: Add python tests 2016-10-11 19:22:47 +02:00
Thibault Saunier
a44e49fafe meson: Setup pre commit hook and fix getpluginsdir for standalone case 2016-09-30 13:35:01 -03:00
Thibault Saunier
3a0598120e tests_:python: Factor out common code
Differential Revision: https://phabricator.freedesktop.org/D1328
2016-09-26 13:33:25 -03:00
Thibault Saunier
cd76231f64 timeline: Properly compute the end of groups when checking snapping
Computation was not taking into account the fact that the start of
the element being moved could be at the middle of a group and not
necessarily at the start!

Fixes T7544

Reviewed-by: Alex Băluț <alexandru.balut@gmail.com>
Differential Revision: https://phabricator.freedesktop.org/D1282
2016-09-26 13:33:19 -03:00
Thibault Saunier
1757ae2e5e ges: Handle moving groups with effects inside
We were only concidering that we should let the group handle moving
transitions when changing transitions but in fact as soon as a
transition is happenning between two clips that are in a same group
the group properly handles moving the transition, so let the
group do its job.

Fixes T7543

Differential Revision: https://phabricator.freedesktop.org/D1281
2016-09-26 13:33:00 -03:00
Thibault Saunier
3409719de5 ges: Deprecate GESTimelineElement::priority writability
GESLayer is now responsible for setting clips priorites. Also
GESClip top effects priorities are now set by the
ges_clip_set_top_effect_index method, the user should never call
ges_timeline_element_set_priority as it will anyway be overriden
by GES itself.

Differential Revision: https://phabricator.freedesktop.org/D1280
2016-09-26 13:32:58 -03:00
Thibault Saunier
3daf8bd788 Finally move clip priority handling to GESLayer.
Fix all tests as we now have 1 priority inside the layer
dedicated to transitions (basically no source clip will
ever have a priority of 0 inside a layer).

Differential Revision: https://phabricator.freedesktop.org/D1276
2016-09-26 13:32:53 -03:00
Thibault Saunier
2854c91ebc clip: Make top effect priority inside the clip priority range
And simplify the way we start computing children priority
making min_priority already relative to the clip itself.

Differential Revision: https://phabricator.freedesktop.org/D1275
2016-09-26 13:32:52 -03:00
Thibault Saunier
ae93594f3c tests_: timelineedition: Fix test now that we ripple from start and not from end
Differential Revision: https://phabricator.freedesktop.org/D1274
2016-09-26 13:32:51 -03:00
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
8b4983daf1 test:validate: Handle new expected_failures Test argument 2016-09-09 10:27:24 -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
da0a5823c7 Revert "validate: Blacklist racy tests"
This reverts commit ce35412ff2.

https://bugzilla.gnome.org/show_bug.cgi?id=769894 has been fixed
2016-09-05 14:54:53 -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
Edward Hervey
ce35412ff2 validate: Blacklist racy tests
See https://bugzilla.gnome.org/show_bug.cgi?id=769894
2016-08-14 17:45:16 +02: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
ff6937d044 tests:validate: Also test opus and theora in OGG 2016-08-01 12:55:07 -04:00
Thibault Saunier
e1f6b9fefb validate: Start also testing jpeg encoding 2016-07-29 15:57:05 -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
e160264c7f tests:validate: Better choose tested rendering formats 2016-07-15 08:59:01 -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