refactor(node,timeline): route oaknode->oaktimeline calls through the C ABI

- ViewerOutput owns timeline markers/work area via refcounted
  OakTimeline* value handles (oaktimeline_*_create) instead of C++
  objects
- oaktimeline C API: add marker_list_create/marker_add/
  workarea_create/workarea_set_enabled; handle boxes gain an optional
  deleter for owning handles
- oaknode_node_get_markers/get_work_area return addref'd OakTimeline*
  handles via out params (named-struct forward declarations avoid the
  public header cycle); drop OakNodeMarkerList/OakNodeWorkArea
- serializers 210528-230220 load/save markers and work areas through
  the oaktimeline C API; SerializedMarker POD replaces
  std::vector<TimelineMarker*> in the serializer interface
- Sequence::add_default_nodes uses oaktimeline_add_track_command
- clip.cpp display-mode enums come from the new neutral
  include/timeline/displaymode.h; delete src/node/transition/timeline
- oakcommon xml: add oakcommon_xml_reader/writer_wrap_native borrowed
  wrappers (C++ adapter use)
- liboaknode now has zero C++ symbol references into liboaktimeline

Tests: new owning-handle and wrap_native cases; all standalone trees
green (common 196, codec 22, audio 40, task 110, render 49,
timeline 123, node 96, plugin 100).
This commit is contained in:
2026-08-07 22:53:44 +08:00
parent fd2111d560
commit 81431d180d
33 changed files with 669 additions and 207 deletions
+15 -9
View File
@@ -121,12 +121,13 @@ typedef struct OakNodeProject OakNodeProject;
typedef struct OakNodeFootage OakNodeFootage;
/**
* @brief Opaque borrowed handles to the timeline data owned by viewer
* nodes (TimelineMarkerList / TimelineWorkArea in oaktimeline).
* oaktimeline reinterprets these into its own handle types.
* @brief Timeline data owned by viewer nodes (TimelineMarkerList /
* TimelineWorkArea in oaktimeline) cross the boundary as oaktimeline
* value handles. Forward-declared here so node.h stays self-contained;
* include timeline/marker.h / timeline/workarea.h for the definitions.
*/
typedef struct OakNodeMarkerList OakNodeMarkerList;
typedef struct OakNodeWorkArea OakNodeWorkArea;
struct OakTimelineMarkerList;
struct OakTimelineWorkArea;
/**
* @brief Opaque borrowed handle to a node's video frame cache
@@ -562,11 +563,16 @@ OakUndoCommand oaknode_command_create_set_position_recursive(
OakNodeNode node, OakNodeNode context, double x, double y);
/**
* @brief Borrowed marker list / work area of a viewer node. *out is NULL
* when the node is not a viewer (or for an empty handle).
* @brief Marker list / work area of a viewer node, as addref'd
* oaktimeline value handles (release with
* oaktimeline_marker_list_free()/oaktimeline_workarea_free()). *out is
* an empty handle (ctx == NULL) when the node is not a viewer or for
* an empty node handle.
*/
int oaknode_node_get_markers(OakNodeNode node, OakNodeMarkerList **out);
int oaknode_node_get_work_area(OakNodeNode node, OakNodeWorkArea **out);
int oaknode_node_get_markers(OakNodeNode node,
struct OakTimelineMarkerList *out);
int oaknode_node_get_work_area(OakNodeNode node,
struct OakTimelineWorkArea *out);
/**
* @brief Borrowed video frame cache of a node (NULL when the node has