use crate::DecoderOptions;
use super::DecodePath;
#[cfg(doc)]
use super::CarrierVideoStreamDecoder;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub struct VideoStreamDecoderOpen {
path: DecodePath,
options: DecoderOptions,
}
impl VideoStreamDecoderOpen {
#[cfg_attr(not(tarpaulin), inline(always))]
pub const fn new() -> Self {
Self {
path: DecodePath::Auto,
options: DecoderOptions::new(),
}
}
#[cfg_attr(not(tarpaulin), inline(always))]
pub const fn path(&self) -> DecodePath {
self.path
}
#[cfg_attr(not(tarpaulin), inline(always))]
pub const fn options(&self) -> DecoderOptions {
self.options
}
#[cfg_attr(not(tarpaulin), inline(always))]
#[must_use]
pub const fn with_path(mut self, value: DecodePath) -> Self {
self.path = value;
self
}
#[cfg_attr(not(tarpaulin), inline(always))]
#[must_use]
pub const fn with_options(mut self, value: DecoderOptions) -> Self {
self.options = value;
self
}
#[cfg_attr(not(tarpaulin), inline(always))]
pub const fn set_path(&mut self, value: DecodePath) -> &mut Self {
self.path = value;
self
}
#[cfg_attr(not(tarpaulin), inline(always))]
pub const fn set_options(&mut self, value: DecoderOptions) -> &mut Self {
self.options = value;
self
}
}
impl Default for VideoStreamDecoderOpen {
#[inline]
fn default() -> Self {
Self::new()
}
}