Skip to main content

MediaClockSource

Struct MediaClockSource 

Source
pub struct MediaClockSource {
    pub id: Option<MediaClockId>,
    pub clock: MediaClock,
}
Expand description

Media clock source type enumeration.

This maps to the mediaclk attribute.

Fields§

§id: Option<MediaClockId>§clock: MediaClock

Implementations§

Source§

impl MediaClockSource

Source

pub fn new(clock: impl Into<MediaClock>) -> Self

Constructs a MediaClockSource from the specified MediaClock.

Source

pub fn with_clock_id(clock: impl Into<MediaClock>, id: MediaClockId) -> Self

Constructs a MediaClockSource from the specified MediaClock and MediaClockId.

Source

pub fn new_direct() -> Self

Constructs a direct MediaClockSource.

Source

pub fn from_direct_offset(offset: u32) -> Self

Constructs a direct MediaClockSource from the specified offset.

Source

pub fn from_direct_offset_with_id(offset: u32, id: MediaClockId) -> Self

Constructs a direct MediaClockSource from the specified offset and MediaClockId.

Source

pub fn from_direct_rate(rate: impl Into<Rate>) -> Self

Constructs a direct MediaClockSource from the specified rate.

Source

pub fn from_direct_rate_with_id(rate: impl Into<Rate>, id: MediaClockId) -> Self

Constructs a direct MediaClockSource from the specified rate and MediaClockId.

Source

pub fn from_direct_offset_and_rate(offset: u32, rate: impl Into<Rate>) -> Self

Constructs a direct MediaClockSource from the specified offset and rate.

Source

pub fn from_direct_offset_and_rate_with_id( offset: u32, rate: impl Into<Rate>, id: MediaClockId, ) -> Self

Constructs a direct MediaClockSource from the specified offset, rate and MediaClockId.

Source

pub fn from_ieee1722_stream_id(ieee1722_stream_id: Eui64) -> Self

Constructs a MediaClockSource from the specified IEEE1722 stream id.

Source

pub fn from_ieee1722_stream_id_with_id( ieee1722_stream_id: Eui64, id: MediaClockId, ) -> Self

Constructs a MediaClockSource from the specified IEEE1722 stream id and MediaClockId.

Source

pub fn from_extended_name(name: impl ToString) -> Self

Constructs an extended MediaClockSource from the specified name.

Source

pub fn from_extended_name_with_id(name: impl ToString, id: MediaClockId) -> Self

Constructs an extended MediaClockSource from the specified name and MediaClockId.

Source

pub fn from_extended_name_with_value( name: impl ToString, value: impl ToString, ) -> Self

Constructs an extended MediaClockSource from the specified name and value.

Source

pub fn from_extended_name_with_value_with_id( name: impl ToString, value: impl ToString, id: MediaClockId, ) -> Self

Constructs an extended MediaClockSource from the specified name and value and MediaClockId.

Source

pub fn set_id(&mut self, id: MediaClockId)

Source

pub fn builder(clock: impl Into<MediaClock>) -> MediaClockSource

Trait Implementations§

Source§

impl Clone for MediaClockSource

Source§

fn clone(&self) -> MediaClockSource

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for MediaClockSource

Source§

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

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

impl Default for MediaClockSource

Source§

fn default() -> MediaClockSource

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

impl Display for MediaClockSource

Source§

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

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

impl Eq for MediaClockSource

Source§

impl<T: Into<MediaClock>> From<T> for MediaClockSource

Source§

fn from(media_clock: T) -> Self

Converts to this type from the input type.
Source§

impl FromStr for MediaClockSource

Source§

type Err = AttributeError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, AttributeError>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for MediaClockSource

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MediaClockSource

Source§

impl TypedAttribute for MediaClockSource

Source§

const NAME: &'static str = "mediaclk"

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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> ToOwned for T
where T: Clone,

Source§

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.