refactor(task): OTIO load/save tasks over oaknode/oaktimeline C ABIs

- LoadOTIOTask/SaveOTIOTask de-Qt'd: graph traversal and construction
  through oaknode C ABI (find_input_footage, sequence defaults, block
  factories, context positions), track creation through oaktimeline's
  add_track command; the OTIO import dialog becomes a facade callback
  (headless default: accept all)
- oaknode additions: find_input_footage, sequence_set_default_parameters
- USE_OTIO + otio-install libs wired into oaktask; OTIO dylibs copied
  next to liboaktask for @loader_path resolution
- OTIO round-trip test passes; build-oaktask 106/106 green
This commit is contained in:
2026-08-07 14:58:56 +08:00
parent 40a336276f
commit da2ab512c6
15 changed files with 1139 additions and 685 deletions
+11
View File
@@ -103,6 +103,9 @@ typedef struct OakNodeNode OakNodeNode;
/* Re-declared here so node.h is self-contained; see node/project.h. */
typedef struct OakNodeProject OakNodeProject;
/* Re-declared here so node.h is self-contained; see node/footage.h. */
typedef struct OakNodeFootage OakNodeFootage;
/**
* @brief Opaque borrowed handles to the timeline data owned by viewer
* nodes (TimelineMarkerList / TimelineWorkArea in oaktimeline).
@@ -588,6 +591,14 @@ int oaknode_viewer_set_video_params(OakNodeNode *viewer,
int oaknode_viewer_set_audio_params(OakNodeNode *viewer,
const OakAudioParams *params);
/**
* @brief Find a footage node upstream of this node's inputs
* (Node::find_input_nodes<Footage>(), first match). *out is a
* borrowed handle or NULL when none.
*/
int oaknode_node_find_input_footage(const OakNodeNode *node,
OakNodeFootage **out);
/**
* @brief Create a command that removes a node from its graph together
* with its exclusive dependencies and disconnects its edges
+6
View File
@@ -83,6 +83,12 @@ void oaknode_sequence_free(OakNodeSequence *sequence);
* @param type One of OAKNODE_TRACK_TYPE_VIDEO / _AUDIO / _SUBTITLE.
* @return OAKNODE_OK, OAKNODE_E_INVALID or OAKNODE_E_NOT_FOUND (bad type).
*/
/**
* @brief Apply the default video/audio parameters
* (ViewerOutput::set_default_parameters()).
*/
int oaknode_sequence_set_default_parameters(OakNodeSequence *sequence);
/**
* @brief Borrowed cast from a sequence handle to its node handle.
* NULL for NULL.
+19
View File
@@ -70,6 +70,25 @@ int oaktask_import_invalid_count(OakTaskTask *t);
int oaktask_import_invalid_at(OakTaskTask *t, int index, char *buf,
int buf_size);
/** @brief olive::LoadOTIOTask. */
OakTaskTask *oaktask_create_project_load_otio(const char *filename);
/** @brief Take the loaded project (ownership transfer). */
OakNodeProject *oaktask_load_otio_take_project(OakTaskTask *t);
/** @brief olive::SaveOTIOTask. */
OakTaskTask *oaktask_create_project_save_otio(OakNodeProject *project,
const char *filename);
/**
* @brief OTIO import confirmation callback (facade concern; default
* accepts everything). Return non-zero to accept.
*/
typedef int (*oaktask_otio_import_confirm_fn)(
const char *const *sequence_names, int count, void *userdata);
void oaktask_load_otio_set_confirm_cb(oaktask_otio_import_confirm_fn fn,
void *userdata);
/** @brief olive::PreCacheTask. */
OakTaskTask *oaktask_create_precache(OakNodeFootage *footage, int index,
OakNodeSequence *sequence);