pub struct VideoFrameStream {
pub num_frames: usize,
pub format: ImageFormat,
pub encoder_settings: Rc<dyn Fn() -> EncoderSettings>,
pub frames_per_second: usize,
pub timebase: Option<u64>,
pub mime_type: String,
}
Expand description
Implements an ElementaryStream
of raw video frames with the specified format
, intended to be
fed to an encoder StreamProcessor.
Fields§
§num_frames: usize
§format: ImageFormat
§encoder_settings: Rc<dyn Fn() -> EncoderSettings>
§frames_per_second: usize
§timebase: Option<u64>
§mime_type: String
Implementations§
Source§impl VideoFrameStream
impl VideoFrameStream
pub fn create( format: ImageFormat, num_frames: usize, encoder_settings: Rc<dyn Fn() -> EncoderSettings>, frames_per_second: usize, timebase: Option<u64>, mime_type: &str, ) -> Result<Self>
pub fn timestamp_generator(&self) -> Option<TimestampGenerator>
Trait Implementations§
Source§impl ElementaryStream for VideoFrameStream
impl ElementaryStream for VideoFrameStream
fn format_details(&self, format_details_version_ordinal: u64) -> FormatDetails
Source§fn is_access_units(&self) -> bool
fn is_access_units(&self) -> bool
Whether all chunks in the elementary stream will be marked with access unit boundaries.
These are units for stream processors (e.g. for H264 decoder, NALs). When input is not in
access units, the server must parse and/or buffer the bitstream.
fn stream<'a>(&'a self) -> Box<dyn Iterator<Item = ElementaryStreamChunk> + 'a>
Source§fn capped_chunks<'a>(
&'a self,
max_size: usize,
) -> Box<dyn Iterator<Item = ElementaryStreamChunk> + 'a>
fn capped_chunks<'a>( &'a self, max_size: usize, ) -> Box<dyn Iterator<Item = ElementaryStreamChunk> + 'a>
Returns the elementary stream with chunks capped at a given size. Chunks bigger than the cap
will be divided into multiple chunks. Order is retained. Timestamps are not extrapolated.
Access unit boundaries are corrected.
fn video_frame_count(&self) -> usize
Auto Trait Implementations§
impl Freeze for VideoFrameStream
impl !RefUnwindSafe for VideoFrameStream
impl !Send for VideoFrameStream
impl !Sync for VideoFrameStream
impl Unpin for VideoFrameStream
impl !UnwindSafe for VideoFrameStream
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