[domistream] Video packetizer: even FEC block split; control host: refused input names its type; PROTOCOL 5.2/5.3 host facts (S-26); version 0.2.2

This commit is contained in:
2026-12-04 15:49:04 +01:00
parent a78bde9037
commit c7dcdc80f3
9 changed files with 37 additions and 19 deletions
+8 -1
View File
@@ -63,6 +63,9 @@ pub enum ClientControlMessage {
InputRejected {
/// Body length.
body_len: usize,
/// The input type field (body bytes 4..8, little-endian, PROTOCOL.md 4) when the body is long enough: for the
/// logs, so a host can name what a client sends.
input_type: Option<u32>,
/// Why.
error: Error,
},
@@ -111,7 +114,11 @@ pub fn parse_client_message(message: &[u8]) -> Result<ClientControlMessage> {
t if t == MessageType::FrameStats as u16 => ClientControlMessage::FrameStats(b.to_vec()),
t if t == MessageType::InputData as u16 => match crate::input::parse_input(message) {
Ok(e) => ClientControlMessage::Input(e),
Err(error) => ClientControlMessage::InputRejected { body_len: b.len(), error },
Err(error) => ClientControlMessage::InputRejected {
body_len: b.len(),
input_type: b.get(4..8).and_then(|t| <[u8; 4]>::try_from(t).ok()).map(u32::from_le_bytes),
error,
},
},
other => ClientControlMessage::Unknown { message_type: other, body_len: b.len() },
})