Reimplement the timeline editing API
[platform/upstream/gst-editing-services.git] / ges / ges-timeline-tree.h
1 #ifndef __GES_TIMELINE_TREE__
2 #define __GES_TIMELINE_TREE__
3
4 #include <ges/ges.h>
5 #include "ges-auto-transition.h"
6
7 void timeline_tree_track_element          (GNode *root,
8                                            GESTimelineElement *element);
9
10 void timeline_tree_stop_tracking_element  (GNode *root,
11                                            GESTimelineElement *element);
12
13 gboolean timeline_tree_can_move_element   (GNode *root,
14                                            GESTimelineElement *element,
15                                            guint32 priority,
16                                            GstClockTime start,
17                                            GstClockTime duration,
18                                            GList *moving_track_elements);
19
20 gboolean timeline_tree_ripple             (GNode *root,
21                                            gint64 layer_priority_offset,
22                                            GstClockTimeDiff offset,
23                                            GESTimelineElement *rippled_element,
24                                            GESEdge moving_edge,
25                                            GstClockTime snapping_distance);
26
27 void ges_timeline_emit_snapping           (GESTimeline * timeline,
28                                            GESTimelineElement * elem1,
29                                            GESTimelineElement * elem2,
30                                            GstClockTime snap_time);
31
32 gboolean timeline_tree_trim               (GNode *root,
33                                            GESTimelineElement *element,
34                                            gint64 layer_priority_offset,
35                                            GstClockTimeDiff offset,
36                                            GESEdge edge,
37                                            GstClockTime snapping_distance);
38
39
40 gboolean timeline_tree_move               (GNode *root,
41                                            GESTimelineElement *element,
42                                            gint64 layer_priority_offset,
43                                            GstClockTimeDiff offset,
44                                            GESEdge edge,
45                                            GstClockTime snapping_distance);
46
47 gboolean timeline_tree_roll               (GNode * root,
48                                            GESTimelineElement * element,
49                                            GstClockTimeDiff offset,
50                                            GESEdge edge,
51                                            GstClockTime snapping_distance);
52
53 typedef GESAutoTransition *
54 (*GESTreeGetAutoTransitionFunc)           (GESTimeline * timeline,
55                                            GESTrackElement * previous,
56                                            GESTrackElement * next,
57                                            GstClockTime transition_duration);
58
59 void timeline_tree_create_transitions     (GNode *root,
60                                            GESTreeGetAutoTransitionFunc get_auto_transition);
61
62 GstClockTime timeline_tree_get_duration   (GNode *root);
63
64 void timeline_tree_debug                  (GNode * root);
65
66 GESAutoTransition *
67 ges_timeline_create_transition           (GESTimeline * timeline, GESTrackElement * previous,
68                                            GESTrackElement * next, GESClip * transition,
69                                            GESLayer * layer, guint64 start, guint64 duration);
70 GESAutoTransition *
71 ges_timeline_find_auto_transition         (GESTimeline * timeline, GESTrackElement * prev,
72                                            GESTrackElement * next, GstClockTime transition_duration);
73
74 void
75 timeline_update_duration                  (GESTimeline * timeline);
76
77 void timeline_tree_init_debug             (void);
78
79 #endif // __GES_TIMELINE_TREE__