mcap.decoder module

class mcap.decoder.DecoderFactory[source]

Bases: ABC

Provides functionality to an McapReader to decode message contents. McapReader classes can be instantiated with a set of DecoderFactories, which are used within iter_decoded_messages().

decoder_for(message_encoding: str, schema: Schema | None) Callable[[bytes], Any] | None[source]

If the message encoding and schema arguments can be decoded by this decoder factory, returns a callable to decode message bytes.