-
-
Notifications
You must be signed in to change notification settings - Fork 127
InputChannel
The input channel controls the user input and frame confirmation. As far it is known we only send messages to this channel.
The input channel supports gamepad input, keyboard input and mouse input. Next to the user input, the video frames are confirmed in metadata frames.
Total length: 5 bytes
Name | Type | Description |
---|---|---|
Packet type | Uint8 | value is 8 for ClientMetadata (needed to get screensizes (Needed for metadata frame confirmation) |
Sequence num | Uint32 | Incrementing num |
Total length: 5 bytes
Name | Type | Description |
---|---|---|
Packet type | Uint8 | value is 16 for ServerMetadata |
Display height | Uint32 | Video source screen height |
Display width | Uint32 | Video source screen width |
Total length: 5 bytes
Name | Type | Description |
---|---|---|
Packet type | Uint8 | Bitwise: 1: Metadata, 2: GamepadReport, 4: Pointer, 8: ClientMetadata, 16: ServerMetadata, 32: Mouse |
Sequence num | Uint32 | Incrementing num |
First it writes the total number of metadata headers to expect.
Total length: 1 bytes
Name | Type | Description |
---|---|---|
Count metadata frames | Uint8 | Number of metadata frames |
For every frame you have to confirm you have to generate the data for. Recommended is not to put more then 30 frames in one packet.
Total length: 28 bytes
Name | Type | Description |
---|---|---|
Server data key | Uint32 | Server data key value of the received video packet |
Video frame arrival time in ms | Uint32 | Arrival time of the video packet in ms |
Video frame render submit time in ms | Uint32 | Render submit time of the video packet in ms |
Video frame decoded submit time in ms | Uint32 | Video decoded time of the video packet in ms |
Video frame render time in ms | Uint32 | Render time of the video packet in ms |
Packet prepare time in ms | Uint32 | Packet prepare time in ms |
Packet send time in mms | Uint32 | Packet send time in ms |
First it writes the total number of gamepad headers to expect.
Total length: 1 bytes
Name | Type | Description |
---|---|---|
Count gamepad frames | Uint8 | Number of gamepad frames |
For every frame you have to confirm you have to generate the data for. Recommended is not to put more then 30 frames in one packet.
Total length: 23 bytes
Name | Type | Description |
---|---|---|
Gamepad index | Uint8 | Gamepad index: 0-3 |
Button mask | Uint16 | Bitwise binary. See table below for the values |
LeftThumbXAxis | Int16 | Left thumb X axis value: 32767, -32767 (Need to confirm values) |
LeftThumbYAxis | Int16 | Left thumb Y axis value: 32767, -32767 (Need to confirm values) |
RightThumbXAxis | Int16 | Right thumb X axis value: 32767, -32767 (Need to confirm values) |
RightThumbYAxis | Int16 | Right thumb Y axis value: 32767, -32767 (Need to confirm values) |
Left Trigger | UInt16 | Left trigger value: 0, 1 (Need to confirm values) |
Right Trigger | UInt16 | Right trigger value: 0, 1 (Need to confirm values) |
PhysicalPhysicality | UInt32 | Unknown, default value: 0 |
VirtualPhysicality | UInt32 | Unknown, default value: 0 |
Button Masks:
Button | Value |
---|---|
Nexus | 2 |
Menu | 4 |
View | 8 |
A | 16 |
B | 32 |
X | 64 |
Y | 128 |
Dpad up | 256 |
Dpad down | 512 |
Dpad left | 1024 |
Dpad right | 2048 |
Left Shoulder | 4096 |
Right Shoulder | 8192 |
Left Thumb | 16384 |
Right Thumb | 32768 |