NAME
rtc.h - Bark WebRTC data channels and media streams.
SYNOPSIS
Classes
Local VP8 video publisher configuration.
Signaling, DataChannel, stats, and media callbacks for bark_rtc_t.
Typedefs
Opaque WebRTC manager handle.
Peer connection states delivered via on_peer_state.
Local VP8 video publisher configuration.
Signaling, DataChannel, stats, and media callbacks for bark_rtc_t.
Enumerations
Peer connection states delivered via on_peer_state.
Functions
Return non-zero if WebRTC support is available in this runtime.
Create a WebRTC manager initialized with JSON ICE server configuration.
Replace the JSON ICE server list used for subsequent peer connections.
Bind a bark_audio_t handle for integrated voice playback/capture routing.
Pump main-thread WebRTC signaling, DataChannel, and stats callbacks.
Close all peer connections and destroy the WebRTC manager.
Open a media peer (Opus voice + optional VP8 video) for peer_id.
Apply a remote SDP offer or answer to a media peer.
Add a remote ICE candidate JSON object to a media peer.
Set playback volume gain [0.0..2.0] for a media peer.
Enable or pause outbound screen video to a specific media peer (viewer-gated).
Set playback volume [0.0..1.0] for a peer's screen-share audio track.
Set outbound screen-share audio send gain [0.0..1.0].
Close and release a media peer.
Push 48 kHz mono float32 microphone PCM to encode and send to all media peers.
Query the mixer slot index assigned to peer_id, or -1 if absent.
Resolve the peer_id currently assigned to mixer slot.
Return cumulative received audio packets for peer_id.
Return cumulative received video frames for peer_id.
Copy the latest decoded RGBA8 video frame for peer_id into out.
Start publishing source-agnostic VP8 video frames with cfg.
Update live video encode dimensions, FPS, or bitrate.
Stop publishing local video to media peers.
Submit a tightly-packed RGBA8 frame to the VP8 publisher.
Open a DataChannel peer connection with session identifier sid.
Apply a remote SDP offer or answer to a DataChannel peer.
Add a remote ICE candidate JSON object to a DataChannel peer.
Send a UTF-8 text message over a peer DataChannel.
Send a binary message over a peer DataChannel.
Query the queued unsent byte count on a peer DataChannel.
Close and release a DataChannel peer.
Request an asynchronous transport statistics snapshot (delivered via on_stats).
Detailed Description
Bark WebRTC data channels and media streams.
Headless WebRTC engine: ICE/SDP, DataChannels, Opus 48 kHz voice, and VP8 video.
Works identically on native desktop hosts (libdatachannel) and browser WASM (WebRTC API). Zero OS screen-capture or OpenGL dependencies.
Enumeration Type Documentation
enum bark_rtc_state
Peer connection states delivered via on_peer_state.
Enumerator
- BARK_RTC_NEW
- Peer created; signaling not yet started.
- BARK_RTC_CONNECTING
- ICE/DTLS handshake in progress.
- BARK_RTC_CONNECTED
- Media or DataChannel transport connected.
- BARK_RTC_DISCONNECTED
- Temporarily disconnected.
- BARK_RTC_FAILED
- ICE or DTLS failed.
- BARK_RTC_CLOSED
- Peer closed.
Author
Generated automatically by Doxygen for Bark from the source code.