#[non_exhaustive]pub struct DashPackageBuilder { /* private fields */ }
Expand description
A builder for DashPackage
.
Implementations§
Source§impl DashPackageBuilder
impl DashPackageBuilder
Sourcepub fn ad_triggers(self, input: AdTriggersElement) -> Self
pub fn ad_triggers(self, input: AdTriggersElement) -> Self
Appends an item to ad_triggers
.
To override the contents of this collection use set_ad_triggers
.
A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
Sourcepub fn set_ad_triggers(self, input: Option<Vec<AdTriggersElement>>) -> Self
pub fn set_ad_triggers(self, input: Option<Vec<AdTriggersElement>>) -> Self
A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
Sourcepub fn get_ad_triggers(&self) -> &Option<Vec<AdTriggersElement>>
pub fn get_ad_triggers(&self) -> &Option<Vec<AdTriggersElement>>
A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types.
Sourcepub fn ads_on_delivery_restrictions(
self,
input: AdsOnDeliveryRestrictions,
) -> Self
pub fn ads_on_delivery_restrictions( self, input: AdsOnDeliveryRestrictions, ) -> Self
This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing “NONE” means no SCTE-35 messages become ads. Choosing “RESTRICTED” means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing “UNRESTRICTED” means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing “BOTH” means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
Sourcepub fn set_ads_on_delivery_restrictions(
self,
input: Option<AdsOnDeliveryRestrictions>,
) -> Self
pub fn set_ads_on_delivery_restrictions( self, input: Option<AdsOnDeliveryRestrictions>, ) -> Self
This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing “NONE” means no SCTE-35 messages become ads. Choosing “RESTRICTED” means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing “UNRESTRICTED” means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing “BOTH” means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
Sourcepub fn get_ads_on_delivery_restrictions(
&self,
) -> &Option<AdsOnDeliveryRestrictions>
pub fn get_ads_on_delivery_restrictions( &self, ) -> &Option<AdsOnDeliveryRestrictions>
This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing “NONE” means no SCTE-35 messages become ads. Choosing “RESTRICTED” means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing “UNRESTRICTED” means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing “BOTH” means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers.
Sourcepub fn encryption(self, input: DashEncryption) -> Self
pub fn encryption(self, input: DashEncryption) -> Self
A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.
Sourcepub fn set_encryption(self, input: Option<DashEncryption>) -> Self
pub fn set_encryption(self, input: Option<DashEncryption>) -> Self
A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.
Sourcepub fn get_encryption(&self) -> &Option<DashEncryption>
pub fn get_encryption(&self) -> &Option<DashEncryption>
A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.
Sourcepub fn include_iframe_only_stream(self, input: bool) -> Self
pub fn include_iframe_only_stream(self, input: bool) -> Self
When enabled, an I-Frame only stream will be included in the output.
Sourcepub fn set_include_iframe_only_stream(self, input: Option<bool>) -> Self
pub fn set_include_iframe_only_stream(self, input: Option<bool>) -> Self
When enabled, an I-Frame only stream will be included in the output.
Sourcepub fn get_include_iframe_only_stream(&self) -> &Option<bool>
pub fn get_include_iframe_only_stream(&self) -> &Option<bool>
When enabled, an I-Frame only stream will be included in the output.
Sourcepub fn manifest_layout(self, input: ManifestLayout) -> Self
pub fn manifest_layout(self, input: ManifestLayout) -> Self
Determines the position of some tags in the Media Presentation Description (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation. When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level. When set to DRM_TOP_LEVEL_COMPACT, content protection elements are placed the MPD level and referenced at the AdaptationSet level.
Sourcepub fn set_manifest_layout(self, input: Option<ManifestLayout>) -> Self
pub fn set_manifest_layout(self, input: Option<ManifestLayout>) -> Self
Determines the position of some tags in the Media Presentation Description (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation. When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level. When set to DRM_TOP_LEVEL_COMPACT, content protection elements are placed the MPD level and referenced at the AdaptationSet level.
Sourcepub fn get_manifest_layout(&self) -> &Option<ManifestLayout>
pub fn get_manifest_layout(&self) -> &Option<ManifestLayout>
Determines the position of some tags in the Media Presentation Description (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation. When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level. When set to DRM_TOP_LEVEL_COMPACT, content protection elements are placed the MPD level and referenced at the AdaptationSet level.
Sourcepub fn manifest_window_seconds(self, input: i32) -> Self
pub fn manifest_window_seconds(self, input: i32) -> Self
Time window (in seconds) contained in each manifest.
Sourcepub fn set_manifest_window_seconds(self, input: Option<i32>) -> Self
pub fn set_manifest_window_seconds(self, input: Option<i32>) -> Self
Time window (in seconds) contained in each manifest.
Sourcepub fn get_manifest_window_seconds(&self) -> &Option<i32>
pub fn get_manifest_window_seconds(&self) -> &Option<i32>
Time window (in seconds) contained in each manifest.
Sourcepub fn min_buffer_time_seconds(self, input: i32) -> Self
pub fn min_buffer_time_seconds(self, input: i32) -> Self
Minimum duration (in seconds) that a player will buffer media before starting the presentation.
Sourcepub fn set_min_buffer_time_seconds(self, input: Option<i32>) -> Self
pub fn set_min_buffer_time_seconds(self, input: Option<i32>) -> Self
Minimum duration (in seconds) that a player will buffer media before starting the presentation.
Sourcepub fn get_min_buffer_time_seconds(&self) -> &Option<i32>
pub fn get_min_buffer_time_seconds(&self) -> &Option<i32>
Minimum duration (in seconds) that a player will buffer media before starting the presentation.
Sourcepub fn min_update_period_seconds(self, input: i32) -> Self
pub fn min_update_period_seconds(self, input: i32) -> Self
Minimum duration (in seconds) between potential changes to the Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD).
Sourcepub fn set_min_update_period_seconds(self, input: Option<i32>) -> Self
pub fn set_min_update_period_seconds(self, input: Option<i32>) -> Self
Minimum duration (in seconds) between potential changes to the Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD).
Sourcepub fn get_min_update_period_seconds(&self) -> &Option<i32>
pub fn get_min_update_period_seconds(&self) -> &Option<i32>
Minimum duration (in seconds) between potential changes to the Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD).
Sourcepub fn period_triggers(self, input: PeriodTriggersElement) -> Self
pub fn period_triggers(self, input: PeriodTriggersElement) -> Self
Appends an item to period_triggers
.
To override the contents of this collection use set_period_triggers
.
A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not be partitioned into more than one period. If the list contains “ADS”, new periods will be created where the Channel source contains SCTE-35 ad markers.
Sourcepub fn set_period_triggers(
self,
input: Option<Vec<PeriodTriggersElement>>,
) -> Self
pub fn set_period_triggers( self, input: Option<Vec<PeriodTriggersElement>>, ) -> Self
A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not be partitioned into more than one period. If the list contains “ADS”, new periods will be created where the Channel source contains SCTE-35 ad markers.
Sourcepub fn get_period_triggers(&self) -> &Option<Vec<PeriodTriggersElement>>
pub fn get_period_triggers(&self) -> &Option<Vec<PeriodTriggersElement>>
A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not be partitioned into more than one period. If the list contains “ADS”, new periods will be created where the Channel source contains SCTE-35 ad markers.
Sourcepub fn profile(self, input: Profile) -> Self
pub fn profile(self, input: Profile) -> Self
The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to “HBBTV_1_5”, HbbTV 1.5 compliant output is enabled. When set to “DVB-DASH_2014”, DVB-DASH 2014 compliant output is enabled.
Sourcepub fn set_profile(self, input: Option<Profile>) -> Self
pub fn set_profile(self, input: Option<Profile>) -> Self
The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to “HBBTV_1_5”, HbbTV 1.5 compliant output is enabled. When set to “DVB-DASH_2014”, DVB-DASH 2014 compliant output is enabled.
Sourcepub fn get_profile(&self) -> &Option<Profile>
pub fn get_profile(&self) -> &Option<Profile>
The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to “HBBTV_1_5”, HbbTV 1.5 compliant output is enabled. When set to “DVB-DASH_2014”, DVB-DASH 2014 compliant output is enabled.
Sourcepub fn segment_duration_seconds(self, input: i32) -> Self
pub fn segment_duration_seconds(self, input: i32) -> Self
Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
Sourcepub fn set_segment_duration_seconds(self, input: Option<i32>) -> Self
pub fn set_segment_duration_seconds(self, input: Option<i32>) -> Self
Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
Sourcepub fn get_segment_duration_seconds(&self) -> &Option<i32>
pub fn get_segment_duration_seconds(&self) -> &Option<i32>
Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration.
Sourcepub fn segment_template_format(self, input: SegmentTemplateFormat) -> Self
pub fn segment_template_format(self, input: SegmentTemplateFormat) -> Self
Determines the type of SegmentTemplate included in the Media Presentation Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs. When set to TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs.
Sourcepub fn set_segment_template_format(
self,
input: Option<SegmentTemplateFormat>,
) -> Self
pub fn set_segment_template_format( self, input: Option<SegmentTemplateFormat>, ) -> Self
Determines the type of SegmentTemplate included in the Media Presentation Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs. When set to TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs.
Sourcepub fn get_segment_template_format(&self) -> &Option<SegmentTemplateFormat>
pub fn get_segment_template_format(&self) -> &Option<SegmentTemplateFormat>
Determines the type of SegmentTemplate included in the Media Presentation Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs. When set to TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs.
Sourcepub fn stream_selection(self, input: StreamSelection) -> Self
pub fn stream_selection(self, input: StreamSelection) -> Self
A StreamSelection configuration.
Sourcepub fn set_stream_selection(self, input: Option<StreamSelection>) -> Self
pub fn set_stream_selection(self, input: Option<StreamSelection>) -> Self
A StreamSelection configuration.
Sourcepub fn get_stream_selection(&self) -> &Option<StreamSelection>
pub fn get_stream_selection(&self) -> &Option<StreamSelection>
A StreamSelection configuration.
Sourcepub fn suggested_presentation_delay_seconds(self, input: i32) -> Self
pub fn suggested_presentation_delay_seconds(self, input: i32) -> Self
Duration (in seconds) to delay live content before presentation.
Sourcepub fn set_suggested_presentation_delay_seconds(
self,
input: Option<i32>,
) -> Self
pub fn set_suggested_presentation_delay_seconds( self, input: Option<i32>, ) -> Self
Duration (in seconds) to delay live content before presentation.
Sourcepub fn get_suggested_presentation_delay_seconds(&self) -> &Option<i32>
pub fn get_suggested_presentation_delay_seconds(&self) -> &Option<i32>
Duration (in seconds) to delay live content before presentation.
Sourcepub fn utc_timing(self, input: UtcTiming) -> Self
pub fn utc_timing(self, input: UtcTiming) -> Self
Determines the type of UTCTiming included in the Media Presentation Description (MPD)
Sourcepub fn set_utc_timing(self, input: Option<UtcTiming>) -> Self
pub fn set_utc_timing(self, input: Option<UtcTiming>) -> Self
Determines the type of UTCTiming included in the Media Presentation Description (MPD)
Sourcepub fn get_utc_timing(&self) -> &Option<UtcTiming>
pub fn get_utc_timing(&self) -> &Option<UtcTiming>
Determines the type of UTCTiming included in the Media Presentation Description (MPD)
Sourcepub fn utc_timing_uri(self, input: impl Into<String>) -> Self
pub fn utc_timing_uri(self, input: impl Into<String>) -> Self
Specifies the value attribute of the UTCTiming field when utcTiming is set to HTTP-ISO, HTTP-HEAD or HTTP-XSDATE
Sourcepub fn set_utc_timing_uri(self, input: Option<String>) -> Self
pub fn set_utc_timing_uri(self, input: Option<String>) -> Self
Specifies the value attribute of the UTCTiming field when utcTiming is set to HTTP-ISO, HTTP-HEAD or HTTP-XSDATE
Sourcepub fn get_utc_timing_uri(&self) -> &Option<String>
pub fn get_utc_timing_uri(&self) -> &Option<String>
Specifies the value attribute of the UTCTiming field when utcTiming is set to HTTP-ISO, HTTP-HEAD or HTTP-XSDATE
Sourcepub fn build(self) -> DashPackage
pub fn build(self) -> DashPackage
Consumes the builder and constructs a DashPackage
.
Trait Implementations§
Source§impl Clone for DashPackageBuilder
impl Clone for DashPackageBuilder
Source§fn clone(&self) -> DashPackageBuilder
fn clone(&self) -> DashPackageBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DashPackageBuilder
impl Debug for DashPackageBuilder
Source§impl Default for DashPackageBuilder
impl Default for DashPackageBuilder
Source§fn default() -> DashPackageBuilder
fn default() -> DashPackageBuilder
Source§impl PartialEq for DashPackageBuilder
impl PartialEq for DashPackageBuilder
impl StructuralPartialEq for DashPackageBuilder
Auto Trait Implementations§
impl Freeze for DashPackageBuilder
impl RefUnwindSafe for DashPackageBuilder
impl Send for DashPackageBuilder
impl Sync for DashPackageBuilder
impl Unpin for DashPackageBuilder
impl UnwindSafe for DashPackageBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);