[][src]Struct gstreamer_video::VideoTimeCode

pub struct VideoTimeCode(_);

field_count must be 0 for progressive video and 1 or 2 for interlaced.

A representation of a SMPTE time code.

hours must be positive and less than 24. Will wrap around otherwise. minutes and seconds must be positive and less than 60. frames must be less than or equal to config.fps_n / config.fps_d These values are NOT automatically normalized.

Feature: v1_10

Methods

impl VideoTimeCode[src]

pub fn new_empty() -> VideoTimeCode[src]

Feature: v1_10

Returns

a new empty, invalid VideoTimeCode

pub fn new(
    fps: Fraction,
    latest_daily_jam: Option<&DateTime>,
    flags: VideoTimeCodeFlags,
    hours: u32,
    minutes: u32,
    seconds: u32,
    frames: u32,
    field_count: u32
) -> Self
[src]

field_count is 0 for progressive, 1 or 2 for interlaced. latest_daiy_jam reference is stolen from caller.

Feature: v1_10

fps_n

Numerator of the frame rate

fps_d

Denominator of the frame rate

latest_daily_jam

The latest daily jam of the VideoTimeCode

flags

VideoTimeCodeFlags

hours

the hours field of VideoTimeCode

minutes

the minutes field of VideoTimeCode

seconds

the seconds field of VideoTimeCode

frames

the frames field of VideoTimeCode

field_count

Interlaced video field count

Returns

a new VideoTimeCode with the given values. The values are not checked for being in a valid range. To see if your timecode actually has valid content, use VideoTimeCode::is_valid.

pub fn new_from_date_time(
    fps: Fraction,
    dt: &DateTime,
    flags: VideoTimeCodeFlags,
    field_count: u32
) -> Result<VideoTimeCode, BoolError>
[src]

The resulting config->latest_daily_jam is set to midnight, and timecode is set to the given time.

This might return a completely invalid timecode, use VideoTimeCode::new_from_date_time_full to ensure that you would get None instead in that case.

Feature: v1_12

fps_n

Numerator of the frame rate

fps_d

Denominator of the frame rate

dt

glib::DateTime to convert

flags

VideoTimeCodeFlags

field_count

Interlaced video field count

Returns

the VideoTimeCode representation of dt.

pub fn is_valid(&self) -> bool[src]

Feature: v1_10

Returns

whether self is a valid timecode (supported frame rate, hours/minutes/seconds/frames not overflowing)

pub fn set_fps(&mut self, fps: Fraction)[src]

pub fn set_flags(&mut self, flags: VideoTimeCodeFlags)[src]

pub fn set_hours(&mut self, hours: u32)[src]

pub fn set_minutes(&mut self, minutes: u32)[src]

pub fn set_seconds(&mut self, seconds: u32)[src]

pub fn set_frames(&mut self, frames: u32)[src]

pub fn set_field_count(&mut self, field_count: u32)[src]

impl VideoTimeCode[src]

pub fn get_hours(&self) -> u32[src]

pub fn get_minutes(&self) -> u32[src]

pub fn get_seconds(&self) -> u32[src]

pub fn get_frames(&self) -> u32[src]

pub fn get_field_count(&self) -> u32[src]

pub fn get_fps(&self) -> Fraction[src]

pub fn get_flags(&self) -> VideoTimeCodeFlags[src]

pub fn get_latest_daily_jam(&self) -> Option<DateTime>[src]

pub fn set_latest_daily_jam(&mut self, latest_daily_jam: Option<&DateTime>)[src]

Trait Implementations

impl Clone for VideoTimeCode[src]

impl Debug for VideoTimeCode[src]

impl Display for VideoTimeCode[src]

impl Drop for VideoTimeCode[src]

impl From<ValidVideoTimeCode> for VideoTimeCode[src]

impl FromStr for VideoTimeCode[src]

type Err = BoolError

The associated error which can be returned from parsing.

impl Send for VideoTimeCode[src]

impl StaticType for VideoTimeCode[src]

impl Sync for VideoTimeCode[src]

impl TryFrom<VideoTimeCode> for ValidVideoTimeCode[src]

type Error = VideoTimeCode

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for VideoTimeCode

impl Unpin for VideoTimeCode

impl UnwindSafe for VideoTimeCode

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.