pub struct StreamInfo {
pub kind: MediaKind,
pub codec: Codec,
pub timescale: Timescale,
pub resolution: Option<(u32, u32)>,
pub sample_rate: Option<u32>,
pub bitrate: Option<u32>,
pub codec_string: Option<String>,
}Expand description
Everything the packager needs to know about one elementary stream.
Fields§
§kind: MediaKindVideo / audio / text.
codec: CodecThe codec carried.
timescale: TimescaleThe stream’s media timescale.
resolution: Option<(u32, u32)>Width/height in pixels for video; None otherwise.
sample_rate: Option<u32>Sample rate in Hz for audio; None otherwise.
bitrate: Option<u32>Average bitrate in bits/sec, if known.
codec_string: Option<String>Full RFC 6381 codecs= string (e.g. avc1.640028, mp4a.40.2), if the
codec configuration was parsed. Falls back to the codec family otherwise.
Implementations§
Source§impl StreamInfo
impl StreamInfo
Sourcepub fn rfc6381(&self) -> String
pub fn rfc6381(&self) -> String
The RFC 6381 codecs= value for this stream: the parsed
StreamInfo::codec_string if present, else the bare codec family.
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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