O
Sections
Every group

Composition

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.

append_child

method

Adds a child to the end of a composition.

OtioStatus otio_composition_append_child(
    OtioDocument *target,
    OtioNode parent,
    OtioNode child,
    OtioBuffer *out_error);
ParameterTypeRole
targetdocumentthe document, changed
parentnodewhat the call is about
childnodeinput
out_errortextwhy the call failed, or null to skip it

child_at_time

methodmay answer nothing

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);
ParameterTypeRole
source ?documentthe document, borrowed
parentnodewhat the call is about
timeOtioRationalTimeinput
shallowboolinput
out_childnodewritten through, not read
out_errortextwhy the call failed, or null to skip it

children_in_range

method

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);
ParameterTypeRole
source ?documentthe document, borrowed
parentnodewhat the call is about
search_rangeOtioTimeRangeinput
out_nodeslist<node>a list written through, sized by the count
capacitysizehow many the buffer can hold
out_countsizehow many the call had to give
out_errortextwhy the call failed, or null to skip it

clear_children

clearer

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);
ParameterTypeRole
targetdocumentthe document, changed
parentnodewhat the call is about
out_nodeslist<node>a list written through, sized by the count
capacitysizehow many the buffer can hold
out_countsizehow many the call had to give
out_errortextwhy the call failed, or null to skip it

detach_child

method

Removes a child by handle.

OtioStatus otio_composition_detach_child(
    OtioDocument *target,
    OtioNode parent,
    OtioNode child,
    OtioBuffer *out_error);
ParameterTypeRole
targetdocumentthe document, changed
parentnodewhat the call is about
childnodeinput
out_errortextwhy the call failed, or null to skip it

find_children_of_kind

method

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);
ParameterTypeRole
source ?documentthe document, borrowed
parentnodewhat the call is about
kindOtioNodeKindinput
search_range ?OtioTimeRangeinput
shallowboolinput
out_nodeslist<node>a list written through, sized by the count
capacitysizehow many the buffer can hold
out_countsizehow many the call had to give
out_errortextwhy the call failed, or null to skip it

handles_of_child

method

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);
ParameterTypeRole
source ?documentthe document, borrowed
parentnodewhat the call is about
childnodeinput
out_handlesOtioHandleswritten through, not read
out_errortextwhy the call failed, or null to skip it

has_child

method

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);
ParameterTypeRole
source ?documentthe document, borrowed
parentnodewhat the call is about
childnodeinput
out_hasboolwritten through, not read
out_errortextwhy the call failed, or null to skip it

index_of_child

method

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);
ParameterTypeRole
source ?documentthe document, borrowed
parentnodewhat the call is about
childnodeinput
out_indexsizewritten through, not read
out_errortextwhy the call failed, or null to skip it

insert_child

method

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);
ParameterTypeRole
targetdocumentthe document, changed
parentnodewhat the call is about
indexint64input
childnodeinput
out_errortextwhy the call failed, or null to skip it

is_parent_of

method

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);
ParameterTypeRole
source ?documentthe document, borrowed
parentnodewhat the call is about
othernodeinput
out_isboolwritten through, not read
out_errortextwhy the call failed, or null to skip it

neighbors_of

method

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);
ParameterTypeRole
targetdocumentthe document, changed
parentnodewhat the call is about
childnodeinput
policyOtioNeighborGapPolicyinput
out_beforenodewritten through, not read
out_afternodewritten through, not read
out_errortextwhy the call failed, or null to skip it

new

constructor

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);
ParameterTypeRole
targetdocumentthe document, changed
name ?textinput
out_nodenodewritten through, not read
out_errortextwhy the call failed, or null to skip it

range_of_child

method

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);
ParameterTypeRole
source ?documentthe document, borrowed
parentnodewhat the call is about
childnodeinput
out_rangeOtioTimeRangewritten through, not read
out_errortextwhy the call failed, or null to skip it

range_of_child_at_index

method

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);
ParameterTypeRole
source ?documentthe document, borrowed
parentnodewhat the call is about
indexint64input
out_rangeOtioTimeRangewritten through, not read
out_errortextwhy the call failed, or null to skip it

ranges_of_children

method

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);
ParameterTypeRole
source ?documentthe document, borrowed
parentnodewhat 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
capacitysizehow many the buffer can hold
out_countsizehow many the call had to give
out_errortextwhy the call failed, or null to skip it

remove_child

method

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);
ParameterTypeRole
targetdocumentthe document, changed
parentnodewhat the call is about
indexint64input
out_childnodewritten through, not read
out_errortextwhy the call failed, or null to skip it

trim_child_range

methodmay answer nothing

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);
ParameterTypeRole
source ?documentthe document, borrowed
parentnodewhat the call is about
child_rangeOtioTimeRangeinput
out_rangeOtioTimeRangewritten through, not read
out_errortextwhy the call failed, or null to skip it

trimmed_range_of_child

methodmay answer nothing

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);
ParameterTypeRole
source ?documentthe document, borrowed
parentnodewhat the call is about
childnodeinput
out_rangeOtioTimeRangewritten through, not read
out_errortextwhy the call failed, or null to skip it

trimmed_range_of_child_at_index

method

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);
ParameterTypeRole
source ?documentthe document, borrowed
parentnodewhat the call is about
indexint64input
out_rangeOtioTimeRangewritten through, not read
out_errortextwhy the call failed, or null to skip it