Stream Protocol

Stream Protocol Introduction

Stream Packets

Stream Packet Header

Packet Format

  • Start of Frame Packet

  • Pixel Data Packet

  • End of Frame Packet

  • generic data, h.264 multi-part data, genDC data?

Data Packet Header Size Options

Packet Fmt

Description

Fmt Bytes

Flag Bytes

Frame ID Bytes

Packet ID Bytes

Additional Bytes

Total

00000110 0x06

SoF Short

1

0

3 0-16M

4 0-4B

16

24

00001010 0x0A

SoF Medium

1

1

6 0-2T

8

24

40

00001101 0x0D

SoF Long

1

3

8

8

32

52

00010010 0x12

Data Short

1

0

3

4

0

8

00010100 0x14

Data Medium

1

1

6

8

0

16

00010101 0x15

Data Long

1

3

8

8

0

20

00000010 0x02

EoF Short

1

0

3

4

0

8

00000100 0x04

EoF Medium

1

1

6

8

0

16

00000101 0x05

EoF Long

1

3

8

8

0

20

SoF Fields

Packet Fmt

Description

Pix Fmt

X Y Res

TimeStamp

X Y Off

X Y Pad

Total

00000110 0x06

SoF Short

2

2*2 0-65k

6 48 bits

2*2 0-65k

0

16

00001010 0x0A

SoF Medium

2

4*2 0-4B

8 64 bits

2*2

1*2 0-255

24

00001101 0x0D

SoF Long

4

4*2

8 64 bits

4*2

1*2

32

Pixel Format

  • Bits Per Pixel 4 bits 2-32 bits per pixel

  • Color Space 4 bits 16 options

    • Mono

    • RGB

    • YUV4:4:4

    • YUV4:2:2

Flags

  • Resend Packet

  • Previous block dropped?

  • Device specific

  • Transmit flag?

Frame ID

Packet ID

Start of Frame Packet

  • payload type specific - payload type

  • timestamp

  • pixel format

  • frame format field_id, field_count?

  • size x

  • size y

  • offset x

  • offset y

  • padding x

  • padding y

000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fPT = 0x06Frame ID0020Packet ID40Time Stamp ms60Time Stamp lsPixel Format80Size XSize Ya0Offset XOffSet Y
Start of Frame Short
000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fPT = 0x0AFlagsFrame ID (ms)0020Frame ID (ls)40Packet ID (ms)60Packet ID (ls)80Time Stamp msa0Time Stamp lsc0Pixel FormatPad XPad Ye0Size X100Size Y120Offset XOffSet Y
Start of Frame Medium
000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fPT = 0x0DFlags0020Frame ID (ms)40Frame ID (ls)60Packet ID (ms)80Packet ID (ls)a0Time Stamp msc0Time Stamp lse0Pixel Format100Pad XPad Y120Size X140Size Y160Offset X180OffSet Y
Start of Frame Long

Pixel Data Packet

  • Size of Header 4, 4-64 bytes 0.5 bytes

  • Packet type 4, 16 packet type options 0.5 bytes

  • Frame ID 24 bits 3 bytes

  • Packet ID 32 bits 4 bytes == 8 Bytes minimum

Data Packet Header Size Options

Size Packet Fmt Flag Bits Frame ID Bits Packet ID bits

8

1

0

3 (24 bit)

4 (32 bit)

16

1

1

6 (48 bit)

8 (64 bit)

20

1

3

8 (64 bit)

8 (64 bit)

000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fPT = 0x102Frame ID0020Packet ID40Pixel Data60i+00
Pixel Data Short
000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fPT = 0x104FlagsFrame ID (ms)0020Frame ID (ls)40Packet ID (ms)60Packet ID (ls)80Pixel Dataa0i+00
Pixel Data Medium
000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fPT = 0x105Flags0020Frame ID (ms)40Frame ID (ls)60Packet ID (ms)80Packet ID (ls)a0Pixel Datac0i+00
Pixel Data Long

End of Frame Packet

  • Frame ID

  • Packet ID

000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fPT = 0x02Frame ID0020Packet ID
End of Frame Short
000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fPT = 0x04FlagsFrame ID (ms)0020Frame ID (ls)40Packet ID (ms)60Packet ID (ls)
End of Frame Medium
000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fPT = 0x05Flags0020Frame ID (ms)40Frame ID (ls)60Packet ID (ms)80Packet ID (ls)
End of Frame Long

Full Frame Single Packet

TBD