mirror of
https://github.com/ratspeak/rsLXST
synced 2026-11-22 23:10:37 +00:00
api: record additive Codec2 packet contract
This commit is contained in:
1 parent
719ec1edb6
commit
b1b87860c4
2 files changed
+48
-15
No files matched your search
@@ -21,6 +21,25 @@ impl lxst_core::Codec2Mode
|
||||
pub const fn lxst_core::Codec2Mode::bitrate(self) -> u16
|
||||
pub const fn lxst_core::Codec2Mode::from_header(u8) -> core::result::Result<Self, lxst_core::Error>
|
||||
pub const fn lxst_core::Codec2Mode::header(self) -> u8
|
||||
pub enum lxst_core::Codec2PacketError<E>
|
||||
pub lxst_core::Codec2PacketError::Backend(E)
|
||||
pub lxst_core::Codec2PacketError::BackendModeMismatch
|
||||
pub lxst_core::Codec2PacketError::BackendModeMismatch::actual: lxst_core::Codec2Mode
|
||||
pub lxst_core::Codec2PacketError::BackendModeMismatch::expected: lxst_core::Codec2Mode
|
||||
pub lxst_core::Codec2PacketError::Failed
|
||||
pub lxst_core::Codec2PacketError::ModeHeader
|
||||
pub lxst_core::Codec2PacketError::ModeHeader::actual: u8
|
||||
pub lxst_core::Codec2PacketError::ModeHeader::expected: u8
|
||||
pub lxst_core::Codec2PacketError::NonCodec2Profile(lxst_core::Profile)
|
||||
pub lxst_core::Codec2PacketError::OutputCapacity
|
||||
pub lxst_core::Codec2PacketError::OutputCapacity::actual: usize
|
||||
pub lxst_core::Codec2PacketError::OutputCapacity::required: usize
|
||||
pub lxst_core::Codec2PacketError::PayloadLength
|
||||
pub lxst_core::Codec2PacketError::PayloadLength::actual: usize
|
||||
pub lxst_core::Codec2PacketError::PayloadLength::expected: usize
|
||||
pub lxst_core::Codec2PacketError::SampleCount
|
||||
pub lxst_core::Codec2PacketError::SampleCount::actual: usize
|
||||
pub lxst_core::Codec2PacketError::SampleCount::expected: usize
|
||||
#[repr(u8)] pub enum lxst_core::CodecKind
|
||||
pub lxst_core::CodecKind::Codec2 = 2
|
||||
pub lxst_core::CodecKind::Null = 255
|
||||
@@ -205,6 +224,15 @@ pub lxst_core::TelephonyAction::StartDialTone
|
||||
pub lxst_core::TelephonyAction::SwitchProfile(lxst_core::Profile)
|
||||
pub lxst_core::TelephonyAction::TeardownLink
|
||||
pub lxst_core::TelephonyAction::Terminate(core::option::Option<lxst_core::SignallingStatus>)
|
||||
pub struct lxst_core::Codec2PacketCodec<B>
|
||||
impl<B: lxst_core::Codec2Backend> lxst_core::Codec2PacketCodec<B>
|
||||
pub fn lxst_core::Codec2PacketCodec<B>::decode_into(&mut self, &[u8], &mut [i16]) -> core::result::Result<usize, lxst_core::Codec2PacketError<<B as lxst_core::Codec2Backend>::Error>>
|
||||
pub fn lxst_core::Codec2PacketCodec<B>::encode_into(&mut self, &[i16], &mut [u8]) -> core::result::Result<usize, lxst_core::Codec2PacketError<<B as lxst_core::Codec2Backend>::Error>>
|
||||
pub const fn lxst_core::Codec2PacketCodec<B>::mode(&self) -> lxst_core::Codec2Mode
|
||||
pub fn lxst_core::Codec2PacketCodec<B>::new(lxst_core::Profile, B) -> core::result::Result<Self, lxst_core::Codec2PacketError<<B as lxst_core::Codec2Backend>::Error>>
|
||||
pub const fn lxst_core::Codec2PacketCodec<B>::payload_bytes(&self) -> usize
|
||||
pub const fn lxst_core::Codec2PacketCodec<B>::profile(&self) -> lxst_core::Profile
|
||||
pub const fn lxst_core::Codec2PacketCodec<B>::sample_frames(&self) -> usize
|
||||
pub struct lxst_core::Frame
|
||||
pub lxst_core::Frame::codec: lxst_core::CodecKind
|
||||
pub lxst_core::Frame::payload: alloc::vec::Vec<u8>
|
||||
@@ -328,4 +356,9 @@ pub const lxst_core::OPUS_ENCODED_PACKET_MAX_BYTES: usize
|
||||
pub const lxst_core::OPUS_MONO_DECODE_SAMPLE_RATE_HZ: u32
|
||||
pub const lxst_core::TELEPHONY_DESTINATION_NAME: &str
|
||||
pub const lxst_core::TELEPHONY_PRIMITIVE_NAME: &str
|
||||
pub trait lxst_core::Codec2Backend
|
||||
pub type lxst_core::Codec2Backend::Error
|
||||
pub fn lxst_core::Codec2Backend::decode_native(&mut self, &[u8], &mut [i16]) -> core::result::Result<(), Self::Error>
|
||||
pub fn lxst_core::Codec2Backend::encode_native(&mut self, &[i16], &mut [u8]) -> core::result::Result<(), Self::Error>
|
||||
pub fn lxst_core::Codec2Backend::mode(&self) -> lxst_core::Codec2Mode
|
||||
pub fn lxst_core::opus_packet_duration_samples_48k(&[u8]) -> core::result::Result<usize, lxst_core::OpusCodecError>
|
||||
+15
-15
@@ -19,14 +19,13 @@
|
||||
"sourceCommit": "af89a03094605dbdf7264d06fdc546526ec6980b"
|
||||
},
|
||||
"snapshotSource": {
|
||||
"commit": "68df3223773a9553ea458fc10b4b939915986aad",
|
||||
"capturedOn": "2026-08-17",
|
||||
"commit": "719ec1edb62458149a96222d3249e8dd4c3abedc",
|
||||
"capturedOn": "2026-10-01",
|
||||
"review": {
|
||||
"areas": [
|
||||
"LXST codecs, profiles, signalling, and streams",
|
||||
"Reticulum Link media transport",
|
||||
"telephony service ownership and lifecycle",
|
||||
"Opus transmit and receive streams"
|
||||
"Bounded fixed-profile Codec2 packet processing and caller-owned PCM/output buffers",
|
||||
"Native Codec2 backend contract and failure-state ownership",
|
||||
"Existing Opus and telephony APIs retained"
|
||||
],
|
||||
"canonicalPath": "lxst_telephony::TelephonyService",
|
||||
"canonicalConstruction": [
|
||||
@@ -40,19 +39,20 @@
|
||||
"TelephonyService::new",
|
||||
"TelephonyService::with_config"
|
||||
],
|
||||
"classification": "existing experimental service boundary",
|
||||
"classification": "additive experimental Codec2 backend boundary; no bundled native backend or telephony activation",
|
||||
"publicApiDiff": {
|
||||
"added": 0,
|
||||
"added": 33,
|
||||
"removed": 0
|
||||
},
|
||||
"semver": "no version consequence; documentation and consumer migration only",
|
||||
"semver": "additive experimental API in the unreleased 0.2 line; no existing signatures removed or changed",
|
||||
"deprecations": "none",
|
||||
"wirePersistenceRuntimeImpact": "none",
|
||||
"wirePersistenceRuntimeImpact": "Existing wire IDs, profiles, persistence and live streams unchanged. New opt-in packet adapter validates fixed-profile Codec2 payloads and latches backend failures.",
|
||||
"platformEvidence": [
|
||||
"host service tests and compiled example",
|
||||
"68 lxst-core tests including existing Python wire/raw parity",
|
||||
"stable and Rust 1.87 strict Clippy",
|
||||
"Android and Apple compile gates",
|
||||
"Python Telephone interoperability"
|
||||
"compiled external Codec2 consumer",
|
||||
"24 actual Rust Codec2 packet-boundary cases against native frames and C reference data; codec quality and allocation qualification remain separate",
|
||||
"separate Rust candidate no_std compile on pinned ESP32-S3 toolchain; no on-device runtime claim"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -63,8 +63,8 @@
|
||||
"tier": "experimental",
|
||||
"compatibility": "reviewed-snapshot",
|
||||
"snapshot": "api/snapshots/lxst-core.txt",
|
||||
"itemCount": 331,
|
||||
"sha256": "87cc451d6da48cc06cd2bae9b26bae523407a20f66e842f04844ceecb8c5867d"
|
||||
"itemCount": 364,
|
||||
"sha256": "2c272021cc340af7f779d944bebb336ae1804938239a8ead3cbf11a8074022e4"
|
||||
},
|
||||
{
|
||||
"name": "lxst-rns",
|
||||
|
||||
Reference in new issue
Block a user