core: merge oak-common into oak-core
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:
@@ -29,7 +29,7 @@
|
||||
|
||||
use std::sync::{Arc, Mutex, MutexGuard};
|
||||
|
||||
use oak_common::videoparams::VideoParams as CommonVideoParams;
|
||||
use oak_core::videoparams::VideoParams as CommonVideoParams;
|
||||
use oak_core::Rational;
|
||||
use oak_node::block::{BlockCore, ClipBlockBehavior, GapBlockBehavior, TransitionBlockBehavior};
|
||||
use oak_node::folder::FolderBehavior;
|
||||
@@ -288,25 +288,25 @@ impl TrackRange for GraphTrackRange<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Convert an oaknode video-params value to the oakcommon `VideoParams`
|
||||
/// Convert an oaknode video-params value to the oak_core `VideoParams`
|
||||
/// value type the task code works with (the C ABI marshalled the same
|
||||
/// fields).
|
||||
fn common_from_node_video(v: oak_node::value::VideoParams) -> CommonVideoParams {
|
||||
let mut p = CommonVideoParams::new_basic(
|
||||
v.width,
|
||||
v.height,
|
||||
oak_common::ocioutils::PixelFormat::from_code(v.pixel_format),
|
||||
v.channels,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
v.width,
|
||||
v.height,
|
||||
oak_core::ocioutils::PixelFormat::from_code(v.pixel_format),
|
||||
v.channels,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
);
|
||||
p.set_frame_rate(v.frame_rate.numerator() as i32, v.frame_rate.denominator() as i32);
|
||||
p
|
||||
}
|
||||
|
||||
/// Convert an oakcommon video-params value back to the oaknode value type
|
||||
/// Convert an oak_core video-params value back to the oaknode value type
|
||||
/// (the fields that survive the C ABI marshalling; `video_type`,
|
||||
/// `start_time`/`duration` and color fields have no oaknode counterpart).
|
||||
fn node_video_from_common(v: &CommonVideoParams) -> oak_node::value::VideoParams {
|
||||
@@ -320,7 +320,7 @@ fn node_video_from_common(v: &CommonVideoParams) -> oak_node::value::VideoParams
|
||||
}
|
||||
}
|
||||
|
||||
/// The sequence's `index`th video parameter stream as the oakcommon value
|
||||
/// The sequence's `index`th video parameter stream as the oak_core value
|
||||
/// type (`oaknode_sequence_get_video_params`).
|
||||
pub fn sequence_video_params(
|
||||
project: &ProjectRef,
|
||||
@@ -455,7 +455,7 @@ pub fn footage_total_stream_count(project: &ProjectRef, footage: NodeId) -> usiz
|
||||
.unwrap_or(0)
|
||||
}
|
||||
|
||||
/// The footage's `index`th video parameter stream as the oakcommon value
|
||||
/// The footage's `index`th video parameter stream as the oak_core value
|
||||
/// type (`oaknode_footage_get_video_params`).
|
||||
pub fn footage_video_params(
|
||||
project: &ProjectRef,
|
||||
|
||||
Reference in New Issue
Block a user