diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-06-12 16:14:15 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-06-12 16:14:15 +0200 |
commit | cec53b883696692aab5db70045be143ff0be01ea (patch) | |
tree | b0dec871496ea0b831c9e8249889f1941a683185 | |
parent | 03c406ea8acbaa3d0914005fec6cb896d5cdc144 (diff) | |
download | nihav-cec53b883696692aab5db70045be143ff0be01ea.tar.gz |
core: add iterator for the lists of registered demuxers and muxers
-rw-r--r-- | nihav-core/src/demuxers/mod.rs | 4 | ||||
-rw-r--r-- | nihav-core/src/muxers/mod.rs | 4 |
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() + } } |