pub struct HardwareEncodeSession(/* private fields */);Expand description
The encode worker’s half of a hardware session.
Implementations§
Source§impl HardwareEncodeSession
impl HardwareEncodeSession
Sourcepub fn selection(&self) -> &NativeVideoEncoderSelection
pub fn selection(&self) -> &NativeVideoEncoderSelection
The encoder this session opened, reported the way every other export path reports the encoder it opened.
Sourcepub fn stage_timings(&self) -> EncodeStageTimings
pub fn stage_timings(&self) -> EncodeStageTimings
Where this session’s time has gone, split the way the software sinks split theirs.
Sourcepub fn encode(&mut self, surface: &EncoderSurface) -> Result<(), EncodeError>
pub fn encode(&mut self, surface: &EncoderSurface) -> Result<(), EncodeError>
Submits surface and muxes whatever packets it produced.
§Errors
Returns an adapter failure when the encoder rejects the frame or its packets cannot be written.
Sourcepub fn write_audio(&mut self, block: &AudioBlock) -> Result<(), EncodeError>
pub fn write_audio(&mut self, block: &AudioBlock) -> Result<(), EncodeError>
Buffers one audio block for the audio stream.
§Errors
Returns an adapter failure for a format change, a non-monotonic block, or a failed audio encode.
Auto Trait Implementations§
impl !RefUnwindSafe for HardwareEncodeSession
impl !Sync for HardwareEncodeSession
impl !UnwindSafe for HardwareEncodeSession
impl Freeze for HardwareEncodeSession
impl Send for HardwareEncodeSession
impl Unpin for HardwareEncodeSession
impl UnsafeUnpin for HardwareEncodeSession
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