Files
oak-editor/crates/oak-plugin/src/lib.rs
T
Mike-Solar 244d5e860f
CI / Build & test (Windows) (push) Failing after 7s
workspace: kebab-case crates, app under crates/oak-app, shared versions
All crates take the oak-* kebab-case naming (oak-audio, oak-codec,
oak-common, oak-core, oak-ffmpeg-link, oak-node, oak-otio, oak-plugin,
oak-render, oak-storage, oak-task, oak-timeline, oak-undo), with the
lib identifiers rewritten (oakrender:: -> oak_render::, oakcore_rs:: ->
oak_core::, ...) across all 226 referencing files.

The GUI application moves from the workspace root into
crates/oak-app/: src/, build.rs (paths fixed for the new location) and
tests/ travel with it, the root Cargo.toml becomes workspace-only
([workspace] + workspace.package + profiles), and the app package
inherits the workspace version. The screenshots example becomes a
standalone crate examples/simple_player/ with its own Cargo.toml.

Every crate now inherits the single workspace version
(version.workspace = true), and the workflows' crate paths and the
build docs follow the renames.

Validated with a clean cargo check --workspace.
2026-08-22 16:58:37 +08:00

75 lines
3.0 KiB
Rust
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Oak Video Editor - Non-Linear Video Editor
// Copyright (C) 2026 Oak Team
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//! # oakplugin — Oak 的插件模块(自研 OFX 宿主)
//!
//! 本 crate 是 oakplugin 模块的全部实现(M11):
//!
//! - **OFX 宿主**:扫描 bundle、加载插件、实现八张 suite
//! property/memory/image_effect/param/message/progress/timeline/
//! multithread),驱动 describe/createInstance/render 等 action。
//! - **桥**:把 OFX 实例的参数接到 oaknode[`node`],节点值 POD +
//! 身份注册表与 undoable 回写)、把 clip 的输入输出接到 oakrender
//! 纹理([`render`],纹理/帧/渲染器值类型)、把参数修改包成 undo
//! 命令(直接经 `oak_undo::undocommand::UndoCommand`,见
//! [`instance::Instance::submit_undo_command`])。
//!
//! ## 单库化(single-lib unification
//!
//! 本 crate 的 C ABI 出口(原 [`ffi`])与模块桥(原 [`bridge`])已
//! 删除:oaknode/oakrender/oakundo 均以 path 依赖直接链接。桥以
//! 直接 Rust 类型重建([`node`] 的身份注册表与
//! `set_input_*_undoable`[`render`] 的 `Texture`/`Frame`/`Renderer`
//! 值类型)。GL 纹理名(旧 `oakrender_texture_id` 的 GL 命名空间)
//! 由 [`gl_bridge`](方案 B:离屏 CGL 上下文 + 回读)提供;
//! [`render::texture_id`] 对 oakrender 纹理保持恒 0wgpu/Metal 无
//! GL 命名空间),use_opengl 决策与 GL suite 的 OpenGLTextureIndex
//! 改从 [`gl_bridge`] 取真实名。
//!
//! ## 句柄纪律(全 crate 最高优先级约定)
//!
//! 1. 插件可在任意自起线程回调 suitemultithread suite 存活期
//! 内);一切共享状态走 `Mutex`。
//! 2. OFX 语义以 openfx HostSupport 为参照系;协商与时序实现点必须
//! 注释对应 HostSupport 文件与行号(格式:`// HS: ofxhImageEffect.cpp:2776`)。
//!
//! ## 第 1 期范围
//!
//! filter/generator/transition 上下文;CPU 渲染路径。GL 纹理 suite
//! 与 ofxColour 为第 2 期([`clip`]/[`image`] 内以 `// [P2]` 标记
//! 预留点)。
#![deny(unsafe_op_in_unsafe_fn)]
#![warn(missing_docs)]
pub mod clip;
pub mod descriptor;
pub mod error;
pub mod gl_bridge;
pub mod handle;
pub mod host;
pub mod image;
pub mod instance;
pub mod node;
pub mod node_factory;
pub mod param;
pub mod param_curve;
pub mod progress;
pub mod property;
pub mod render;
pub mod render_driver;
pub mod suites;