aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2020-06-12 16:14:15 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2020-06-12 16:14:15 +0200
commitcec53b883696692aab5db70045be143ff0be01ea (patch)
treeb0dec871496ea0b831c9e8249889f1941a683185
parent03c406ea8acbaa3d0914005fec6cb896d5cdc144 (diff)
downloadnihav-cec53b883696692aab5db70045be143ff0be01ea.tar.gz
core: add iterator for the lists of registered demuxers and muxers
-rw-r--r--nihav-core/src/demuxers/mod.rs4
-rw-r--r--nihav-core/src/muxers/mod.rs4
2 files changed, 8 insertions, 0 deletions
diff --git a/nihav-core/src/demuxers/mod.rs b/nihav-core/src/demuxers/mod.rs
index 6723cf2..9a69abb 100644
--- a/nihav-core/src/demuxers/mod.rs
+++ b/nihav-core/src/demuxers/mod.rs
@@ -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()
+ }
}
diff --git a/nihav-core/src/muxers/mod.rs b/nihav-core/src/muxers/mod.rs
index 49f4e2d..6194f51 100644
--- a/nihav-core/src/muxers/mod.rs
+++ b/nihav-core/src/muxers/mod.rs
@@ -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()
+ }
}