syntax = "proto3";

message ServerBound {
  oneof message {
    StreamControl stream_control = 1;
  }
}

message StreamControl {
  bool enabled = 1;
}

message ClientBound {
  oneof message {
    Start start = 1;
    Stop stop = 2;
    Video video = 3;
    Overlay overlay = 4;
    Usb usb = 5;
  }
  uint64 timestamp_us = 10;
}

message Start {
  uint32 width = 1;
  uint32 height = 2;
}

message Stop {
}

message Video {
  bytes data = 1;
}

message Overlay {
  string svg = 1;
}

message Usb {
  bytes data = 1;
}
