[−][src]Struct hl_capture::encode::Encoder
An encoder used to encode video and audio to a file.
Call Encoder::start() to start the encoding, then encode some frames with Encoder::encode().
The encoder will flush and save the output file automatically upon being dropped.
Fields
converter: PixFmtConverterresampler: Contextcontext: Outputvideo_encoder: Videoaudio_encoder: Audiovideo_stream_index: usizeaudio_stream_index: usizeaudio_output_frame: Audioaudio_input_frame: Audiopacket: Packetfinished: booltime_base: Rationalvideo_stream_time_base: Rationalaudio_stream_time_base: Rationalvideo_pts: i64audio_pts: i64audio_position: usizeCurrent position, in samples, in the audio frame.
Methods
impl Encoder[src]
pub fn start(parameters: &EncoderParameters) -> Result<Self, Error>[src]
fn push_frame(
&mut self,
frame: Option<&mut Video>,
times: usize
) -> Result<(), Error>[src]
&mut self,
frame: Option<&mut Video>,
times: usize
) -> Result<(), Error>
fn push_audio_frame(&mut self) -> Result<(), Error>[src]
pub fn take(&mut self, frame: &mut Video, times: usize) -> Result<(), Error>[src]
Takes the given frame the specified number of times.
pub fn take_audio(&mut self, samples: &[(i16, i16)]) -> Result<(), Error>[src]
Encodes 16-bit signed interleaved 2-channel stereo sound.
fn flush(&mut self) -> Result<(), Error>[src]
pub fn finish(&mut self) -> Result<(), Error>[src]
pub fn width(&self) -> u32[src]
pub fn height(&self) -> u32[src]
pub fn format(&self) -> Pixel[src]
Trait Implementations
Auto Trait Implementations
impl Unpin for Encoder
impl !Sync for Encoder
impl !Send for Encoder
impl !RefUnwindSafe for Encoder
impl !UnwindSafe for Encoder
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,