#[non_exhaustive]
pub struct SegmentDetection { pub type: Option<SegmentType>, pub start_timestamp_millis: i64, pub end_timestamp_millis: i64, pub duration_millis: Option<i64>, pub start_timecode_smpte: Option<String>, pub end_timecode_smpte: Option<String>, pub duration_smpte: Option<String>, pub technical_cue_segment: Option<TechnicalCueSegment>, pub shot_segment: Option<ShotSegment>, pub start_frame_number: Option<i64>, pub end_frame_number: Option<i64>, pub duration_frames: Option<i64>, }
Expand description

A technical cue or shot detection segment detected in a video. An array of SegmentDetection objects containing all segments detected in a stored video is returned by GetSegmentDetection.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§type: Option<SegmentType>

The type of the segment. Valid values are TECHNICAL_CUE and SHOT.

§start_timestamp_millis: i64

The start time of the detected segment in milliseconds from the start of the video. This value is rounded down. For example, if the actual timestamp is 100.6667 milliseconds, Amazon Rekognition Video returns a value of 100 millis.

§end_timestamp_millis: i64

The end time of the detected segment, in milliseconds, from the start of the video. This value is rounded down.

§duration_millis: Option<i64>

The duration of the detected segment in milliseconds.

§start_timecode_smpte: Option<String>

The frame-accurate SMPTE timecode, from the start of a video, for the start of a detected segment. StartTimecode is in HH:MM:SS:fr format (and ;fr for drop frame-rates).

§end_timecode_smpte: Option<String>

The frame-accurate SMPTE timecode, from the start of a video, for the end of a detected segment. EndTimecode is in HH:MM:SS:fr format (and ;fr for drop frame-rates).

§duration_smpte: Option<String>

The duration of the timecode for the detected segment in SMPTE format.

§technical_cue_segment: Option<TechnicalCueSegment>

If the segment is a technical cue, contains information about the technical cue.

§shot_segment: Option<ShotSegment>

If the segment is a shot detection, contains information about the shot detection.

§start_frame_number: Option<i64>

The frame number of the start of a video segment, using a frame index that starts with 0.

§end_frame_number: Option<i64>

The frame number at the end of a video segment, using a frame index that starts with 0.

§duration_frames: Option<i64>

The duration of a video segment, expressed in frames.

Implementations§

source§

impl SegmentDetection

source

pub fn type(&self) -> Option<&SegmentType>

The type of the segment. Valid values are TECHNICAL_CUE and SHOT.

source

pub fn start_timestamp_millis(&self) -> i64

The start time of the detected segment in milliseconds from the start of the video. This value is rounded down. For example, if the actual timestamp is 100.6667 milliseconds, Amazon Rekognition Video returns a value of 100 millis.

source

pub fn end_timestamp_millis(&self) -> i64

The end time of the detected segment, in milliseconds, from the start of the video. This value is rounded down.

source

pub fn duration_millis(&self) -> Option<i64>

The duration of the detected segment in milliseconds.

source

pub fn start_timecode_smpte(&self) -> Option<&str>

The frame-accurate SMPTE timecode, from the start of a video, for the start of a detected segment. StartTimecode is in HH:MM:SS:fr format (and ;fr for drop frame-rates).

source

pub fn end_timecode_smpte(&self) -> Option<&str>

The frame-accurate SMPTE timecode, from the start of a video, for the end of a detected segment. EndTimecode is in HH:MM:SS:fr format (and ;fr for drop frame-rates).

source

pub fn duration_smpte(&self) -> Option<&str>

The duration of the timecode for the detected segment in SMPTE format.

source

pub fn technical_cue_segment(&self) -> Option<&TechnicalCueSegment>

If the segment is a technical cue, contains information about the technical cue.

source

pub fn shot_segment(&self) -> Option<&ShotSegment>

If the segment is a shot detection, contains information about the shot detection.

source

pub fn start_frame_number(&self) -> Option<i64>

The frame number of the start of a video segment, using a frame index that starts with 0.

source

pub fn end_frame_number(&self) -> Option<i64>

The frame number at the end of a video segment, using a frame index that starts with 0.

source

pub fn duration_frames(&self) -> Option<i64>

The duration of a video segment, expressed in frames.

source§

impl SegmentDetection

source

pub fn builder() -> SegmentDetectionBuilder

Creates a new builder-style object to manufacture SegmentDetection.

Trait Implementations§

source§

impl Clone for SegmentDetection

source§

fn clone(&self) -> SegmentDetection

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SegmentDetection

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<SegmentDetection> for SegmentDetection

source§

fn eq(&self, other: &SegmentDetection) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for SegmentDetection

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more