O
Sections
Every group

Clip

A piece of media, trimmed to the part an edit uses.

Symbols in this group are spelled otio_clip_…. An SDK drops that prefix, which is why the name beside each call is the short one.

active_media_reference_key

getter

Returns which of a clip's media references is in use.

OtioStatus otio_clip_active_media_reference_key(
    const OtioDocument *source,
    OtioNode node_handle,
    OtioBuffer *out_key,
    OtioBuffer *out_error);
ParameterTypeRole
source ?documentthe document, borrowed
node_handlenodewhat the call is about
out_keytextwritten through, not read
out_errortextwhy the call failed, or null to skip it

media_reference

methodmay answer nothing

Returns one of a clip's media references.

A null `key` means the active one. Reports `OTIO_STATUS_NO_VALUE` if the key names nothing, which for the active key is a clip with no media.

OtioStatus otio_clip_media_reference(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *key,
    OtioNode *out_reference,
    OtioBuffer *out_error);
ParameterTypeRole
source ?documentthe document, borrowed
node_handlenodewhat the call is about
key ?textinput
out_referencenodewritten through, not read
out_errortextwhy the call failed, or null to skip it

media_reference_count

getter

Returns how many media references a clip holds.

OtioStatus otio_clip_media_reference_count(
    const OtioDocument *source,
    OtioNode node_handle,
    size_t *out_count,
    OtioBuffer *out_error);
ParameterTypeRole
source ?documentthe document, borrowed
node_handlenodewhat the call is about
out_countsizewritten through, not read
out_errortextwhy the call failed, or null to skip it

media_reference_key_at

method

Returns the key of one of a clip's media references.

The references are ordered by key, so walking the indices walks them in a stable order.

OtioStatus otio_clip_media_reference_key_at(
    const OtioDocument *source,
    OtioNode node_handle,
    size_t index,
    OtioBuffer *out_key,
    OtioBuffer *out_error);
ParameterTypeRole
source ?documentthe document, borrowed
node_handlenodewhat the call is about
indexsizeinput
out_keytextwritten through, not read
out_errortextwhy the call failed, or null to skip it

new

constructor

Creates a clip. `name` may be null for an unnamed one.

OtioStatus otio_clip_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

remove_media_reference

methodmay answer nothing

Removes one of a clip's media references, and returns it.

OtioStatus otio_clip_remove_media_reference(
    OtioDocument *target,
    OtioNode node_handle,
    const char *key,
    OtioNode *out_reference,
    OtioBuffer *out_error);
ParameterTypeRole
targetdocumentthe document, changed
node_handlenodewhat the call is about
keytextinput
out_referencenodewritten through, not read
out_errortextwhy the call failed, or null to skip it

set_active_media_reference_key

setter

Sets which of a clip's media references is in use.

OtioStatus otio_clip_set_active_media_reference_key(
    OtioDocument *target,
    OtioNode node_handle,
    const char *key,
    OtioBuffer *out_error);
ParameterTypeRole
targetdocumentthe document, changed
node_handlenodewhat the call is about
keytextinput
out_errortextwhy the call failed, or null to skip it

set_media_reference

setter

Sets one of a clip's media references, adding it if the key is new.

OtioStatus otio_clip_set_media_reference(
    OtioDocument *target,
    OtioNode node_handle,
    const char *key,
    OtioNode reference,
    OtioBuffer *out_error);
ParameterTypeRole
targetdocumentthe document, changed
node_handlenodewhat the call is about
keytextinput
referencenodeinput
out_errortextwhy the call failed, or null to skip it