1#![allow(missing_docs)]
4
5use oximedia_core::OxiError;
6
7pub type EditResult<T> = Result<T, EditError>;
9
10#[derive(Debug, thiserror::Error)]
12pub enum EditError {
13 #[error("Track index {0} out of bounds (total tracks: {1})")]
15 InvalidTrackIndex(usize, usize),
16
17 #[error("Clip with ID {0} not found")]
19 ClipNotFound(u64),
20
21 #[error("Invalid time range: {start} to {end}")]
23 InvalidTimeRange { start: i64, end: i64 },
24
25 #[error("Invalid transition: {0}")]
27 InvalidTransition(String),
28
29 #[error("Clip overlap at time {0} on track {1}")]
31 ClipOverlap(i64, usize),
32
33 #[error("Track type mismatch: track expects {expected:?} clip but got {got:?}")]
35 TrackTypeMismatch {
36 expected: crate::clip::ClipType,
38 got: crate::clip::ClipType,
40 },
41
42 #[error("Invalid edit operation: {0}")]
44 InvalidEdit(String),
45
46 #[error("Invalid operation: {0}")]
48 InvalidOperation(String),
49
50 #[error("Keyframe error: {0}")]
52 KeyframeError(String),
53
54 #[error("Render error: {0}")]
56 RenderError(String),
57
58 #[error("Codec error: {0}")]
60 CodecError(#[from] OxiError),
61
62 #[error("I/O error: {0}")]
64 IoError(#[from] std::io::Error),
65
66 #[error("Filter graph error: {0}")]
68 GraphError(#[from] oximedia_graph::GraphError),
69}