pub struct Video { /* private fields */ }Expand description
Raw-video state: encoders being published, plus decoder tasks and their buffered decoded frames.
Implementations§
Source§impl Video
impl Video
Sourcepub fn publish(
&mut self,
broadcast: &Producer,
catalog: Producer<Extra>,
format: moq_video_pixel_format,
config: &Config,
rendition: VideoConfig,
encoder: Sink,
) -> Result<Id, Error>
pub fn publish( &mut self, broadcast: &Producer, catalog: Producer<Extra>, format: moq_video_pixel_format, config: &Config, rendition: VideoConfig, encoder: Sink, ) -> Result<Id, Error>
Advertise a track for an already-opened encoder.
The encoder and the rendition it will emit are both resolved by the caller, and before this, so a config this machine can’t encode fails without leaving a track advertised that will never carry frames.
pub fn consume( &mut self, broadcast: &Consumer, catalog: &VideoConfig, name: &str, config: Config, on_frame: OnStatus, ) -> Result<Id, Error>
pub fn consume_close(&mut self, id: Id) -> Result<(), Error>
pub fn frame_info(&self, id: Id, dst: &mut moq_video_frame) -> Result<(), Error>
pub fn frame_free(&mut self, id: Id) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Video
impl !Sync for Video
impl !UnwindSafe for Video
impl Freeze for Video
impl Send for Video
impl Unpin for Video
impl UnsafeUnpin for Video
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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