pub mod decoder;
pub mod encoder;
pub mod frame;
pub mod jitter_buffer;
pub mod jitter_estimator;
pub mod messages;
pub mod vp9;
#[cfg(all(feature = "uniffi", not(target_arch = "wasm32")))]
uniffi::setup_scaffolding!();
#[cfg(all(feature = "uniffi", not(target_arch = "wasm32")))]
mod ffi;
#[cfg(feature = "test-utils")]
pub mod testing;
#[cfg(feature = "wasm")]
pub mod video_diagnostics {
use videocall_diagnostics::{global_sender, metric, now_ms, DiagEvent};
pub fn report_video_stats(stream_id: String, fps: Option<f64>, frames_buffered: Option<u64>) {
let mut metrics = Vec::new();
if let Some(f) = fps {
metrics.push(metric!("fps_received", f));
}
if let Some(b) = frames_buffered {
metrics.push(metric!("frames_buffered", b));
}
if metrics.is_empty() {
return;
}
let event = DiagEvent {
subsystem: "video",
stream_id: Some(stream_id),
ts_ms: now_ms(),
metrics,
};
let _ = global_sender().try_broadcast(event);
}
}