Skip to main content

shift_preflight/transformer/
video.rs

1//! Video transformation (v2).
2//!
3//! Future capabilities:
4//! - Frame sampling (extract N frames at intervals)
5//! - Keyframe extraction
6//! - Downscale resolution
7//! - Trim duration
8//! - Convert to frame sequence (for models that accept images but not video)
9
10use crate::policy::Action;
11use anyhow::Result;
12
13/// Apply a transformation action to video data.
14///
15/// **Not yet implemented.** Returns an error indicating video support is planned for v2.
16pub fn transform_video(_data: &[u8], _action: &Action) -> Result<Vec<u8>> {
17    anyhow::bail!("video transformation is not yet supported (planned for v2)")
18}
19
20#[cfg(test)]
21mod tests {
22    use super::*;
23
24    #[test]
25    fn test_video_transform_not_supported() {
26        let result = transform_video(b"fake video", &Action::Pass);
27        assert!(result.is_err());
28        assert!(result
29            .unwrap_err()
30            .to_string()
31            .contains("not yet supported"));
32    }
33}