impl<'a> DemuxCore<'a> for BMVDemuxer<'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 vhdr = NAVideoInfo::new(640, 429, false, PAL8_FORMAT);
}
}
- #[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 BMVDemuxer<'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> BMVDemuxer<'a> {
fn new(io: &'a mut ByteReader<'a>) -> Self {
Self {
impl<'a> DemuxCore<'a> for BMV3Demuxer<'a> {
#[allow(unused_variables)]
- fn open(&mut self, strmgr: &mut StreamManager) -> DemuxerResult<()> {
+ #[allow(clippy::cast_lossless)]
+ fn open(&mut self, strmgr: &mut StreamManager, _seek_index: &mut SeekIndex) -> DemuxerResult<()> {
let src = &mut self.src;
let mut magic = [0u8; 4];
}
}
- #[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 BMV3Demuxer<'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> BMV3Demuxer<'a> {
fn new(io: &'a mut ByteReader<'a>) -> Self {
Self {
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 {
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 {