Expand description
Video and audio codec implementations
§Implementation Status
The current codec implementations are stub/simulation implementations designed for:
- Development and testing without external codec libraries
- API design validation and interface stabilization
- Performance testing of the transport layer
§OpenH264 (Video)
- Current: Simulation using compression (achieves ~25% size reduction for testing)
- Production: Will integrate with real openh264 crate when
h264feature is enabled - Status: Safe for development/testing, not for production video calls
§Opus (Audio)
- Current: Simulation with frame size validation and format conversion
- Production: Will integrate with real opus crate when
opusfeature is enabled - Status: Safe for development/testing, not for production audio calls
§Migration Path
To use real codecs in production:
- Enable the respective features:
features = ["h264", "opus"] - Replace stub implementations in
openh264.rsandopus.rs - Run integration tests with actual codec libraries
The stub implementations maintain the same API surface, so migration is transparent to users.
Re-exports§
pub use openh264::OpenH264Decoder;pub use openh264::OpenH264Encoder;pub use opus::AudioFrame;pub use opus::Channels;pub use opus::OpusDecoder;pub use opus::OpusEncoder;pub use opus::OpusEncoderConfig;pub use opus::SampleRate;
Modules§
Structs§
- Video
Frame - Video frame
Enums§
- Audio
Codec - Audio codec selection
- Codec
Error - Codec error types
- Video
Codec - Video codec selection
Constants§
- MAX_
HEIGHT - MAX_
RGB_ SIZE - MAX_
WIDTH - Maximum allowed dimensions for safety
Traits§
- Video
Decoder - Video decoder trait
- Video
Encoder - Video encoder trait
Type Aliases§
- Result
- Codec result type