Expand description
librtmp2 — A Rust port of the librtmp2 RTMP/RTMPS protocol library.
This is a complete 1:1 Rust port of the C library librtmp2.
It provides server, client, handshake, chunk, message, AMF, FLV, and E-RTMP functionality.
Re-exports§
pub use types::*;
Modules§
- alloc
- Custom allocator hooks for librtmp2
- amf
- AMF0/AMF3 encoder/decoder
- buffer
- Growable byte buffer
- bytes
- Byte-swapping and endian helpers
- chunk
- Chunk reader/writer + csid state
- client
- Outbound RTMP client
- ertmp
- Enhanced RTMP v1/v2 extension types
- flv
- FLV audio/video/script tag parsing
- handshake
- Legacy RTMP handshake (C0/C1/C2 ↔ S0/S1/S2)
- log
- Logging subsystem
- message
- Message dispatch, control, and command encode/decode
- net
- Small networking helpers shared by the server (bind) and client (connect) entry points.
- server
- RTMP server listener
- session
- Connection lifecycle, state machine, publish/play flows
- transport
- Plaintext + optional TLS byte transport.
- types
- Core type definitions for librtmp2
Macros§
- log_
debug - Log at debug level.
- log_
error - Log at error level.
- log_
info - Log at info level.
- log_
warn - Log at warn level.
Constants§
- VERSION_
STRING - Library version string.
Functions§
- error_
string - Get the error string for an error code.
- lrtmp2_
client_ ⚠connect - Connect (FFI-compatible).
- lrtmp2_
client_ ⚠create - Create a client (FFI-compatible).
- lrtmp2_
client_ ⚠destroy - Destroy a client (FFI-compatible).
- lrtmp2_
client_ ⚠play - Play (FFI-compatible).
- lrtmp2_
client_ ⚠poll - Poll client (FFI-compatible).
- lrtmp2_
client_ ⚠publish - Publish (FFI-compatible).
- lrtmp2_
client_ ⚠send_ frame - Send a frame (FFI-compatible).
- lrtmp2_
conn_ ⚠get_ fd - Get connection fd (FFI-compatible).
- lrtmp2_
error_ ⚠string - Get error string (FFI-compatible).
- lrtmp2_
server_ ⚠create - Create a server (FFI-compatible).
- lrtmp2_
server_ ⚠destroy - Destroy a server (FFI-compatible).
- lrtmp2_
server_ ⚠listen - Start listening (FFI-compatible).
- lrtmp2_
server_ ⚠poll - Poll for events (FFI-compatible).
- lrtmp2_
server_ ⚠stop - Stop the server (FFI-compatible).
- lrtmp2_
tls_ supported - Check TLS support (FFI-compatible).
- lrtmp2_
version_ major - Get major version (FFI-compatible).
- lrtmp2_
version_ minor - Get minor version (FFI-compatible).
- lrtmp2_
version_ patch - Get patch version (FFI-compatible).
- lrtmp2_
version_ string - Get version string (FFI-compatible).
- tls_
supported - Check if TLS support is available.
- version_
major - Get the major version number.
- version_
minor - Get the minor version number.
- version_
patch - Get the patch version number.
- version_
string - Get the library version string.