pub enum Container {
Mp4,
Mov,
Mkv,
Webm,
}Expand description
The file format an export is written in.
Variants§
Mp4
ISO base media file (MP4).
Mov
QuickTime movie.
Mkv
Matroska.
Webm
WebM, the Matroska subset browsers play.
Implementations§
Source§impl Container
impl Container
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Stable identifier used by every protocol and binding.
Sourcepub const fn extensions(self) -> &'static [&'static str]
pub const fn extensions(self) -> &'static [&'static str]
Lowercase file extensions without the dot; the first is the one an exporter names a file with.
Sourcepub const fn video_codecs(self) -> &'static [VideoCodec]
pub const fn video_codecs(self) -> &'static [VideoCodec]
Video codecs the container offers, the default first.
Sourcepub const fn audio_codecs(self) -> &'static [AudioCodec]
pub const fn audio_codecs(self) -> &'static [AudioCodec]
Audio codecs the container offers, the default first. A browser that cannot encode the default tries the next one in this order.
Sourcepub const fn default_video_codec(self) -> VideoCodec
pub const fn default_video_codec(self) -> VideoCodec
The video codec an export in this container gets when it names none.
Sourcepub const fn default_audio_codec(self) -> AudioCodec
pub const fn default_audio_codec(self) -> AudioCodec
The audio codec an export in this container gets when it names none.
Sourcepub fn offers_video(self, codec: VideoCodec) -> bool
pub fn offers_video(self, codec: VideoCodec) -> bool
Whether the container offers codec.
Sourcepub fn offers_audio(self, codec: AudioCodec) -> bool
pub fn offers_audio(self, codec: AudioCodec) -> bool
Whether the container offers codec.
Sourcepub fn from_extension(extension: &str) -> Option<Self>
pub fn from_extension(extension: &str) -> Option<Self>
The container an output path’s extension (without the dot) names, case-insensitively.