fn init(&mut self, stream_id: u32, encinfo: EncodeParameters) -> EncoderResult<NAStreamRef> {
match encinfo.format {
NACodecTypeInfo::None => Err(EncoderError::FormatError),
NACodecTypeInfo::Video(_) => Err(EncoderError::FormatError),
NACodecTypeInfo::Audio(_) => {
let info = NACodecInfo::new("pcm", encinfo.format, None);
fn init(&mut self, stream_id: u32, encinfo: EncodeParameters) -> EncoderResult<NAStreamRef> {
match encinfo.format {
NACodecTypeInfo::None => Err(EncoderError::FormatError),
NACodecTypeInfo::Video(_) => Err(EncoderError::FormatError),
NACodecTypeInfo::Audio(_) => {
let info = NACodecInfo::new("pcm", encinfo.format, None);