pub struct ProxySpec {
pub name: String,
pub resolution: ProxyResolutionMode,
pub codec: ProxyCodec,
pub video_bitrate: u64,
pub audio_codec: String,
pub audio_bitrate: u64,
pub container: Option<String>,
pub preserve_timecode: bool,
pub preserve_metadata: bool,
pub use_hw_accel: bool,
pub quality_preset: String,
}Expand description
Complete proxy specification.
Fields§
§name: StringHuman-readable name for this spec.
resolution: ProxyResolutionModeTarget resolution mode.
codec: ProxyCodecVideo codec to use.
video_bitrate: u64Video bitrate in bits per second.
audio_codec: StringAudio codec (e.g. “aac”).
audio_bitrate: u64Audio bitrate in bits per second.
container: Option<String>Container format override. If None, uses codec.recommended_container().
preserve_timecode: boolWhether to preserve source timecode.
preserve_metadata: boolWhether to preserve source metadata.
use_hw_accel: boolWhether to use hardware acceleration.
quality_preset: StringEncoding quality preset (“fast”, “medium”, “slow”).
Implementations§
Source§impl ProxySpec
impl ProxySpec
Sourcepub fn new(
name: impl Into<String>,
resolution: ProxyResolutionMode,
codec: ProxyCodec,
video_bitrate: u64,
) -> Self
pub fn new( name: impl Into<String>, resolution: ProxyResolutionMode, codec: ProxyCodec, video_bitrate: u64, ) -> Self
Create a new proxy spec with required fields.
Sourcepub fn container_format(&self) -> &str
pub fn container_format(&self) -> &str
Get the container format.
Sourcepub fn to_generation_settings(&self) -> ProxyGenerationSettings
pub fn to_generation_settings(&self) -> ProxyGenerationSettings
Convert to ProxyGenerationSettings.
Sourcepub fn quarter_h264() -> Self
pub fn quarter_h264() -> Self
Predefined: quarter-resolution H.264 proxy at 2 Mbps.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ProxySpec
impl<'de> Deserialize<'de> for ProxySpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProxySpec
impl RefUnwindSafe for ProxySpec
impl Send for ProxySpec
impl Sync for ProxySpec
impl Unpin for ProxySpec
impl UnsafeUnpin for ProxySpec
impl UnwindSafe for ProxySpec
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 more