Struct libvda::encode::session::Session

source ·
pub struct Session {
    pipe: File,
    connection: Rc<VeaConnection>,
    session_ptr: *mut vea_session_info,
}
Expand description

Represents an encode session.

Fields§

§pipe: File§connection: Rc<VeaConnection>§session_ptr: *mut vea_session_info

Implementations§

Creates a new Session.

Returns a reference for the pipe that notifies of encode events.

Reads an Event object from a pipe provided by an encode session.

Sends an encode request for an input buffer given as fd with planes described by planes. The timestamp of the frame to encode is typically provided in milliseconds by timestamp. force_keyframe` indicates to the encoder that the frame should be encoded as a keyframe.

When the input buffer has been filled, an EncoderEvent::ProcessedInputBuffer event can be read from the event pipe.

The caller is responsible for passing in a unique value for input_buffer_id which can be referenced when the event is received.

fd will be closed after encoding has occurred.

Provides a buffer for storing encoded output.

When the output buffer has been filled, an EncoderEvent::ProcessedOutputBuffer event can be read from the event pipe.

The caller is responsible for passing in a unique value for output_buffer_id which can be referenced when the event is received.

This function takes ownership of fd.

Requests encoding parameter changes.

The request is not guaranteed to be honored by libvda and could be ignored by the backing encoder implementation.

Flushes the encode session.

When this operation has completed, Event::FlushResponse can be read from the event pipe.

Trait Implementations§

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.