gstreamer::segment

Type Alias Segment

Source
pub type Segment = FormattedSegment<GenericFormattedValue>;

Aliased Type§

struct Segment {
    pub(crate) inner: GstSegment,
    pub(crate) phantom: PhantomData<GenericFormattedValue>,
}

Fields§

§inner: GstSegment§phantom: PhantomData<GenericFormattedValue>

Implementations§

Source§

impl Segment

Source

pub fn reset_with_format(&mut self, format: Format)

Source

pub fn set_format(&mut self, format: Format)

Source

pub fn downcast<T: FormattedValueIntrinsic>( self, ) -> Result<FormattedSegment<T>, Self>

Source

pub fn downcast_ref<T: FormattedValueIntrinsic>( &self, ) -> Option<&FormattedSegment<T>>

Source

pub fn downcast_mut<T: FormattedValueIntrinsic>( &mut self, ) -> Option<&mut FormattedSegment<T>>

Source§

impl<T: FormattedValueIntrinsic> FormattedSegment<T>

Source

pub fn as_ptr(&self) -> *mut GstSegment

Source

pub unsafe fn from_glib_ptr_borrow<'a>(ptr: *const GstSegment) -> &'a Self

Borrows the underlying C value.

Source

pub unsafe fn from_glib_ptr_borrow_mut<'a>(ptr: *mut GstSegment) -> &'a mut Self

Borrows the underlying C value mutably.

Source§

impl<T> FormattedSegment<T>

Source

pub fn position_from_running_time( &self, running_time: impl CompatibleFormattedValue<T>, ) -> T::FullRange

Source

pub fn position_from_stream_time( &self, stream_time: impl CompatibleFormattedValue<T>, ) -> T::FullRange

Source

pub fn to_running_time( &self, position: impl CompatibleFormattedValue<T>, ) -> T::FullRange

Source

pub fn to_stream_time( &self, position: impl CompatibleFormattedValue<T>, ) -> T::FullRange

Source§

impl<T> FormattedSegment<T>

Source§

impl<T: FormattedValueIntrinsic> FormattedSegment<T>

Source

pub fn new() -> Self

Source

pub fn upcast(self) -> Segment

Source

pub fn upcast_ref(&self) -> &Segment

Source

pub fn reset(&mut self)

Source

pub fn clip( &self, start: impl CompatibleFormattedValue<T>, stop: impl CompatibleFormattedValue<T>, ) -> Option<(T::FullRange, T::FullRange)>

Source

pub fn do_seek( &mut self, rate: f64, flags: SeekFlags, start_type: SeekType, start: impl CompatibleFormattedValue<T>, stop_type: SeekType, stop: impl CompatibleFormattedValue<T>, ) -> Option<bool>

Source

pub fn offset_running_time(&mut self, offset: i64) -> Result<(), BoolError>

Source

pub fn set_running_time( &mut self, running_time: impl CompatibleFormattedValue<T>, ) -> Result<(), BoolError>

Source

pub fn flags(&self) -> SegmentFlags

Source

pub fn set_flags(&mut self, flags: SegmentFlags)

Source

pub fn rate(&self) -> f64

Source

pub fn set_rate(&mut self, rate: f64)

Source

pub fn applied_rate(&self) -> f64

Source

pub fn set_applied_rate(&mut self, applied_rate: f64)

Source

pub fn format(&self) -> Format

Source

pub fn base(&self) -> T::FullRange

Source

pub fn set_base(&mut self, base: impl CompatibleFormattedValue<T>)

Source

pub fn offset(&self) -> T::FullRange

Source

pub fn set_offset(&mut self, offset: impl CompatibleFormattedValue<T>)

Source

pub fn start(&self) -> T::FullRange

Source

pub fn set_start(&mut self, start: impl CompatibleFormattedValue<T>)

Source

pub fn stop(&self) -> T::FullRange

Source

pub fn set_stop(&mut self, stop: impl CompatibleFormattedValue<T>)

Source

pub fn time(&self) -> T::FullRange

Source

pub fn set_time(&mut self, time: impl CompatibleFormattedValue<T>)

Source

pub fn position(&self) -> T::FullRange

Source

pub fn set_position(&mut self, position: impl CompatibleFormattedValue<T>)

Source

pub fn duration(&self) -> T::FullRange

Source

pub fn set_duration(&mut self, duration: impl CompatibleFormattedValue<T>)

Trait Implementations§

Source§

impl ValueType for Segment

Source§

impl<T: FormattedValueIntrinsic> AsRef<FormattedSegment<GenericFormattedValue>> for FormattedSegment<T>

Source§

fn as_ref(&self) -> &Segment

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T: FormattedValueIntrinsic> Clone for FormattedSegment<T>

Source§

fn clone(&self) -> Self

Copies the inline boxed type by value with the type-specific copy function.

1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<T: FormattedValueIntrinsic> Debug for FormattedSegment<T>

Source§

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

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

impl<T: FormattedValueIntrinsic> Default for FormattedSegment<T>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T: FormattedValueIntrinsic> Drop for FormattedSegment<T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<T: FormattedValueIntrinsic> PartialEq for FormattedSegment<T>

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: FormattedValueIntrinsic> StaticType for FormattedSegment<T>

Source§

fn static_type() -> Type

Returns the type identifier of Self.
Source§

impl<T: FormattedValueIntrinsic> Eq for FormattedSegment<T>

Source§

impl<T: FormattedValueIntrinsic> Send for FormattedSegment<T>

Source§

impl<T: FormattedValueIntrinsic> Sync for FormattedSegment<T>