use NATimePoint for seeking
[nihav.git] / nihav-game / src / demuxers / gdv.rs
index 6f27cc4f8119ec278caee605c272a32ca3a43e96..af0f8577c8f22ce32b1deca3acba1c6af53ca133 100644 (file)
@@ -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<NAValue> { 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 {