pub use rff_codec as codec;
pub use rff_core as core;
pub use rff_format as format;
pub mod probe;
pub mod targets;
pub mod transcode;
use rff_codec::CodecRegistry;
use rff_format::FormatRegistry;
pub struct Engine {
pub codecs: CodecRegistry,
pub formats: FormatRegistry,
}
impl Engine {
pub fn new() -> Engine {
let mut codecs = CodecRegistry::new();
register_builtin_codecs(&mut codecs);
let mut formats = FormatRegistry::new();
register_builtin_formats(&mut formats);
Engine { codecs, formats }
}
}
impl Default for Engine {
fn default() -> Self {
Engine::new()
}
}
fn register_builtin_codecs(codecs: &mut CodecRegistry) {
rff_codec_h264::register(codecs);
rff_codec_hevc::register(codecs);
rff_codec_opus::register(codecs);
rff_codec_avif::register(codecs);
rff_codec_png::register(codecs);
rff_codec_jpeg::register(codecs);
rff_codec_gif::register(codecs);
rff_codec_webp::register(codecs);
rff_codec_pcm::register(codecs);
rff_codec_vorbis::register(codecs);
rff_codec_flac::register(codecs);
rff_codec_jxl::register(codecs);
rff_codec_aac::register(codecs);
rff_codec_vp9::register(codecs);
rff_codec_av2::register(codecs);
rff_codec_mp3::register(codecs);
rff_codec_rawvideo::register(codecs);
#[cfg(feature = "h264-openh264")]
rff_codec_openh264::register(codecs);
}
fn register_builtin_formats(formats: &mut FormatRegistry) {
rff_format_avi::register(formats);
rff_format_avif::register(formats);
rff_format_png::register(formats);
rff_format_jpeg::register(formats);
rff_format_gif::register(formats);
rff_format_webp::register(formats);
rff_format_wav::register(formats);
rff_format_y4m::register(formats);
rff_format_ivf::register(formats);
rff_format_av2f::register(formats);
rff_format_ogg::register(formats);
rff_format_flac::register(formats);
rff_format_mp3::register(formats);
rff_format_jxl::register(formats);
rff_format_mp4::register(formats);
rff_format_mkv::register(formats);
rff_format_ts::register(formats);
rff_format_flv::register(formats);
rff_format_srt::register(formats);
rff_format_webvtt::register(formats);
rff_format_ass::register(formats);
rff_format_hls::register(formats);
rff_format_mjpeg::register(formats);
rff_format_rtp::register(formats);
}
pub const VERSION: &str = env!("CARGO_PKG_VERSION");