diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-05-31 18:15:50 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-05-31 18:15:50 +0200 |
commit | 787b8d03074419d7f8e6b52daba02a3807444bc2 (patch) | |
tree | 60427270debe3b4442dc1a3d1e1f7c68a178a314 /nihav-realmedia/src/demuxers/realmedia.rs | |
parent | dc80f48ea3097c891b159667ea239d3c20c78bc8 (diff) | |
download | nihav-787b8d03074419d7f8e6b52daba02a3807444bc2.tar.gz |
introduce option handling for demuxers
Diffstat (limited to 'nihav-realmedia/src/demuxers/realmedia.rs')
-rw-r--r-- | nihav-realmedia/src/demuxers/realmedia.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nihav-realmedia/src/demuxers/realmedia.rs b/nihav-realmedia/src/demuxers/realmedia.rs index 1fa52f9..d591eab 100644 --- a/nihav-realmedia/src/demuxers/realmedia.rs +++ b/nihav-realmedia/src/demuxers/realmedia.rs @@ -764,6 +764,12 @@ impl<'a> DemuxCore<'a> for RealMediaDemuxer<'a> { } } +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)); } @@ -1252,6 +1258,12 @@ println!(" got ainfo {:?}", ainfo); } } +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 { @@ -1591,6 +1603,12 @@ println!("R1M kind"); } } +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 { |