}
}
+impl<'a> NAOptionHandler for RealMediaDemuxer<'a> {
+ fn get_supported_options(&self) -> &[NAOptionDefinition] { &[] }
+ fn set_options(&mut self, _options: &[NAOption]) { }
+ fn query_option_value(&self, _name: &str) -> Option<NAValue> { None }
+}
+
fn read_chunk(src: &mut ByteReader) -> DemuxerResult<(u32, u32, u16)> {
let id = src.read_u32be()?;
if id == 0 { return Ok((0, 0, 0)); }
Ok(())
}
fn parse_index(&mut self, seek_idx: &mut SeekIndex, chunk_size: usize, ver: u16) -> DemuxerResult<()> {
- if ver != 0 { return Ok(()); }
+ if ver != 0 && ver != 2 { return Ok(()); }
let num_entries = self.src.read_u32be()? as usize;
let str_id = self.src.read_u16be()? as u32;
let _next_idx = self.src.read_u32be()?;
- validate!(chunk_size == num_entries * 14 + 10);
+ if ver == 2 {
+ self.src.read_u32be()?;
+ }
+ if ver == 0 {
+ validate!(chunk_size == num_entries * 14 + 10);
+ } else {
+ validate!(chunk_size == num_entries * 18 + 14);
+ }
if num_entries == 0 { return Ok(()); }
seek_idx.add_stream(str_id);
let idx = seek_idx.get_stream_index(str_id).unwrap();
for _ in 0..num_entries {
- let ver = self.src.read_u16be()? as u32;
- validate!(ver == 0);
+ let iver = self.src.read_u16be()?;
+ validate!(iver == ver);
let ts = self.src.read_u32be()? as u64;
+ if ver == 2 {
+ self.src.read_u32be()?;
+ }
let pos = self.src.read_u32be()? as u64;
let _pkt_no = self.src.read_u32be()?;
idx.add_entry(SeekEntry { time: ts, pts: 0, pos });
}
}
+impl<'a> NAOptionHandler for RealAudioDemuxer<'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> RealAudioDemuxer<'a> {
fn new(io: &'a mut ByteReader<'a>) -> Self {
RealAudioDemuxer {
}
}
+impl<'a> NAOptionHandler for RealIVRDemuxer<'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> RealIVRDemuxer<'a> {
fn new(io: &'a mut ByteReader<'a>) -> Self {
RealIVRDemuxer {