pub struct StreamInfo {
pub video_codec: CodecType,
pub audio_codec: Option<AudioCodec>,
pub width: Option<u32>,
pub height: Option<u32>,
pub fps: Option<f32>,
pub sample_rate: Option<u32>,
pub audio_channels: Option<u8>,
}Expand description
Information about a media stream
Fields§
§video_codec: CodecTypeVideo codec
audio_codec: Option<AudioCodec>Audio codec (if present)
width: Option<u32>Video width in pixels
height: Option<u32>Video height in pixels
fps: Option<f32>Frames per second
sample_rate: Option<u32>Audio sample rate (Hz)
audio_channels: Option<u8>Audio channels
Implementations§
Source§impl StreamInfo
impl StreamInfo
Sourcepub fn with_dimensions(self, width: u32, height: u32) -> Self
pub fn with_dimensions(self, width: u32, height: u32) -> Self
Sets video dimensions
Sourcepub fn with_audio_codec(self, codec: AudioCodec) -> Self
pub fn with_audio_codec(self, codec: AudioCodec) -> Self
Sets audio codec
Sourcepub fn with_audio_params(self, sample_rate: u32, channels: u8) -> Self
pub fn with_audio_params(self, sample_rate: u32, channels: u8) -> Self
Sets audio parameters
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Returns a human-readable description of the stream
Trait Implementations§
Source§impl Clone for StreamInfo
impl Clone for StreamInfo
Source§fn clone(&self) -> StreamInfo
fn clone(&self) -> StreamInfo
Returns a duplicate of the value. Read more
1.0.0 · 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 StreamInfo
impl Debug for StreamInfo
Source§impl Default for StreamInfo
impl Default for StreamInfo
Source§impl<'de> Deserialize<'de> for StreamInfo
impl<'de> Deserialize<'de> for StreamInfo
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 StreamInfo
impl RefUnwindSafe for StreamInfo
impl Send for StreamInfo
impl Sync for StreamInfo
impl Unpin for StreamInfo
impl UnsafeUnpin for StreamInfo
impl UnwindSafe for StreamInfo
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().