X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-game%2Fsrc%2Fdemuxers%2Fbmv.rs;h=fafd6f0da5d00e698eb415518ec353285385e9bd;hb=fa57381ec2a3b8c441aa1388492b9ca037cfcf78;hp=44e9193998c9d43c2cb98d1a845ca6003f701428;hpb=33b5a8f0020ee3e6e0cc39ba9f6219965502df84;p=nihav.git diff --git a/nihav-game/src/demuxers/bmv.rs b/nihav-game/src/demuxers/bmv.rs index 44e9193..fafd6f0 100644 --- a/nihav-game/src/demuxers/bmv.rs +++ b/nihav-game/src/demuxers/bmv.rs @@ -75,6 +75,12 @@ impl<'a> DemuxCore<'a> for BMVDemuxer<'a> { } } +impl<'a> NAOptionHandler for BMVDemuxer<'a> { + fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] } + fn set_options(&mut self, _options: &[NAOption]) { } + fn query_option_value(&self, _name: &str) -> Option { None } +} + impl<'a> BMVDemuxer<'a> { fn new(io: &'a mut ByteReader<'a>) -> Self { Self { @@ -110,6 +116,7 @@ struct BMV3Demuxer<'a> { impl<'a> DemuxCore<'a> for BMV3Demuxer<'a> { #[allow(unused_variables)] + #[allow(clippy::cast_lossless)] fn open(&mut self, strmgr: &mut StreamManager, _seek_index: &mut SeekIndex) -> DemuxerResult<()> { let src = &mut self.src; @@ -216,6 +223,12 @@ impl<'a> DemuxCore<'a> for BMV3Demuxer<'a> { } } +impl<'a> NAOptionHandler for BMV3Demuxer<'a> { + fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] } + fn set_options(&mut self, _options: &[NAOption]) { } + fn query_option_value(&self, _name: &str) -> Option { None } +} + impl<'a> BMV3Demuxer<'a> { fn new(io: &'a mut ByteReader<'a>) -> Self { Self { @@ -252,7 +265,8 @@ mod test { let mut br = ByteReader::new(&mut fr); let mut dmx = BMVDemuxer::new(&mut br); let mut sm = StreamManager::new(); - dmx.open(&mut sm).unwrap(); + let mut si = SeekIndex::new(); + dmx.open(&mut sm, &mut si).unwrap(); loop { let pktres = dmx.get_frame(&mut sm); if let Err(e) = pktres { @@ -270,7 +284,8 @@ mod test { let mut br = ByteReader::new(&mut fr); let mut dmx = BMV3Demuxer::new(&mut br); let mut sm = StreamManager::new(); - dmx.open(&mut sm).unwrap(); + let mut si = SeekIndex::new(); + dmx.open(&mut sm, &mut si).unwrap(); loop { let pktres = dmx.get_frame(&mut sm); if let Err(e) = pktres {