feat(engine): clip move, clip effect_input, mandatory static FFmpeg
- oakengine_sequence_move_clip implemented for real (oaktimeline TrackMoveBlockCommand; fixes the graph-ownership/gap-anchor/ripple trim bugs the stub was hiding); same-track via the frozen C ABI, cross-track supported by the module command - oaknode clip blocks now declare a tex_in texture input and set effect_input to it, so timeline clips can host effect chains; facade test covers effect insert/remove on a real clip - oakffmpeg-link: FFMPEG_DIR is now mandatory with a clear panic (a Homebrew upgrade left the system ffmpeg .pc pointing at a deleted dav1d Cellar path, breaking links); reads a git-ignored workspace .env for IDEs that cannot inject env vars (RustRover); links the C++ stdlib for C++ codec libs (svt-av1) - oakengine re-exports oaknode so tests share one crate instance; it_node uses the direct instance's value type where it calls the module FFI (the --workspace dev-dependency feature split builds oaknode twice)
This commit is contained in:
@@ -139,12 +139,12 @@ pub fn create_from_params(params: &EncodingParams) -> Option<Arc<dyn Encoder>> {
|
||||
}
|
||||
}
|
||||
match encoder_type_from_format(params.format) {
|
||||
Some(EncoderType::FFmpeg) => {
|
||||
Some(Arc::new(crate::ffmpeg::FFmpegEncoder::with_params(params.clone())))
|
||||
}
|
||||
Some(EncoderType::OIIO) => {
|
||||
Some(Arc::new(crate::oiio::OIIOEncoder { params: params.clone() }))
|
||||
}
|
||||
Some(EncoderType::FFmpeg) => Some(Arc::new(crate::ffmpeg::FFmpegEncoder::with_params(
|
||||
params.clone(),
|
||||
))),
|
||||
Some(EncoderType::OIIO) => Some(Arc::new(crate::oiio::OIIOEncoder {
|
||||
params: params.clone(),
|
||||
})),
|
||||
None => None,
|
||||
}
|
||||
}
|
||||
@@ -230,9 +230,7 @@ pub fn filename_remove_digit_placeholder(filename: &str) -> String {
|
||||
while i < bytes.len() {
|
||||
// A separator is consumed only when a placeholder follows it.
|
||||
let ph_start = match bytes[i] {
|
||||
b'-' | b'.' | b' ' | b'_' if placeholder_range(bytes, i + 1).is_some() => {
|
||||
i + 1
|
||||
}
|
||||
b'-' | b'.' | b' ' | b'_' if placeholder_range(bytes, i + 1).is_some() => i + 1,
|
||||
_ => i,
|
||||
};
|
||||
match placeholder_range(bytes, ph_start) {
|
||||
@@ -289,16 +287,25 @@ mod tests {
|
||||
assert!(!filename_contains_digit_placeholder("out[].png"));
|
||||
|
||||
// digit count: number of '#' in the first placeholder.
|
||||
assert_eq!(image_sequence_placeholder_digit_count("/tmp/out_[#####].png"), 5);
|
||||
assert_eq!(
|
||||
image_sequence_placeholder_digit_count("/tmp/out_[#####].png"),
|
||||
5
|
||||
);
|
||||
assert_eq!(image_sequence_placeholder_digit_count("out[#].png"), 1);
|
||||
assert_eq!(image_sequence_placeholder_digit_count("a[##]b[####]c"), 2);
|
||||
assert_eq!(image_sequence_placeholder_digit_count("/tmp/out.png"), 0);
|
||||
|
||||
// remove: separator char before the placeholder goes with it.
|
||||
assert_eq!(filename_remove_digit_placeholder("/tmp/out_[#####].png"), "/tmp/out.png");
|
||||
assert_eq!(
|
||||
filename_remove_digit_placeholder("/tmp/out_[#####].png"),
|
||||
"/tmp/out.png"
|
||||
);
|
||||
assert_eq!(filename_remove_digit_placeholder("out[###].png"), "out.png");
|
||||
assert_eq!(filename_remove_digit_placeholder("a_[#]b_[###]c"), "abc");
|
||||
assert_eq!(filename_remove_digit_placeholder("/tmp/out.png"), "/tmp/out.png");
|
||||
assert_eq!(
|
||||
filename_remove_digit_placeholder("/tmp/out.png"),
|
||||
"/tmp/out.png"
|
||||
);
|
||||
}
|
||||
|
||||
struct UnimplementedDummy;
|
||||
|
||||
Reference in New Issue
Block a user