feat(video+desktop): camera capture, video UI, E2E AEAD wiring, test fixes
Blockers 4 & 5: browser getUserMedia → JPEG IPC → Rust I420 pipeline; remote video strip renders decoded frames via canvas; EncryptingTransport wraps QuinnTransport so WZP AEAD is applied to all media (C2 fix). Test fixes: HandshakeResult.session destructuring across relay/client/crypto integration tests; video_codecs field added to all CallOffer/CallAnswer structs; wzp-video pipeline_roundtrip integration tests added. PRD docs: five Kimi-ready specs for E2E encryption, Android NDK 0.9 migration, quality upgrade flow, wire-format hardening, and clippy debt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -574,6 +574,10 @@ pub enum SignalMessage {
|
||||
/// Protocol versions this client supports (default [2]).
|
||||
#[serde(default = "default_supported_versions")]
|
||||
supported_versions: Vec<u8>,
|
||||
/// Video codecs supported by the caller, in preference order.
|
||||
/// Absent on old clients (treated as video-incapable).
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
video_codecs: Vec<crate::CodecId>,
|
||||
},
|
||||
|
||||
/// Call acceptance (analogous to Warzone's WireMessage::CallAnswer).
|
||||
@@ -588,6 +592,10 @@ pub enum SignalMessage {
|
||||
signature: Vec<u8>,
|
||||
/// Chosen quality profile.
|
||||
chosen_profile: crate::QualityProfile,
|
||||
/// Video codec chosen by the callee (None = video declined or peer incapable).
|
||||
/// Absent on old clients (treated as no video).
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
video_codec: Option<crate::CodecId>,
|
||||
},
|
||||
|
||||
/// ICE candidate for NAT traversal.
|
||||
|
||||
@@ -85,10 +85,10 @@ pub trait FecEncoder: Send + Sync {
|
||||
|
||||
/// Finalize the current block and start a new one.
|
||||
/// Returns the block ID of the finalized block.
|
||||
fn finalize_block(&mut self) -> Result<u8, FecError>;
|
||||
fn finalize_block(&mut self) -> Result<u16, FecError>;
|
||||
|
||||
/// Current block ID being built.
|
||||
fn current_block_id(&self) -> u8;
|
||||
fn current_block_id(&self) -> u16;
|
||||
|
||||
/// Number of source symbols in the current block.
|
||||
fn current_block_size(&self) -> usize;
|
||||
@@ -99,7 +99,7 @@ pub trait FecDecoder: Send + Sync {
|
||||
/// Feed a received symbol (source or repair) into the decoder.
|
||||
fn add_symbol(
|
||||
&mut self,
|
||||
block_id: u8,
|
||||
block_id: u16,
|
||||
symbol_index: u16,
|
||||
is_repair: bool,
|
||||
data: &[u8],
|
||||
@@ -109,10 +109,10 @@ pub trait FecDecoder: Send + Sync {
|
||||
///
|
||||
/// Returns `None` if not yet decodable (insufficient symbols).
|
||||
/// Returns `Some(Vec<source_frames>)` on success.
|
||||
fn try_decode(&mut self, block_id: u8) -> Result<Option<Vec<Vec<u8>>>, FecError>;
|
||||
fn try_decode(&mut self, block_id: u16) -> Result<Option<Vec<Vec<u8>>>, FecError>;
|
||||
|
||||
/// Drop state for blocks older than `block_id`.
|
||||
fn expire_before(&mut self, block_id: u8);
|
||||
fn expire_before(&mut self, block_id: u16);
|
||||
}
|
||||
|
||||
// ─── Crypto Traits ───────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user