package libdrm
Module Drm.EventSource
Parsing events from a device.
Source
type t = | Vblank of Vblank.t| Flip_complete of Vblank.t| Crtc_sequence of Crtc_sequence.t| Unknown of Unsigned.UInt32.t * char Ctypes.CArray.t
parse buffer len parses the events in the first len bytes of buffer.
Hint: you can use let len = Unix.read_bigarray dev buffer 0 (Bigarray.Array1.dim buffer) to read events into the buffer. The buffer must contain only complete events, but the kernel only returns complete events when you read, so this shouldn't be a problem.