pub struct IFrameStreamInf<'a> { /* private fields */ }Expand description
Corresponds to the #EXT-X-I-FRAME-STREAM-INF tag.
https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-18#section-4.4.6.3
Implementations§
Source§impl<'a> IFrameStreamInf<'a>
impl<'a> IFrameStreamInf<'a>
Sourcepub fn builder() -> IFrameStreamInfBuilder<'a, IFrameStreamInfUriNeedsToBeSet, IFrameStreamInfBandwidthNeedsToBeSet>
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();Sourcepub fn uri(&self) -> &str
pub fn uri(&self) -> &str
Corresponds to the URI attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn bandwidth(&self) -> u64
pub fn bandwidth(&self) -> u64
Corresponds to the BANDWIDTH attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn average_bandwidth(&self) -> Option<u64>
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.
Sourcepub fn score(&self) -> Option<f64>
pub fn score(&self) -> Option<f64>
Corresponds to the SCORE attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn codecs(&self) -> Option<&str>
pub fn codecs(&self) -> Option<&str>
Corresponds to the CODECS attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn supplemental_codecs(&self) -> Option<&str>
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.
Sourcepub fn resolution(&self) -> Option<DecimalResolution>
pub fn resolution(&self) -> Option<DecimalResolution>
Corresponds to the RESOLUTION attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn hdcp_level(&self) -> Option<EnumeratedString<'_, HdcpLevel>>
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());Sourcepub fn allowed_cpc(&self) -> Option<AllowedCpc<'_>>
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.
Sourcepub fn video_range(&self) -> Option<EnumeratedString<'_, VideoRange>>
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());Sourcepub fn req_video_layout(&self) -> Option<VideoLayout<'_>>
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.
Sourcepub fn stable_variant_id(&self) -> Option<&str>
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.
Sourcepub fn video(&self) -> Option<&str>
pub fn video(&self) -> Option<&str>
Corresponds to the VIDEO attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn pathway_id(&self) -> Option<&str>
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.
Sourcepub fn set_uri(&mut self, uri: impl Into<Cow<'a, str>>)
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.
Sourcepub fn set_bandwidth(&mut self, bandwidth: u64)
pub fn set_bandwidth(&mut self, bandwidth: u64)
Sets the BANDWIDTH attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn set_average_bandwidth(&mut self, average_bandwidth: u64)
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.
Sourcepub fn unset_average_bandwidth(&mut self)
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.
Sourcepub fn set_score(&mut self, score: f64)
pub fn set_score(&mut self, score: f64)
Sets the SCORE attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn unset_score(&mut self)
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.
Sourcepub fn set_codecs(&mut self, codecs: impl Into<Cow<'a, str>>)
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.
Sourcepub fn unset_codecs(&mut self)
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.
Sourcepub fn set_supplemental_codecs(
&mut self,
supplemental_codecs: impl Into<Cow<'a, str>>,
)
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.
Sourcepub fn unset_supplemental_codecs(&mut self)
pub fn unset_supplemental_codecs(&mut self)
Unsets the SUPPLEMENTAL-CODECS attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn set_resolution(&mut self, resolution: DecimalResolution)
pub fn set_resolution(&mut self, resolution: DecimalResolution)
Sets the RESOLUTION attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn unset_resolution(&mut self)
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.
Sourcepub fn set_hdcp_level(&mut self, hdcp_level: impl Into<Cow<'a, str>>)
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.
Sourcepub fn unset_hdcp_level(&mut self)
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.
Sourcepub fn set_allowed_cpc(&mut self, allowed_cpc: impl Into<Cow<'a, str>>)
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.
Sourcepub fn unset_allowed_cpc(&mut self)
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.
Sourcepub fn set_video_range(&mut self, video_range: impl Into<Cow<'a, str>>)
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.
Sourcepub fn unset_video_range(&mut self)
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.
Sourcepub fn set_req_video_layout(
&mut self,
req_video_layout: impl Into<Cow<'a, str>>,
)
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.
Sourcepub fn unset_req_video_layout(&mut self)
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.
Sourcepub fn set_stable_variant_id(
&mut self,
stable_variant_id: impl Into<Cow<'a, str>>,
)
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.
Sourcepub fn unset_stable_variant_id(&mut self)
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.
Sourcepub fn set_video(&mut self, video: impl Into<Cow<'a, str>>)
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.
Sourcepub fn unset_video(&mut self)
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.
Sourcepub fn set_pathway_id(&mut self, pathway_id: impl Into<Cow<'a, str>>)
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.
Sourcepub fn unset_pathway_id(&mut self)
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>
impl<'a> Clone for IFrameStreamInf<'a>
Source§fn clone(&self) -> IFrameStreamInf<'a>
fn clone(&self) -> IFrameStreamInf<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for IFrameStreamInf<'a>
impl<'a> Debug for IFrameStreamInf<'a>
Source§impl<'a, Custom> From<IFrameStreamInf<'a>> for HlsLine<'a, Custom>where
Custom: CustomTag<'a>,
impl<'a, Custom> From<IFrameStreamInf<'a>> for HlsLine<'a, Custom>where
Custom: CustomTag<'a>,
Source§fn from(tag: IFrameStreamInf<'a>) -> Self
fn from(tag: IFrameStreamInf<'a>) -> Self
Source§impl<'a> IntoInnerTag<'a> for IFrameStreamInf<'a>
impl<'a> IntoInnerTag<'a> for IFrameStreamInf<'a>
Source§fn into_inner(self) -> TagInner<'a>
fn into_inner(self) -> TagInner<'a>
self and provide TagInner.