Skip to main content

IFrameStreamInf

Struct IFrameStreamInf 

Source
pub struct IFrameStreamInf<'a> { /* private fields */ }
Expand description

Implementations§

Source§

impl<'a> IFrameStreamInf<'a>

Source

pub fn builder() -> IFrameStreamInfBuilder<'a, IFrameStreamInfUriNeedsToBeSet, IFrameStreamInfBandwidthNeedsToBeSet>

Starts a builder for producing Self.

For example, we could construct a IFrameStreamInf as such:

let i_frame_stream_inf = IFrameStreamInf::builder()
    .with_uri("uri")
    .with_bandwidth(10000000)
    .with_codecs("hvc1.2.4.L153.b0")
    .with_supplemental_codecs("dvh1.08.07/db4h")
    .with_resolution(DecimalResolution { width: 3840, height: 2160 })
    .with_hdcp_level(HdcpLevel::Type1)
    .with_video_range(VideoRange::Hlg)
    .finish();

Note that the finish method is only callable if the builder has set uri AND bandwidth. Each of the following fail to compile:

let i_frame_stream_inf = IFrameStreamInf::builder().finish();
let i_frame_stream_inf = IFrameStreamInf::builder().with_uri("uri").finish();
let i_frame_stream_inf = IFrameStreamInf::builder().with_bandwidth(10000000).finish();
Source

pub fn uri(&self) -> &str

Corresponds to the URI attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn bandwidth(&self) -> u64

Corresponds to the BANDWIDTH attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn average_bandwidth(&self) -> Option<u64>

Corresponds to the AVERAGE-BANDWIDTH attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn score(&self) -> Option<f64>

Corresponds to the SCORE attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn codecs(&self) -> Option<&str>

Corresponds to the CODECS attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn supplemental_codecs(&self) -> Option<&str>

Corresponds to the SUPPLEMENTAL-CODECS attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn resolution(&self) -> Option<DecimalResolution>

Corresponds to the RESOLUTION attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn hdcp_level(&self) -> Option<EnumeratedString<'_, HdcpLevel>>

Corresponds to the HDCP-LEVEL attribute.

See Self for a link to the HLS documentation for this attribute.

Note that the convenience crate::tag::hls::GetKnown trait exists to make accessing the known case easier:

use quick_m3u8::tag::hls::GetKnown;

let tag = IFrameStreamInf::builder()
    .with_uri("uri")
    .with_bandwidth(10000000)
    .with_hdcp_level(HdcpLevel::Type0)
    .finish();
assert_eq!(Some(HdcpLevel::Type0), tag.hdcp_level().known());
Source

pub fn allowed_cpc(&self) -> Option<AllowedCpc<'_>>

Corresponds to the ALLOWED-CPC attribute.

See Self for a link to the HLS documentation for this attribute. See crate::tag::hls::StreamInf::allowed_cpc for more details on usage of this method.

Source

pub fn video_range(&self) -> Option<EnumeratedString<'_, VideoRange>>

Corresponds to the VIDEO-RANGE attribute.

See Self for a link to the HLS documentation for this attribute.

Note that the convenience crate::tag::hls::GetKnown trait exists to make accessing the known case easier:

use quick_m3u8::tag::hls::GetKnown;

let tag = IFrameStreamInf::builder()
    .with_uri("uri")
    .with_bandwidth(10000000)
    .with_video_range(VideoRange::Pq)
    .finish();
assert_eq!(Some(VideoRange::Pq), tag.video_range().known());
Source

pub fn req_video_layout(&self) -> Option<VideoLayout<'_>>

Corresponds to the REQ-VIDEO-LAYOUT attribute.

See Self for a link to the HLS documentation for this attribute.

See crate::tag::hls::StreamInf::req_video_layout for more information on usage of VideoLayout.

Source

pub fn stable_variant_id(&self) -> Option<&str>

Corresponds to the STABLE-VARIANT-ID attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn video(&self) -> Option<&str>

Corresponds to the VIDEO attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn pathway_id(&self) -> Option<&str>

Corresponds to the PATHWAY-ID attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_uri(&mut self, uri: impl Into<Cow<'a, str>>)

Sets the URI attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_bandwidth(&mut self, bandwidth: u64)

Sets the BANDWIDTH attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_average_bandwidth(&mut self, average_bandwidth: u64)

Sets the AVERAGE-BANDWIDTH attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn unset_average_bandwidth(&mut self)

Unsets the AVERAGE-BANDWIDTH attribute (sets it to None).

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_score(&mut self, score: f64)

Sets the SCORE attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn unset_score(&mut self)

Unsets the SCORE attribute (sets it to None).

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_codecs(&mut self, codecs: impl Into<Cow<'a, str>>)

Sets the CODECS attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn unset_codecs(&mut self)

Unsets the CODECS attribute (sets it to None).

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_supplemental_codecs( &mut self, supplemental_codecs: impl Into<Cow<'a, str>>, )

Sets the SUPPLEMENTAL-CODECS attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn unset_supplemental_codecs(&mut self)

Unsets the SUPPLEMENTAL-CODECS attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_resolution(&mut self, resolution: DecimalResolution)

Sets the RESOLUTION attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn unset_resolution(&mut self)

Unsets the RESOLUTION attribute (sets it to None).

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_hdcp_level(&mut self, hdcp_level: impl Into<Cow<'a, str>>)

Sets the HDCP-LEVEL attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn unset_hdcp_level(&mut self)

Unsets the HDCP-LEVEL attribute (sets it to None).

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_allowed_cpc(&mut self, allowed_cpc: impl Into<Cow<'a, str>>)

Sets the ALLOWED-CPC attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn unset_allowed_cpc(&mut self)

Unsets the ALLOWED-CPC attribute (sets it to None).

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_video_range(&mut self, video_range: impl Into<Cow<'a, str>>)

Sets the VIDEO-RANGE attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn unset_video_range(&mut self)

Unsets the VIDEO-RANGE attribute (sets it to None).

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_req_video_layout( &mut self, req_video_layout: impl Into<Cow<'a, str>>, )

Sets the REQ-VIDEO-LAYOUT attribute.

See Self for a link to the HLS documentation for this attribute.

See crate::tag::hls::StreamInf::set_req_video_layout for more information on how to use this method.

Source

pub fn unset_req_video_layout(&mut self)

Unsets the REQ-VIDEO-LAYOUT attribute (sets it to None).

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_stable_variant_id( &mut self, stable_variant_id: impl Into<Cow<'a, str>>, )

Sets the STABLE-VARIANT-ID attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn unset_stable_variant_id(&mut self)

Unsets the STABLE-VARIANT-ID attribute (sets it to None).

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_video(&mut self, video: impl Into<Cow<'a, str>>)

Sets the VIDEO attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn unset_video(&mut self)

Unsets the VIDEO attribute (sets it to None).

See Self for a link to the HLS documentation for this attribute.

Source

pub fn set_pathway_id(&mut self, pathway_id: impl Into<Cow<'a, str>>)

Sets the PATHWAY-ID attribute.

See Self for a link to the HLS documentation for this attribute.

Source

pub fn unset_pathway_id(&mut self)

Unsets the PATHWAY-ID attribute (sets it to None).

See Self for a link to the HLS documentation for this attribute.

Trait Implementations§

Source§

impl<'a> Clone for IFrameStreamInf<'a>

Source§

fn clone(&self) -> IFrameStreamInf<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for IFrameStreamInf<'a>

Source§

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

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

impl<'a, Custom> From<IFrameStreamInf<'a>> for HlsLine<'a, Custom>
where Custom: CustomTag<'a>,

Source§

fn from(tag: IFrameStreamInf<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> IntoInnerTag<'a> for IFrameStreamInf<'a>

Source§

fn into_inner(self) -> TagInner<'a>

Consume self and provide TagInner.
Source§

impl<'a> PartialEq for IFrameStreamInf<'a>

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<'a> TryFrom<UnknownTag<'a>> for IFrameStreamInf<'a>

Source§

type Error = ValidationError

The type returned in the event of a conversion error.
Source§

fn try_from(tag: UnknownTag<'a>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'a> Freeze for IFrameStreamInf<'a>

§

impl<'a> RefUnwindSafe for IFrameStreamInf<'a>

§

impl<'a> Send for IFrameStreamInf<'a>

§

impl<'a> Sync for IFrameStreamInf<'a>

§

impl<'a> Unpin for IFrameStreamInf<'a>

§

impl<'a> UnsafeUnpin for IFrameStreamInf<'a>

§

impl<'a> UnwindSafe for IFrameStreamInf<'a>

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, 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.