rskit_media/ops/
scene_detect.rs1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct SceneDetectConfig {
8 pub threshold: f32,
10 pub min_scene_duration: f64,
12 pub method: SceneDetectMethod,
14}
15
16impl Default for SceneDetectConfig {
17 fn default() -> Self {
18 Self {
19 threshold: 0.3,
20 min_scene_duration: 1.0,
21 method: SceneDetectMethod::ContentAware,
22 }
23 }
24}
25
26#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
28#[non_exhaustive]
29pub enum SceneDetectMethod {
30 ContentAware,
32 Threshold,
34}