fn negotiate_format(&self, encinfo: &EncodeParameters) -> EncoderResult<EncodeParameters> {
Ok(*encinfo)
}
+ fn get_capabilities(&self) -> u64 { 0 }
fn init(&mut self, stream_id: u32, encinfo: EncodeParameters) -> EncoderResult<NAStreamRef> {
let stype = match encinfo.format {
NACodecTypeInfo::Audio(_) => StreamType::Audio,
NACodecTypeInfo::None => StreamType::Data,
};
let info = NACodecInfo::new("null", encinfo.format, None);
- let mut stream = NAStream::new(stype, stream_id, info, encinfo.tb_num, encinfo.tb_den);
+ let mut stream = NAStream::new(stype, stream_id, info, encinfo.tb_num, encinfo.tb_den, 0);
stream.set_num(stream_id as usize);
let stream = stream.into_ref();
self.stream = Some(stream.clone());
Box::new(NullEncoder::new())
}
-pub const NULL_ENCODER: EncoderInfo = EncoderInfo { name: "null", get_encoder: get_encoder };
+pub const NULL_ENCODER: EncoderInfo = EncoderInfo { name: "null", get_encoder };
+#[derive(Default)]
struct NullMuxer<'a> {
bw: PhantomData<&'a mut ByteWriter<'a>>,
}
impl<'a> NullMuxer<'a> {
- fn new(_bw: &'a mut ByteWriter<'a>) -> Self {
- Self {
- bw: PhantomData::default(),
- }
- }
+ fn new(_bw: &'a mut ByteWriter<'a>) -> Self { Self::default() }
}
impl<'a> MuxCore<'a> for NullMuxer<'a> {
}
fn get_name(&self) -> &'static str { "null" }
fn get_capabilities(&self) -> MuxerCapabilities { MuxerCapabilities::Universal }
+ fn get_quirks(&self) -> MuxerQuirks { MuxerQuirks(MUX_QUIRK_UNSYNC) }
}
pub const NULL_MUXER: &dyn MuxerCreator = &NullMuxerCreator{};