]> git.nihav.org Git - nihav.git/commitdiff
core: add iterator for the lists of registered demuxers and muxers
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 12 Jun 2020 14:14:15 +0000 (16:14 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 12 Jun 2020 14:14:15 +0000 (16:14 +0200)
nihav-core/src/demuxers/mod.rs
nihav-core/src/muxers/mod.rs

index 6723cf2e0fdca7f18fe889bb632ac720c5fe341b..9a69abb18c6d3d11c7b6a3241069be90e8706957 100644 (file)
@@ -459,4 +459,8 @@ impl RegisteredDemuxers {
         }
         None
     }
+    /// Provides an iterator over currently registered demuxers.
+    pub fn iter(&self) -> std::slice::Iter<&DemuxerCreator> {
+        self.dmxs.iter()
+    }
 }
index 49f4e2d8da197cf0e0d015066d3bce4f2e3f0db5..6194f518c092e75e68493883470f2a3f76139159 100644 (file)
@@ -164,4 +164,8 @@ impl RegisteredMuxers {
         }
         None
     }
+    /// Provides an iterator over currently registered muxers.
+    pub fn iter(&self) -> std::slice::Iter<&MuxerCreator> {
+        self.muxes.iter()
+    }
 }