What Problem Does This Solve?
ILCKPacketSink defines the transport layer for live streaming. Once the encoder produces compressed H.264 video and AAC audio packets, something needs to send them — to an RTMP server, a WebRTC peer, or a custom protocol.
This interface decouples encoding from transport, so you can stream to any custom backend or send packets to multiple destinations simultaneously.
When to Use This
Read this if:- Building a custom streaming backend (RTMP, SRT, WebRTC)
- Implementing multi-destination streaming
- Debugging packet-level streaming issues
FLCKNativePacketBridge handles RTMP transport automatically.
Interface Definition
Methods
Open
Returns:
true if the sink opened successfully.
OnVideoFormatReady
OnAudioFormatReady
SendVideoPacket
SendAudioPacket
Close / IsOpen
IsOpen() returns current state.
Registering a Packet Sink
Add sinks to the encoder at runtime viaILCKEncoder:
Thread Safety
Implementation Example
Key Takeaways
Transport abstraction — Decouples encoding from delivery
H.264 + AAC — Packets are compressed, ready to transmit
Thread safety required — Packet methods called from encoder thread
Multiple sinks — Encoder supports multiple simultaneous sinks
Related
- Encoder Interface — Encoder that feeds this sink
- Streaming Feature Interface — High-level streaming control
- Streaming Subsystem — Blueprint-friendly streaming API