Skip to main content

shift_preflight/inspector/
video.rs

1//! Video inspection (v2).
2//!
3//! Future capabilities:
4//! - Detect video format (MP4, WebM, MOV)
5//! - Extract duration, resolution, frame rate, codec
6//! - Identify keyframes
7//! - Estimate token cost per frame
8
9use super::ImageMetadata;
10use anyhow::Result;
11
12/// Inspect video bytes and extract metadata.
13///
14/// **Not yet implemented.** Returns an error indicating video support is planned for v2.
15pub fn inspect_bytes(_data: &[u8]) -> Result<ImageMetadata> {
16    anyhow::bail!("video inspection is not yet supported (planned for v2)")
17}
18
19#[cfg(test)]
20mod tests {
21    use super::*;
22
23    #[test]
24    fn test_video_not_supported() {
25        let result = inspect_bytes(b"fake video data");
26        assert!(result.is_err());
27        assert!(result
28            .unwrap_err()
29            .to_string()
30            .contains("not yet supported"));
31    }
32}