An item that holds other items and says where they sit.
Symbols in this group are spelled otio_composition_…. An SDK drops that prefix, which is why the name beside each call is the short one.
Adds a child to the end of a composition.
OtioStatus otio_composition_append_child(
OtioDocument *target,
OtioNode parent,
OtioNode child,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| parent | node | what the call is about |
| child | node | input |
| out_error | text | why the call failed, or null to skip it |
Returns the child of a composition that covers an instant.
`shallow` stops at the composition's own children rather than descending into nested ones. Reports `OTIO_STATUS_NO_VALUE` when nothing covers it.
OtioStatus otio_composition_child_at_time(
const OtioDocument *source,
OtioNode parent,
OtioRationalTime time,
bool shallow,
OtioNode *out_child,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| parent | node | what the call is about |
| time | OtioRationalTime | input |
| shallow | bool | input |
| out_child | node | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Returns the children of a composition that touch a span.
OtioStatus otio_composition_children_in_range(
const OtioDocument *source,
OtioNode parent,
OtioTimeRange search_range,
OtioNode *out_nodes,
size_t capacity,
size_t *out_count,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| parent | node | what the call is about |
| search_range | OtioTimeRange | input |
| out_nodes | list<node> | a list written through, sized by the count |
| capacity | size | how many the buffer can hold |
| out_count | size | how many the call had to give |
| out_error | text | why the call failed, or null to skip it |
Removes every child of a composition, and returns them.
OtioStatus otio_composition_clear_children(
OtioDocument *target,
OtioNode parent,
OtioNode *out_nodes,
size_t capacity,
size_t *out_count,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| parent | node | what the call is about |
| out_nodes | list<node> | a list written through, sized by the count |
| capacity | size | how many the buffer can hold |
| out_count | size | how many the call had to give |
| out_error | text | why the call failed, or null to skip it |
Removes a child by handle.
OtioStatus otio_composition_detach_child(
OtioDocument *target,
OtioNode parent,
OtioNode child,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| parent | node | what the call is about |
| child | node | input |
| out_error | text | why the call failed, or null to skip it |
Returns every object of a kind at or below a composition.
A null `search_range` searches all of it. `shallow` stops the walk at the composition's own children.
OtioStatus otio_composition_find_children_of_kind(
const OtioDocument *source,
OtioNode parent,
OtioNodeKind kind,
const OtioTimeRange *search_range,
bool shallow,
OtioNode *out_nodes,
size_t capacity,
size_t *out_count,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| parent | node | what the call is about |
| kind | OtioNodeKind | input |
| search_range ? | OtioTimeRange | input |
| shallow | bool | input |
| out_nodes | list<node> | a list written through, sized by the count |
| capacity | size | how many the buffer can hold |
| out_count | size | how many the call had to give |
| out_error | text | why the call failed, or null to skip it |
Returns how much unused media a child has on each side.
OtioStatus otio_composition_handles_of_child(
const OtioDocument *source,
OtioNode parent,
OtioNode child,
OtioHandles *out_handles,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| parent | node | what the call is about |
| child | node | input |
| out_handles | OtioHandles | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Returns whether a composition holds an object directly.
OtioStatus otio_composition_has_child(
const OtioDocument *source,
OtioNode parent,
OtioNode child,
bool *out_has,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| parent | node | what the call is about |
| child | node | input |
| out_has | bool | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Returns where a child sits in its composition.
OtioStatus otio_composition_index_of_child(
const OtioDocument *source,
OtioNode parent,
OtioNode child,
size_t *out_index,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| parent | node | what the call is about |
| child | node | input |
| out_index | size | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Adds a child to a composition at an index.
A negative index counts from the end, as upstream's Python does. The child must not already be in a composition.
OtioStatus otio_composition_insert_child(
OtioDocument *target,
OtioNode parent,
int64_t index,
OtioNode child,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| parent | node | what the call is about |
| index | int64 | input |
| child | node | input |
| out_error | text | why the call failed, or null to skip it |
Returns whether an object descends from a composition at any depth.
OtioStatus otio_composition_is_parent_of(
const OtioDocument *source,
OtioNode parent,
OtioNode other,
bool *out_is,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| parent | node | what the call is about |
| other | node | input |
| out_is | bool | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Returns the children on either side of one, or `otio_node_none` where there is none.
With `OTIO_NEIGHBOR_GAP_AROUND_TRANSITIONS`, a transition at the head or tail of a track gets a gap materialized for its overhang, which is why this takes a document it may edit.
OtioStatus otio_composition_neighbors_of(
OtioDocument *target,
OtioNode parent,
OtioNode child,
OtioNeighborGapPolicy policy,
OtioNode *out_before,
OtioNode *out_after,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| parent | node | what the call is about |
| child | node | input |
| policy | OtioNeighborGapPolicy | input |
| out_before | node | written through, not read |
| out_after | node | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Creates a bare composition: children with no layout of its own.
OtioStatus otio_composition_new(
OtioDocument *target,
const char *name,
OtioNode *out_node,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| name ? | text | input |
| out_node | node | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Returns where a child sits in a composition's clock, at any depth.
OtioStatus otio_composition_range_of_child(
const OtioDocument *source,
OtioNode parent,
OtioNode child,
OtioTimeRange *out_range,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| parent | node | what the call is about |
| child | node | input |
| out_range | OtioTimeRange | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Returns where the child at an index sits in its composition's clock.
A negative index counts from the end.
OtioStatus otio_composition_range_of_child_at_index(
const OtioDocument *source,
OtioNode parent,
int64_t index,
OtioTimeRange *out_range,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| parent | node | what the call is about |
| index | int64 | input |
| out_range | OtioTimeRange | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Returns where every child of a composition sits, in one pass.
`out_nodes` and `out_ranges` are filled in step, so entry `i` of one goes with entry `i` of the other. Either may be null when only the count is wanted.
OtioStatus otio_composition_ranges_of_children(
const OtioDocument *source,
OtioNode parent,
OtioNode *out_nodes,
OtioTimeRange *out_ranges,
size_t capacity,
size_t *out_count,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| parent | node | what the call is about |
| out_nodes ? | list<node> | a list written through, sized by the count |
| out_ranges ? | list<OtioTimeRange> | a list written through, sized by the count |
| capacity | size | how many the buffer can hold |
| out_count | size | how many the call had to give |
| out_error | text | why the call failed, or null to skip it |
Removes a child by index, and returns it.
The child stays in the document with no parent.
OtioStatus otio_composition_remove_child(
OtioDocument *target,
OtioNode parent,
int64_t index,
OtioNode *out_child,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| parent | node | what the call is about |
| index | int64 | input |
| out_child | node | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Clips a range to a composition's own trim.
Reports `OTIO_STATUS_NO_VALUE` when nothing of it is left.
OtioStatus otio_composition_trim_child_range(
const OtioDocument *source,
OtioNode parent,
OtioTimeRange child_range,
OtioTimeRange *out_range,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| parent | node | what the call is about |
| child_range | OtioTimeRange | input |
| out_range | OtioTimeRange | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Returns where a child sits after the composition's trim, at any depth.
Reports `OTIO_STATUS_NO_VALUE` when the trim excludes it entirely.
OtioStatus otio_composition_trimmed_range_of_child(
const OtioDocument *source,
OtioNode parent,
OtioNode child,
OtioTimeRange *out_range,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| parent | node | what the call is about |
| child | node | input |
| out_range | OtioTimeRange | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Returns where the child at an index sits, after the composition's own trim.
OtioStatus otio_composition_trimmed_range_of_child_at_index(
const OtioDocument *source,
OtioNode parent,
int64_t index,
OtioTimeRange *out_range,
OtioBuffer *out_error);| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| parent | node | what the call is about |
| index | int64 | input |
| out_range | OtioTimeRange | written through, not read |
| out_error | text | why the call failed, or null to skip it |