Skip to main content

StreamDescriptor

Struct StreamDescriptor 

Source
pub struct StreamDescriptor {
Show 17 fields pub input: PathBuf, pub selector: StreamSelector, pub output: Option<String>, pub segment_template: Option<String>, pub bandwidth: Option<u32>, pub language: Option<String>, pub skip_encryption: bool, pub drm_label: Option<String>, pub trick_play_factor: Option<u32>, pub hls_name: Option<String>, pub hls_group_id: Option<String>, pub playlist_name: Option<String>, pub iframe_playlist_name: Option<String>, pub hls_characteristics: Vec<String>, pub dash_accessibilities: Vec<(String, String)>, pub dash_roles: Vec<String>, pub forced_subtitle: bool,
}
Expand description

Per-stream overrides mirroring Shaka Packager stream_descriptor fields.

Fields§

§input: PathBuf

Input path (input= / in=).

§selector: StreamSelector

Track selector (stream=).

§output: Option<String>

Optional output / init name (output= / init_segment=).

§segment_template: Option<String>

Optional segment name template (segment_template=). $Number$ is replaced.

§bandwidth: Option<u32>

Manifest bandwidth override, bits/sec (bandwidth= / bw=).

§language: Option<String>

Language tag override (language= / lang=).

§skip_encryption: bool

Skip CENC for this stream (skip_encryption=1).

§drm_label: Option<String>

DRM key label (drm_label=): AUDIO, SD, HD, UHD1, UHD2, or a --keys label.

§trick_play_factor: Option<u32>

Trick-play factor: keep every Nth keyframe (trick_play_factor= / tpf=).

§hls_name: Option<String>

HLS #EXT-X-MEDIA NAME (hls_name=).

§hls_group_id: Option<String>

HLS #EXT-X-MEDIA GROUP-ID (hls_group_id=).

§playlist_name: Option<String>

HLS media playlist filename (playlist_name=).

§iframe_playlist_name: Option<String>

HLS I-frame playlist filename (iframe_playlist_name=).

§hls_characteristics: Vec<String>

HLS CHARACTERISTICS (hls_characteristics= / charcs=), colon/semicolon split.

§dash_accessibilities: Vec<(String, String)>

DASH Accessibility schemeIdUri=value (dash_accessibilities=).

§dash_roles: Vec<String>

DASH Role values (dash_roles=).

§forced_subtitle: bool

Forced narrative subtitle (forced_subtitle=1).

Implementations§

Source§

impl StreamDescriptor

Source

pub fn from_path(path: impl Into<PathBuf>) -> Self

Package every track in path.

Source

pub fn matches(&self, index: usize, kind: MediaKind) -> bool

True when this descriptor selects kind at demuxer index index.

Trait Implementations§

Source§

impl Clone for StreamDescriptor

Source§

fn clone(&self) -> StreamDescriptor

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 StreamDescriptor

Source§

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

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

impl Default for StreamDescriptor

Source§

fn default() -> StreamDescriptor

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

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V