mcap_protobuf.decoder module

class mcap_protobuf.decoder.Decoder[source]

Bases: object

decode(schema: Schema, message: Message) Any[source]

Takes a Message record from an MCAP along with its associated Schema, and returns the decoded protobuf message from within.

Parameters:
Raises:

McapProtobufDecodeError – if the content could not be decoded as a protobuf message with the given schema.

Returns:

The decoded message content.

exception mcap_protobuf.decoder.McapProtobufDecodeError[source]

Bases: McapError

Raised when a Message record cannot be decoded as a Protobuf message.