pub struct VideoCodecParameters {
pub codec: VideoCodecId,
pub profile: Option<CodecProfile>,
pub level: Option<u32>,
pub width: Option<u16>,
pub height: Option<u16>,
pub extra_data: Vec<VideoExtraData>,
}Expand description
Codec parameters for video codecs.
Fields§
§codec: VideoCodecIdThe codec ID.
profile: Option<CodecProfile>The codec-defined profile.
level: Option<u32>The codec-defined level.
width: Option<u16>Video width.
height: Option<u16>Video height.
extra_data: Vec<VideoExtraData>Extra data (defined by the codec).
Implementations§
Source§impl VideoCodecParameters
impl VideoCodecParameters
Sourcepub fn for_codec(&mut self, codec: VideoCodecId) -> &mut Self
pub fn for_codec(&mut self, codec: VideoCodecId) -> &mut Self
Provide the VideoCodecId.
Sourcepub fn with_profile(&mut self, profile: CodecProfile) -> &mut Self
pub fn with_profile(&mut self, profile: CodecProfile) -> &mut Self
Provide codec profile.
Sourcepub fn with_level(&mut self, level: u32) -> &mut Self
pub fn with_level(&mut self, level: u32) -> &mut Self
Provide codec level.
Sourcepub fn with_width(&mut self, width: u16) -> &mut Self
pub fn with_width(&mut self, width: u16) -> &mut Self
Provide video width.
Sourcepub fn with_height(&mut self, height: u16) -> &mut Self
pub fn with_height(&mut self, height: u16) -> &mut Self
Provide video height.
Sourcepub fn add_extra_data(&mut self, data: VideoExtraData) -> &mut Self
pub fn add_extra_data(&mut self, data: VideoExtraData) -> &mut Self
Adds codec’s extra data.
Trait Implementations§
Source§impl Clone for VideoCodecParameters
impl Clone for VideoCodecParameters
Source§fn clone(&self) -> VideoCodecParameters
fn clone(&self) -> VideoCodecParameters
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 VideoCodecParameters
impl Debug for VideoCodecParameters
Source§impl Default for VideoCodecParameters
impl Default for VideoCodecParameters
Source§fn default() -> VideoCodecParameters
fn default() -> VideoCodecParameters
Returns the “default value” for a type. Read more
Source§impl From<VideoCodecParameters> for CodecParameters
impl From<VideoCodecParameters> for CodecParameters
Source§fn from(value: VideoCodecParameters) -> Self
fn from(value: VideoCodecParameters) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for VideoCodecParameters
impl RefUnwindSafe for VideoCodecParameters
impl Send for VideoCodecParameters
impl Sync for VideoCodecParameters
impl Unpin for VideoCodecParameters
impl UnsafeUnpin for VideoCodecParameters
impl UnwindSafe for VideoCodecParameters
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