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.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Encoder
impl UnwindSafe for Encoder
Blanket Implementations
Mutably borrows from an owned value. Read more