roboto.formats.mcap.msgpack_decoder_factory
MCAP decoder factory for msgpack-encoded messages.
Exposes an mcap.decoder.DecoderFactory that decodes msgpack messages (typically described by a jsonschema schema), for use by McapReader. Decoding is delegated to the shared Rust decoder (the mcap_codec extension built from roboto-mcap-codec), which returns nested dict / list / scalar values.
Known limitation: msgpack-numpy ndarray fields — nested maps with binary keys (nd/type/shape/data), used by compressed-video packet payloads — are silently dropped by the codec: the field decodes to an empty {} and the payload bytes are unrecoverable downstream. Every other field of such a message decodes normally. Tracked in https://github.com/roboto-ai/roboto-mcap-codec/issues/5; until that lands, consumers must treat non-bytes payload fields as undecodable rather than assume frame data is present.
Module Contents
MsgpackDecodeError
Bases: mcap.exceptions.McapError
Raised when a msgpack message cannot be decoded.
MsgpackDecoderFactory
Bases: mcap.decoder.DecoderFactory
Decode msgpack-encoded MCAP messages via the shared Rust mcap_codec decoder.
Supply an instance to mcap.reader.make_reader(). The schema is parsed once per schema id; the returned callable then decodes each message into nested dict / list / scalar values.
MsgpackDecoderFactory.decoder_for()
If the message encoding and schema arguments can be decoded by this decoder factory, returns a callable to decode message bytes.
Parameters
message_encoding strschema Optional[mcap.Return type
make_msgpack_decoder_factory()
Build a decoder factory for msgpack-encoded messages, backed by the shared Rust mcap_codec decoder.
Return type