cognitivexr / CogStream

CogStream: a platform for distributed real-time AI-based video analytics 🧠 🤖
Apache License 2.0
7 stars 1 forks source link

Improve streaming protocol specification #11

Closed thrau closed 3 years ago

thrau commented 3 years ago

I came up with this initial version that should keep us going for a while:

Header: 24 octets: 6 fields, 1 field = 4 octets

Octet 0: stream Id Octet 4: frame id Octet 8: unix time seconds Octet 12: unix time nanoseconds Octet 16: metadata length (Nm) Octet 20: data length (Nd)

Payload: Nm + Nd octets

Octet 24 = metadata (can be anything, e.g. a JSON) Octet 24+Nm = data