pub struct TrackConfig {Show 14 fields
pub kind: TrackKind,
pub codec_id: String,
pub codec_private: Vec<u8>,
pub time_base: TimeBase,
pub width: u32,
pub height: u32,
pub rotation: u16,
pub sample_rate: u32,
pub channels: u32,
pub default_duration: Option<u64>,
pub codec_delay: u64,
pub seek_pre_roll: u64,
pub language: String,
pub name: Option<String>,
}Fields§
§kind: TrackKind§codec_id: String§codec_private: Vec<u8>§time_base: TimeBase§width: u32§height: u32§rotation: u16§sample_rate: u32§channels: u32§default_duration: Option<u64>§codec_delay: u64§seek_pre_roll: u64§language: String§name: Option<String>Implementations§
Source§impl TrackConfig
impl TrackConfig
pub fn new(kind: TrackKind, codec_id: &str, time_base: TimeBase) -> Self
pub fn h264(avcc: Vec<u8>, width: u32, height: u32, time_base: TimeBase) -> Self
pub fn hevc(hvcc: Vec<u8>, width: u32, height: u32, time_base: TimeBase) -> Self
pub fn vp9(width: u32, height: u32, time_base: TimeBase) -> Self
pub fn opus(head: Vec<u8>) -> Self
pub fn aac(asc: Vec<u8>, sample_rate: u32, channels: u32) -> Self
pub fn from_track(track: &Track) -> Self
pub fn from_mp4(track: &Track) -> Result<Self>
Trait Implementations§
Source§impl Clone for TrackConfig
impl Clone for TrackConfig
Source§fn clone(&self) -> TrackConfig
fn clone(&self) -> TrackConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TrackConfig
impl Debug for TrackConfig
Source§impl PartialEq for TrackConfig
impl PartialEq for TrackConfig
Source§fn eq(&self, other: &TrackConfig) -> bool
fn eq(&self, other: &TrackConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TrackConfig
Auto Trait Implementations§
impl Freeze for TrackConfig
impl RefUnwindSafe for TrackConfig
impl Send for TrackConfig
impl Sync for TrackConfig
impl Unpin for TrackConfig
impl UnsafeUnpin for TrackConfig
impl UnwindSafe for TrackConfig
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> 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