core: merge oak-common into oak-core
CI / Build & test (Linux) (push) Successful in 24m6s
CI / Build & test (Windows) (push) Successful in 31m14s

oak-common is gone; its modules (configstore, xmlutils, ocioutils,
oiioutils, colormath, colortransform, videoparams, ffmpegutils, ...)
now live in oak-core alongside the value types. The render value/GPU
types moved too: backend (wgpu context + DisplayRenderer), color
(ColorProcessor over ocio-rs), texture, frame, and the commonutil
config helpers.

Fix-ups to make the merged tree build and pass tests:

- oak-core Cargo.toml: wgpu back to 25 (the moved backend code is
  written against that API generation); add the toml/quick-xml/image
  deps oak-common carried.
- lib.rs: drop the duplicate 'pub mod error;'.
- error.rs: unified OAKCORE_* codes; restore Error::new() and
  From<OcioError> from oak-common's error type.
- backend.rs/color.rs: oak_core::/oak_render:: self-references
  rewritten to crate::; the shaderfx-dependent GPU effect test moved
  to oak-render's shaderfx tests (shaderfx depends on oak-node and
  cannot live in oak-core).
- oak-render's error module re-exports oak_core::error::{Error,
  Result}; the OAKRENDER_* codes stay as the public-code contract.
- oak-node jobs.rs: ColorProcessor imported from oak_core::color.
- Integration tests repointed at oak_core::{texture, frame, backend,
  color, colormath}.
- the display-ICC regression test treats an empty OAK_DISPLAY_ICC as
  unset, matching displayicc::env_override_icc.
This commit is contained in:
2026-09-03 17:42:20 +08:00
parent 49fed365a4
commit 4babbf5de8
150 changed files with 3052 additions and 4030 deletions
+2 -2
View File
@@ -879,7 +879,7 @@ dependencies = [
]
[[package]]
name = "oakcommon"
name = "oak_core"
version = "0.1.0"
dependencies = [
"image",
@@ -900,7 +900,7 @@ dependencies = [
"libc",
"oakaudio",
"oakcodec",
"oakcommon",
"oak_core",
"oakcore-rs",
"oaknode",
"oakplugin",
+1 -2
View File
@@ -32,9 +32,8 @@ clap = { version = "4", features = ["derive"] }
# direct Rust call into the oak* rlibs (oaknode for projects/footage,
# oaktimeline for the track/clip commands, oakrender for the ticket arena,
# oakcodec for the export formats/codecs, oaktask for the export task,
# oakcommon/oakcore-rs for the shared value types). No liboakengine dylib,
# oak_core/oakcore-rs for the shared value types). No liboakengine dylib,
# no C ABI, no build.rs link step, no host shims.
oak-common = { path = "../oak-common" }
oak-core = { path = "../oak-core" }
oak-node = { path = "../oak-node" }
oak-timeline = { path = "../oak-timeline" }
+1 -1
View File
@@ -20,7 +20,7 @@ cargo test # unit + integration tests
The crate is **self-contained** (M14 R2): it links the oak* module rlibs
directly (`oaknode`, `oaktimeline`, `oakcodec`, `oakrender`, `oaktask`,
`oakcommon`) — no `liboakengine` dylib, no C ABI, no build.rs link step.
`oak_core`) — no `liboakengine` dylib, no C ABI, no build.rs link step.
`cargo test -p oak-cli` stands alone.
## Subcommands
+6 -6
View File
@@ -17,7 +17,7 @@
//! Module-native engine helpers (M14 R2).
//!
//! oak-cli links the oak* module rlibs directly (oaknode / oaktimeline /
//! oakcodec / oakrender / oaktask / oakcommon) instead of the built
//! oakcodec / oakrender / oaktask / oak_core) instead of the built
//! liboakengine dylib's C ABI. This module is the CLI's own assembly
//! layer: it reproduces the facade operations the subcommands need —
//! project load/create, footage probe, sequence + clip assembly, montage
@@ -43,14 +43,14 @@ use oak_node::project::Project;
use oak_node::sequence::SequenceBehavior;
use oak_node::track::{TrackBehavior, TrackListBehavior, TrackType};
use oak_node::value::VideoParams;
use oak_timeline::undogeneral::TimelineAddTrackCommand;
use oak_timeline::undopointer::TrackPlaceBlockCommand;
use oak_timeline::util::NodeRef;
use oak_render::manager::RenderManager;
use oak_render::procpool::bgra8_to_rgba8;
use oak_render::ticket::{
AudioTicketParams, MontageClip, TicketPayload, VideoTicketParams,
AudioTicketParams, MontageClip, TicketPayload, VideoTicketParams,
};
use oak_timeline::undogeneral::TimelineAddTrackCommand;
use oak_timeline::undopointer::TrackPlaceBlockCommand;
use oak_timeline::util::NodeRef;
/// The shared project reference (the modules' domain project handle).
pub type ProjectRef = Arc<Mutex<Project>>;
@@ -663,7 +663,7 @@ pub fn render_frame(
m.tickets.wait(id).map_err(|e| e.to_string())?;
let result = m.tickets.result(id).ok_or_else(|| "render ticket produced no result".to_string())?;
match &result {
Ok(TicketPayload::Video(oak_render::texture::Texture::Cpu(frame))) => {
Ok(TicketPayload::Video(oak_core::texture::Texture::Cpu(frame))) => {
Ok(RenderedFrame {
width: frame.width,
height: frame.height,