}
}
+impl<'a> NAOptionHandler for AVIDemuxer<'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> AVIDemuxer<'a> {
fn new(io: &'a mut ByteReader<'a>) -> Self {
AVIDemuxer {
}
}
+impl<'a> NAOptionHandler for MOVDemuxer<'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> MOVDemuxer<'a> {
fn new(io: &'a mut ByteReader<'a>) -> Self {
MOVDemuxer {
}
}
+impl<'a> NAOptionHandler for WAVDemuxer<'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> WAVDemuxer<'a> {
fn new(io: &'a mut ByteReader<'a>) -> Self {
WAVDemuxer {
//! Demuxer definitions.
pub use crate::frame::*;
pub use crate::io::byteio::*;
+pub use crate::options::*;
/// A list specifying general demuxing errors.
#[derive(Debug,Clone,Copy,PartialEq)]
pub type DemuxerResult<T> = Result<T, DemuxerError>;
/// A trait for demuxing operations.
-pub trait DemuxCore<'a> {
+pub trait DemuxCore<'a>: NAOptionHandler {
/// Opens the input stream, reads required headers and prepares everything for packet demuxing.
fn open(&mut self, strmgr: &mut StreamManager, seek_idx: &mut SeekIndex) -> DemuxerResult<()>;
/// Demuxes a packet.
}
}
+impl<'a> NAOptionHandler for Demuxer<'a> {
+ fn get_supported_options(&self) -> &[NAOptionDefinition] {
+ self.dmx.get_supported_options()
+ }
+ fn set_options(&mut self, options: &[NAOption]) {
+ self.dmx.set_options(options);
+ }
+ fn query_option_value(&self, name: &str) -> Option<NAValue> {
+ self.dmx.query_option_value(name)
+ }
+}
+
impl From<ByteIOError> for DemuxerError {
fn from(_: ByteIOError) -> Self { DemuxerError::IOError }
}
}
}
+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> 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 {
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) {
}
}
+impl<'a> NAOptionHandler for VMDDemuxer<'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> VMDDemuxer<'a> {
fn new(io: &'a mut ByteReader<'a>) -> Self {
Self {
}
}
+impl<'a> NAOptionHandler for BinkDemuxer<'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> BinkDemuxer<'a> {
fn new(io: &'a mut ByteReader<'a>) -> Self {
Self {
}
}
+impl<'a> NAOptionHandler for SmackerVideoDemuxer<'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> SmackerVideoDemuxer<'a> {
fn new(io: &'a mut ByteReader<'a>) -> Self {
SmackerVideoDemuxer {
}
}
+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)); }
}
}
+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 {
}
}
+impl<'a> NAOptionHandler for VivoDemuxer<'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> VivoDemuxer<'a> {
fn new(io: &'a mut ByteReader<'a>) -> Self {
VivoDemuxer {