#![forbid(unsafe_code)]
pub mod adts;
pub mod convert;
pub mod flv;
pub mod mp3;
pub mod mp4;
mod mp4_parser;
pub mod ogg;
pub mod ts;
pub mod wav;
#[cfg(any(feature = "mux", feature = "demux"))]
pub mod webm;
use mediaway_common::{Packet, StreamInfo};
pub trait ContainerFormat {
type Muxer;
type Demuxer;
fn muxer() -> Self::Muxer;
fn demuxer() -> Self::Demuxer;
}
pub trait Mux {
type Error;
fn push_packet(&mut self, packet: &Packet) -> Result<(), Self::Error>;
fn flush(&mut self);
fn poll_bytes(&mut self, out: &mut Vec<u8>) -> usize;
}
pub trait Demux {
fn push_bytes(&mut self, chunk: &[u8]);
fn streams(&self) -> &[StreamInfo];
fn poll_packet(&mut self) -> Option<Packet>;
}
pub trait DemuxDecrypt: Demux {
fn set_decryption_key(&mut self, key: [u8; 16]);
fn clear_decryption_key(&mut self);
}