]> git.nihav.org Git - nihav.git/commitdiff
nihav_core/muxer: make Muxer fields and constructor public
authorKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 9 Jun 2026 16:52:58 +0000 (18:52 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 9 Jun 2026 16:52:58 +0000 (18:52 +0200)
At last this will allow creating it from custom MuxCore manually.

nihav-core/src/muxers/mod.rs

index 42068b4c675da366b0e2d7c54a9619499c709d18..bf6e704673865a4c5fa1afcf95f98f95da7298d6 100644 (file)
@@ -115,13 +115,13 @@ pub trait MuxCore<'a>: NAOptionHandler {
 
 /// Muxer structure with auxiliary data.
 pub struct Muxer<'a> {
-    mux:        Box<dyn MuxCore<'a> + 'a>,
-    streams:    StreamManager,
+    pub mux:        Box<dyn MuxCore<'a> + 'a>,
+    pub streams:    StreamManager,
 }
 
 impl<'a> Muxer<'a> {
     /// Constructs a new `Muxer` instance.
-    fn new(mux: Box<dyn MuxCore<'a> + 'a>, strmgr: StreamManager) -> Self {
+    pub fn new(mux: Box<dyn MuxCore<'a> + 'a>, strmgr: StreamManager) -> Self {
         Muxer {
             mux,
             streams:    strmgr,