[−][src]Struct gstreamer_video::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]
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]
fps: Fraction,
latest_daily_jam: Option<&DateTime>,
flags: VideoTimeCodeFlags,
hours: u32,
minutes: u32,
seconds: u32,
frames: u32,
field_count: u32
) -> Self
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]
fps: Fraction,
dt: &DateTime,
flags: VideoTimeCodeFlags,
field_count: u32
) -> Result<VideoTimeCode, BoolError>
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]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for VideoTimeCode
[src]
impl Display for VideoTimeCode
[src]
impl Drop for VideoTimeCode
[src]
impl From<ValidVideoTimeCode> for VideoTimeCode
[src]
fn from(v: ValidVideoTimeCode) -> VideoTimeCode
[src]
impl FromStr for VideoTimeCode
[src]
type Err = BoolError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, BoolError>
[src]
impl Send for VideoTimeCode
[src]
impl StaticType for VideoTimeCode
[src]
fn static_type() -> Type
[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.
fn try_from(v: VideoTimeCode) -> Result<ValidVideoTimeCode, VideoTimeCode>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToSendValue for T where
T: ToValue + SetValue + Send + ?Sized,
[src]
T: ToValue + SetValue + Send + ?Sized,
fn to_send_value(&self) -> SendValue
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToValue for T where
T: SetValue + ?Sized,
[src]
T: SetValue + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,