Commit graph

248 commits

Author SHA1 Message Date
Thibault Saunier f3dbcd2753 timeline: Do not snap object within the moving context
Reviewed-by: Alex Băluț <<alexandru.balut@gmail.com>>
Differential Revision: https://phabricator.freedesktop.org/D1873
2017-11-07 10:18:45 -03:00
Thibault Saunier 4db3800f98 Revert "timeline: Return FALSE when commiting an empty timeline"
This commit means that we do not get ASYNC_DONE anymore when commiting
an empty timeline, which means that we need to special case that.

This actually broke some code and does not bring in much.

Fixes https://phabricator.freedesktop.org/T7802
Fixes https://phabricator.freedesktop.org/T7797

This reverts commit e570d1e080.

Thanks @stefanzzz for investigating!
2017-08-29 22:27:42 -03:00
Thibault Saunier 959a3c70b0 timeline: Add from first element with wanted start to the move context
We need to iterate over the previous element from trackelement_iter
to find the first element that is at the moving point. Several
elements can have the same start as the one initiating the move,
and we need to take all of them into account.

Fixes https://phabricator.freedesktop.org/T7819
2017-08-18 23:52:35 -03:00
Thibault Saunier 487d9df367 timeline: Remove trackelements initating move from the moving context
They are handled specially when moving the context and having them
part of the context can lead to weird behaviours.

Fixes https://phabricator.freedesktop.org/T7693
2017-07-27 16:32:31 -04:00
Sebastian Dröge be67574245 ges: Correctly handling floating references
If we ref_sink() a parameter, it must be marked as (transfer floating)
and it also has to be handled consistently between error and normal cases.

See https://bugzilla.gnome.org/show_bug.cgi?id=782499

https://bugzilla.gnome.org/show_bug.cgi?id=782652
2017-05-20 16:53:57 +02:00
Corentin Noël 1a4c4d3ac0 Tiny fixes in the documentation
https://bugzilla.gnome.org/show_bug.cgi?id=780854
2017-04-02 21:25:38 -03:00
Thibault Saunier a125b8d73b ges: Minor GESTimeline documentation fix 2017-03-10 19:34:21 -03:00
Thibault Saunier 35256b47ff docs: Port all docstring to gtk-doc markdown 2017-03-08 18:13:48 -03:00
Thibault Saunier e570d1e080 timeline: Return FALSE when commiting an empty timeline
Meaning that ASYNC_DONE/COMMITED is always emited when TRUE is returned
2017-03-06 12:19:16 -03:00
Sebastian Dröge 58e8277a78 ges-timeline: Document intentional case-fall-through
CID 1364754
2017-02-28 15:36:46 +02:00
Thibault Saunier a563578b0a timeline: Cleanup the moved_clip list before rolling back
Otherwise we might end up using an already freed pointer

Differential Revision: https://phabricator.freedesktop.org/D1640
2017-02-04 18:52:57 -03:00
Sebastian Dröge f536db2b71 ges-timeline: Properly calculate absolute diff of two unsigned integers
CID 1394491.
2016-11-23 18:42:27 +02:00
Alexandru Băluț 3ed09c370a ges: Fix documentation and debug comments
Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D1393
2016-11-09 18:35:15 -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
Sebastian Dröge 748d466ac9 ges-timeline: Fix typo in debug messages 2016-11-09 11:48:09 +02: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
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 564bd8d473 layer: Make sure to resync priorities on commit
In case effects have been added priorites might become wrong,
but until the timeline is not commited, it does not matter.

Make sure all priorities are correct before commiting compositions

Differential Revision: https://phabricator.freedesktop.org/D1277
2016-09-26 13:32:55 -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ț 760909bc9e timeline: Fix documentation
Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D1300
2016-09-13 16:45:27 -03:00
Edward Hervey 53fb174443 ges-timeline: Demote some debugging statements
locking should be in a lower level to avoid too many messages
2016-08-14 17:44:36 +02:00
Thibault Saunier 8162811bce timeline: Keep transitions when moving the moving context between layers
Differential Revision: https://phabricator.freedesktop.org/D1225
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 6762b05c19 timeline: Emit snap-ended on commit if needed
Commiting the timeline means that the current operations on the clips are over,
so we should concider snapping as done at that point

Fixes T7499
2016-07-24 08:42:30 -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
Aurélien Zanelli 813c4b4fb7 ges: add some g-i annotations according to documentation
Mainly (transfer xxx) and (nullable). Also fix some typo.

https://bugzilla.gnome.org/show_bug.cgi?id=766459
2016-05-14 20:36:07 -03:00
Thibault Saunier 8718b01595 ges: Remove timeline_emit_group_removed which slipped in the API by mistake
This is formally an API break but I am sure no one ever used that and
we should make sure the method is removed as soon as possible because
it has no reason to be exposed.
2016-05-06 18:27:56 -03:00
Tim-Philipp Müller e40c8fcb30 ges: fix misc g-i annotations 2016-04-30 18:38:33 +01:00
Aurélien Zanelli a8636244b5 timeline: rename "track-element" to "track_element" in select-tracks-for-object documentation
because "track-element" is not a valid identifier for a parameter and
will cause generated binding using GIR to be invalid. For instance in
Vala.

https://bugzilla.gnome.org/show_bug.cgi?id=765853
2016-04-30 16:35:16 +01: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
Fabian Orccon 6a97b50b4b group-added and group-removed signals added
Differential Revision: https://phabricator.freedesktop.org/D619
2016-02-23 20:40:21 +01:00
Thibault Saunier 799c11b58c timeline: Avoid possible crash disposing the timeline 2016-01-19 11:22:57 +01:00
Thibault Saunier 0c46363f74 timeline: Fix infinite loop on dispose
Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D628
2016-01-17 09:23:37 +01:00
Sebastian Dröge 4997c455f4 ges: Fix various g-i warnings 2015-12-26 09:43:23 +01:00
Thibault Saunier 822e0a7b09 ges: Avoid emitting 'child-added/removed' when signal emission stops addition
In the GESTimeline, TrackElement addition to a clip might get cancelled
(and thus the element gets removed), we need to make sure users do not
get wrong signals.

Also document the fact that user should connect to container::child-added
with g_signal_connect_after.
2015-09-24 13:27:16 +02:00
Justin Kim fe2165cad3 timeline: don't leak pad in private structure
https://bugzilla.gnome.org/show_bug.cgi?id=754867
2015-09-11 13:09:40 +02:00
Thibault Saunier d5663a46dc timeline: Remove transitions that can no fit into an auto transition
When activating auto transition mode
2015-07-16 11:23:20 +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 87b790a9da timeline: Never create transitions between rippled objects
In case of groups, we can have track elements that do not belong
directly to the moved_trackelements but will be moved as others. Never
create transition to all object that have a start > moving group start.
2015-07-03 11:20: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 0a6105ee3b timeline: Never snap end when rippling
http://phabricator.freedesktop.org/T74
2015-06-05 22:53:04 +02:00
Thibault Saunier 9d30b0014d timeline: Never create transition between elements inside the moving context
http://phabricator.freedesktop.org/T74
2015-06-05 22:52:57 +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 d7dfcff745 timeline: Use a simple GList to track auto transitions 2015-05-29 15:27:03 +02:00
Thibault Saunier 8dfac3c94f ges: Add debug output when get_element returns NULL 2015-04-20 17:42:44 +02:00
Mathieu Duponchelle 2e26a9e926 timeline, track: Emit commited at the correct moment.
Summary:
+ [API] GESTrack::commited signal.
+ [API] ges_track_commit_sync

We were emitting commited when timeline_commit was called, which
wasn't very helpful. This commit makes it so we emit commited once
all the compositions have actually been commited.

We also add a synchronous commit method to spare the user
the need to connect to the signal and wait, and update the
documentation.

Reviewers: thiblahute

Differential Revision: http://phabricator.freedesktop.org/D83
2015-04-09 14:44:11 +02:00
Thibault Saunier 3e49850e6d timeline: Add API to find a layer with a specific priority in a timeline
Summary:
API:
  * ges_timeline_get_layer

Test Plan: Nan

Reviewers: mathieu.duponchelle
2015-03-18 20:36:38 +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