Skip to main content

Crate rff_codec

Crate rff_codec 

Source
Expand description

rff-codec — the codec abstraction layer (FFmpeg’s libavcodec core, minus the codecs themselves).

It defines:

  • the Decoder and Encoder traits, using the same send / receive shape as modern FFmpeg (avcodec_send_packet / avcodec_receive_frame),
  • a Codec descriptor that advertises a codec’s identity and which directions (decode/encode) it supports,
  • a CodecRegistry that individual codec crates register into.

Concrete codecs live in their own crates (rff-codec-h264, …) and are pulled together by the rff facade.

Structs§

Codec
Static description of a codec and the implementations available for it.
CodecParams
Stream parameters handed to a decoder before the first packet. Self-describing codecs (AV1, PNG, …) can ignore these; raw/parametric codecs (PCM, and codecs that carry config out of band like H.264 SPS/PPS) need them.
CodecRegistry
Holds every codec known to a running engine. Codec crates call register to add themselves.

Traits§

Decoder
Decodes compressed Packets into raw Frames.
Encoder
Encodes raw Frames into compressed Packets. Mirror of Decoder.

Type Aliases§

DecoderFactory
Factory function producing a fresh decoder instance.
EncoderFactory
Factory function producing a fresh encoder instance.