use std::sync::Arc;
use videocall_types::protos::media_packet::MediaPacket;
use wasm_bindgen::JsValue;
use web_sys::CodecState;
pub trait MediaDecoderTrait {
type InitType;
type ConfigType;
fn new(init: &Self::InitType) -> Result<Self, JsValue>
where
Self: Sized;
fn configure(&self, config: &Self::ConfigType) -> Result<(), JsValue>;
fn decode(&self, packet: Arc<MediaPacket>) -> Result<(), JsValue>;
fn state(&self) -> CodecState;
fn get_sequence_number(&self, packet: &MediaPacket) -> u64;
fn is_keyframe(&self, packet: &MediaPacket) -> bool;
}