pub struct SceneSegment {
pub start_frame: u64,
pub end_frame: u64,
pub duration_frames: u32,
pub motion_score: f32,
pub complexity: f32,
pub is_dark: bool,
pub scene_type: SceneType,
}Expand description
A contiguous segment of frames identified as a distinct scene.
Fields§
§start_frame: u64Index of the first frame (inclusive).
end_frame: u64Index of the last frame (inclusive).
duration_frames: u32Number of frames in this segment.
motion_score: f32Normalised motion score in [0.0, 1.0].
complexity: f32Normalised spatial complexity in [0.0, 1.0].
is_dark: boolWhether the scene is predominantly dark (low average luma).
scene_type: SceneTypeContent-type classification.
Implementations§
Source§impl SceneSegment
impl SceneSegment
Sourcepub fn new(
start_frame: u64,
end_frame: u64,
duration_frames: u32,
motion_score: f32,
complexity: f32,
is_dark: bool,
scene_type: SceneType,
) -> Self
pub fn new( start_frame: u64, end_frame: u64, duration_frames: u32, motion_score: f32, complexity: f32, is_dark: bool, scene_type: SceneType, ) -> Self
Constructs a new SceneSegment with explicit fields.
Sourcepub fn frame_count(&self) -> u32
pub fn frame_count(&self) -> u32
Returns the number of frames (alias for clarity).
Sourcepub fn duration_secs(&self, fps: f32) -> f32
pub fn duration_secs(&self, fps: f32) -> f32
Returns the duration in seconds at the given frame rate.
Trait Implementations§
Source§impl Clone for SceneSegment
impl Clone for SceneSegment
Source§fn clone(&self) -> SceneSegment
fn clone(&self) -> SceneSegment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SceneSegment
impl Debug for SceneSegment
Source§impl<'de> Deserialize<'de> for SceneSegment
impl<'de> Deserialize<'de> for SceneSegment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SceneSegment
impl RefUnwindSafe for SceneSegment
impl Send for SceneSegment
impl Sync for SceneSegment
impl Unpin for SceneSegment
impl UnsafeUnpin for SceneSegment
impl UnwindSafe for SceneSegment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more