VRTIGO provides Python bindings for packet parsing, readers, framing utilities, and time-related types.
DataPacketandContextPacketare owning packet objects. They are safe to retain after reading.DataPacketViewandContextPacketVieware non-owning parsed views created withparse(bytes).
DataPacket.from_bytes(data)copies and owns the packet bytes.DataPacketView.parse(data)andContextPacketView.parse(data)borrow the inputbytes; keep the originalbytesalive while using the view.
For data packets (DataPacket and DataPacketView):
- Header-derived metadata is exposed directly as properties such as
type,packet_count,size_bytes,size_words,has_stream_id,has_class_id,has_timestamp,has_trailer,stream_id,class_id, andtimestamp. payloadreturns copiedbytes.payload_viewreturns a read-only zero-copymemoryviewover the payload.trailer_rawreturns the raw 32-bit trailer word, orNonewhen the packet has no trailer.
The Python bindings also expose VRT time and scheduling helpers:
Timestampfor VRT timestampsDurationfor picosecond-accurate durationsSamplePeriodfor exact sample-rate derived intervalsSampleClockfor sample-driven time progressionStartTimefor scheduling stream start behavior
For details and examples, see Timestamp Math and Python Timestamp Math.
VRTFileReaderreads packets from files.UDPVRTReaderreads packets from UDP sockets.- Both readers return owning
DataPacketorContextPacketinstances. SampleFramerconsumes packet payloads and accumulates them into fixed-size sample frames.
For more detail, see I/O Helpers, Reading VRT Files, and Sample Framer.
For repository build commands, tests, and contributor guidance, see ../DEVELOPMENT.md.