- 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)
63 lines
1.8 KiB
Rust
63 lines
1.8 KiB
Rust
// 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/>.
|
|
|
|
//! Error type for the oakotio binding.
|
|
|
|
use std::fmt;
|
|
|
|
/// Errors produced by loading or saving OpenTimelineIO JSON.
|
|
#[derive(Debug)]
|
|
pub enum OtioError {
|
|
/// The document could not be parsed (or a value could not be
|
|
/// serialized) as JSON.
|
|
Json(serde_json::Error),
|
|
/// The underlying file could not be read or written.
|
|
Io(std::io::Error),
|
|
}
|
|
|
|
impl fmt::Display for OtioError {
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
match self {
|
|
OtioError::Json(e) => write!(f, "OpenTimelineIO JSON error: {e}"),
|
|
OtioError::Io(e) => write!(f, "OpenTimelineIO file error: {e}"),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl std::error::Error for OtioError {
|
|
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
|
match self {
|
|
OtioError::Json(e) => Some(e),
|
|
OtioError::Io(e) => Some(e),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl From<serde_json::Error> for OtioError {
|
|
fn from(e: serde_json::Error) -> OtioError {
|
|
OtioError::Json(e)
|
|
}
|
|
}
|
|
|
|
impl From<std::io::Error> for OtioError {
|
|
fn from(e: std::io::Error) -> OtioError {
|
|
OtioError::Io(e)
|
|
}
|
|
}
|
|
|
|
/// Convenience alias used by the binding API.
|
|
pub type Result<T> = std::result::Result<T, OtioError>;
|