core: implement NAOptionHandler for Muxer
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 5 Jun 2020 13:57:56 +0000 (15:57 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 5 Jun 2020 13:57:56 +0000 (15:57 +0200)
nihav-core/src/muxers/mod.rs

index 9f40d54424349bd8c1914e31f1f0d9bb36220212..49f4e2d8da197cf0e0d015066d3bce4f2e3f0db5 100644 (file)
@@ -111,6 +111,18 @@ impl<'a> Muxer<'a> {
     }
 }
 
+impl<'a> NAOptionHandler for Muxer<'a> {
+    fn get_supported_options(&self) -> &[NAOptionDefinition] {
+        self.mux.get_supported_options()
+    }
+    fn set_options(&mut self, options: &[NAOption]) {
+        self.mux.set_options(options);
+    }
+    fn query_option_value(&self, name: &str) -> Option<NAValue> {
+        self.mux.query_option_value(name)
+    }
+}
+
 /// The trait for creating muxers.
 pub trait MuxerCreator {
     /// Creates new muxer instance that will use `ByteWriter` for output.