Struct gstreamer_video::VideoTimeCode [−][src]
pub struct VideoTimeCode(_);
Expand description
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
/ config
These values are NOT automatically normalized.
Implementations
This is supported on crate feature v1_10
only.
v1_10
only.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]This is supported on crate feature v1_10
only.
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]v1_10
only.field_count
is 0 for progressive, 1 or 2 for interlaced.
latest_daiy_jam
reference is stolen from caller.
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
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 is_valid()
.
pub fn from_date_time(
fps: Fraction,
dt: &DateTime,
flags: VideoTimeCodeFlags,
field_count: u32
) -> Result<Self, BoolError>
[src]This is supported on crate features v1_10
and v1_16
only.
pub fn from_date_time(
fps: Fraction,
dt: &DateTime,
flags: VideoTimeCodeFlags,
field_count: u32
) -> Result<Self, BoolError>
[src]v1_10
and v1_16
only.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
[from_date_time_full()
][Self::from_date_time_full()] to ensure
that you would get None
instead in that case.
fps_n
Numerator of the frame rate
fps_d
Denominator of the frame rate
dt
glib::DateTime
to convert
flags
field_count
Interlaced video field count
Returns
the VideoTimeCode
representation of dt
.
This is supported on crate feature v1_10
only.
v1_10
only.Returns
whether self
is a valid timecode (supported frame rate,
hours/minutes/seconds/frames not overflowing)
v1_10
only.v1_10
only.v1_10
only.v1_10
only.v1_10
only.v1_10
only.v1_10
only.v1_10
only.v1_10
only.v1_10
only.v1_10
only.v1_10
only.v1_10
only.v1_10
only.v1_10
only.v1_10
only.Trait Implementations
v1_10
only.v1_10
only.v1_10
only.v1_10
only.v1_10
only.Performs the conversion.
v1_10
and v1_12
only.v1_10
only.Returns the type identifier of Self
.
v1_10
only.type Error = VideoTimeCode
type Error = VideoTimeCode
The type returned in the event of a conversion error.
Performs the conversion.
v1_10
only.v1_10
only.v1_10
only.Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a SendValue
clone of self
.
impl<'a, T, C> FromValueOptional<'a> for T where
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
T: FromValue<'a, Checker = C>,
[src]