Struct syeve::Encoder[][src]

pub struct Encoder { /* fields omitted */ }

Implementations

Creates a new encoder

pixel_size is the number of bytes per pixel.

Because each frame is encoded relatively to the previous frame, a lost frame can cause all the next frames to be wrong. Hence, we need to periodically send a frame that does not depend on the previous frame. seq_len (sequence length) is the number of frames between these “independent” frames. The higher, the longer glitches can remain. The lower, the more bandwidth will be used.

If the decoder may have already read data from another encoder, then you should ensure to set a different sequence number than the last one received by the decoder from the previous encoder. Otherwise, the decoder may think it’s the same sequence, and won’t decode the frame (thus possibly the entire sequence) correctly. If you don’t know, just use random.

Encode raw frame pixels into buf

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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

Numeric cast from self to T.

Performs the conversion.

Numeric cast from T to Self.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.