X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-game%2Fsrc%2Fdemuxers%2Fgdv.rs;h=af0f8577c8f22ce32b1deca3acba1c6af53ca133;hb=24d998947d55228ec37a08cd391983c6239e3c0c;hp=6f27cc4f8119ec278caee605c272a32ca3a43e96;hpb=e69b11482edfe7d2d3604a828e46990df78ef852;p=nihav.git diff --git a/nihav-game/src/demuxers/gdv.rs b/nihav-game/src/demuxers/gdv.rs index 6f27cc4..af0f857 100644 --- a/nihav-game/src/demuxers/gdv.rs +++ b/nihav-game/src/demuxers/gdv.rs @@ -48,7 +48,7 @@ const GDV_SIZE_TABLE: &[GDVFixedSizes] = &[ impl<'a> DemuxCore<'a> for GremlinVideoDemuxer<'a> { #[allow(unused_variables)] - fn open(&mut self, strmgr: &mut StreamManager) -> DemuxerResult<()> { + fn open(&mut self, strmgr: &mut StreamManager, _seek_index: &mut SeekIndex) -> DemuxerResult<()> { let src = &mut self.src; let magic = src.read_u32le()?; if magic != 0x29111994 { return Err(DemuxerError::InvalidData); } @@ -110,11 +110,15 @@ impl<'a> DemuxCore<'a> for GremlinVideoDemuxer<'a> { } } - #[allow(unused_variables)] - fn seek(&mut self, time: u64) -> DemuxerResult<()> { - Err(DemuxerError::NotImplemented) + fn seek(&mut self, _time: NATimePoint, _seek_index: &SeekIndex) -> DemuxerResult<()> { + Err(DemuxerError::NotPossible) } } +impl<'a> NAOptionHandler for GremlinVideoDemuxer<'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> Drop for GremlinVideoDemuxer<'a> { #[allow(unused_variables)] fn drop(&mut self) { @@ -180,7 +184,8 @@ mod test { let mut br = ByteReader::new(&mut fr); let mut dmx = GremlinVideoDemuxer::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 {