#[non_exhaustive]pub struct MuxStream {
pub key: String,
pub file_name: String,
pub container: String,
pub elementary_streams: Vec<String>,
pub segment_settings: Option<SegmentSettings>,
pub encryption_id: String,
pub container_config: Option<ContainerConfig>,
/* private fields */
}Expand description
Multiplexing settings for output stream.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.key: StringA unique key for this multiplexed stream.
file_name: StringThe name of the generated file. The default is MuxStream.key with the extension suffix corresponding to the MuxStream.container.
Individual segments also have an incremental 10-digit zero-padded suffix
starting from 0 before the extension, such as mux_stream0000000123.ts.
container: StringThe container format. The default is mp4
Supported streaming formats:
tsfmp4- the corresponding file extension is.m4s
Supported standalone file formats:
mp4mp3oggvtt
See also: Supported input and output formats
elementary_streams: Vec<String>List of ElementaryStream.key values multiplexed in this stream.
segment_settings: Option<SegmentSettings>Segment settings for ts, fmp4 and vtt.
encryption_id: StringIdentifier of the encryption configuration to use. If omitted, output will be unencrypted.
container_config: Option<ContainerConfig>Specifies the container configuration.
Implementations§
Source§impl MuxStream
impl MuxStream
pub fn new() -> Self
Sourcepub fn set_file_name<T: Into<String>>(self, v: T) -> Self
pub fn set_file_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_container<T: Into<String>>(self, v: T) -> Self
pub fn set_container<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_elementary_streams<T, V>(self, v: T) -> Self
pub fn set_elementary_streams<T, V>(self, v: T) -> Self
Sets the value of elementary_streams.
§Example
let x = MuxStream::new().set_elementary_streams(["a", "b", "c"]);Sourcepub fn set_segment_settings<T>(self, v: T) -> Selfwhere
T: Into<SegmentSettings>,
pub fn set_segment_settings<T>(self, v: T) -> Selfwhere
T: Into<SegmentSettings>,
Sets the value of segment_settings.
§Example
use google_cloud_video_transcoder_v1::model::SegmentSettings;
let x = MuxStream::new().set_segment_settings(SegmentSettings::default()/* use setters */);Sourcepub fn set_or_clear_segment_settings<T>(self, v: Option<T>) -> Selfwhere
T: Into<SegmentSettings>,
pub fn set_or_clear_segment_settings<T>(self, v: Option<T>) -> Selfwhere
T: Into<SegmentSettings>,
Sets or clears the value of segment_settings.
§Example
use google_cloud_video_transcoder_v1::model::SegmentSettings;
let x = MuxStream::new().set_or_clear_segment_settings(Some(SegmentSettings::default()/* use setters */));
let x = MuxStream::new().set_or_clear_segment_settings(None::<SegmentSettings>);Sourcepub fn set_encryption_id<T: Into<String>>(self, v: T) -> Self
pub fn set_encryption_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_container_config<T: Into<Option<ContainerConfig>>>(
self,
v: T,
) -> Self
pub fn set_container_config<T: Into<Option<ContainerConfig>>>( self, v: T, ) -> Self
Sets the value of container_config.
Note that all the setters affecting container_config are mutually
exclusive.
§Example
use google_cloud_video_transcoder_v1::model::mux_stream::Fmp4Config;
let x = MuxStream::new().set_container_config(Some(
google_cloud_video_transcoder_v1::model::mux_stream::ContainerConfig::Fmp4(Fmp4Config::default().into())));Sourcepub fn fmp4(&self) -> Option<&Box<Fmp4Config>>
pub fn fmp4(&self) -> Option<&Box<Fmp4Config>>
The value of container_config
if it holds a Fmp4, None if the field is not set or
holds a different branch.
Sourcepub fn set_fmp4<T: Into<Box<Fmp4Config>>>(self, v: T) -> Self
pub fn set_fmp4<T: Into<Box<Fmp4Config>>>(self, v: T) -> Self
Sets the value of container_config
to hold a Fmp4.
Note that all the setters affecting container_config are
mutually exclusive.
§Example
use google_cloud_video_transcoder_v1::model::mux_stream::Fmp4Config;
let x = MuxStream::new().set_fmp4(Fmp4Config::default()/* use setters */);
assert!(x.fmp4().is_some());