#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct G729Config {
pub annex_b: bool,
}
impl Default for G729Config {
fn default() -> Self {
Self {
annex_b: cfg!(feature = "g729"),
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct EncoderConfig {
pub annex_b: bool,
}
impl Default for EncoderConfig {
fn default() -> Self {
Self {
annex_b: cfg!(feature = "g729"),
}
}
}
impl From<G729Config> for EncoderConfig {
fn from(value: G729Config) -> Self {
Self {
annex_b: value.annex_b,
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct DecoderConfig {
pub annex_b: bool,
pub post_filter: bool,
pub max_consecutive_erasures: Option<usize>,
}
impl Default for DecoderConfig {
fn default() -> Self {
Self {
annex_b: cfg!(feature = "g729"),
post_filter: true,
max_consecutive_erasures: Some(10),
}
}
}
impl From<G729Config> for DecoderConfig {
fn from(value: G729Config) -> Self {
Self {
annex_b: value.annex_b,
post_filter: true,
max_consecutive_erasures: Some(10),
}
}
}