Skip to content

Commit e6ebb66

Browse files
committed
Updated documentation.
Signed-off-by: Gonzalo Garramuño <[email protected]>
1 parent 6bc43ad commit e6ebb66

File tree

2 files changed

+33
-93
lines changed

2 files changed

+33
-93
lines changed

src/opentimelineio/algo/editAlgorithm.h

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,23 @@ enum class ReferencePoint
2121
// ^ ^
2222
// | C |
2323
//
24-
// item = item to overwrite (usually a clip)
24+
// item = item to overwrite (usually a clip) -- C in the diagram.
2525
// composition = usually a track item.
2626
// range = time range to overwrite.
2727
// remove_transitions = whether to remove transitions within range.
28-
// fill_template = item to fill in (usually a gap),
29-
// when range > composition's time.
28+
// fill_template = item to fill in (usually a gap).
29+
//
30+
// If overwrite range starts after B's end, a gap hole is filled with
31+
// fill_template and then then C is appended.
32+
//
33+
// If overwrite range starts before B's end and extends after, B is partitioned
34+
// and C is appended at the end.
35+
//
36+
// If overwrite range starts before A and partially overlaps it, C is
37+
// added at the beginning and A is partitioned.
38+
//
39+
// If overwrite range starts and ends before A, a gap hole is filled with
40+
// fill_template.
3041
void overwrite(
3142
Item* item,
3243
Composition* composition,
@@ -47,6 +58,10 @@ void overwrite(
4758
// remove_transitions = whether to remove transitions that intersect time.
4859
// fill_template = item to fill in (usually a gap),
4960
// when time > composition's time.
61+
//
62+
// If A and B's length is L1 and C's length is L2, the end result is L1 + L2.
63+
// A is split.
64+
//
5065
void insert(
5166
Item* const item,
5267
Composition* composition,
@@ -68,6 +83,11 @@ void insert(
6883
// source_range().end_time_exclusive() will be adjusted by
6984
// fill_template = item to fill in (usually a gap),
7085
// when time > composition's time.
86+
//
87+
// Do not affect other clips.
88+
// Fill now-"empty" time with gap or template
89+
// Unless item is meeting a Gap, then, existing Gap's duration will be augmented
90+
//
7191
void trim(
7292
Item* item,
7393
RationalTime const& delta_in,
@@ -95,17 +115,24 @@ void slice(
95115
//
96116
// item = item to slip (usually a clip)
97117
// delta = +/- rational time to slip the item by.
118+
//
119+
// Do not affect item duration.
120+
// Do not affect surrounding items.
121+
// Clamp to available_range of media (if available)
98122
void slip(Item* item, RationalTime const& delta);
99123

100124
//
101-
// Slide an item start_time by + or -, moving the previous item's duration.
125+
// Slide an item start_time by + or -, adjusting the previous item's duration.
102126
// Clamps previous item's duration to available_range if available.
103127
//
104128
// | A | B | C | -> | A | B | C |
105129
// *--->
106130
//
107131
// item = item to slip (usually a clip)
108132
// delta = +/- rational time to slide the item by.
133+
//
134+
// If item is the first clip, it does nothing.
135+
//
109136
void slide(Item* item, RationalTime const& delta);
110137

111138
//
@@ -178,6 +205,8 @@ void fill(
178205
// fill = whether to fill the hole with fill_template.
179206
// fill_template = if nullptr, use a gap to fill the hole.
180207
//
208+
// if fill is not set, A and B become concatenated, with no fill.
209+
//
181210
void remove(
182211
Composition* composition,
183212
RationalTime const& time,

tests/test_find_children.cpp

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)