Skip to content
Snippets Groups Projects
Commit 1d6e641e authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Allow lookup of origin stream

parent e402e2a1
No related branches found
No related tags found
No related merge requests found
Pipeline #19020 passed
...@@ -125,6 +125,8 @@ class Muxer : public Stream { ...@@ -125,6 +125,8 @@ class Muxer : public Stream {
void reset() override; void reset() override;
int originStream(int fsid, int fid);
private: private:
struct StreamEntry { struct StreamEntry {
Stream *stream; Stream *stream;
......
...@@ -75,6 +75,13 @@ bool Muxer::onPacket(const std::function<void(const ftl::codecs::StreamPacket &, ...@@ -75,6 +75,13 @@ bool Muxer::onPacket(const std::function<void(const ftl::codecs::StreamPacket &,
return true; return true;
} }
int Muxer::originStream(int fsid, int fid) {
if (fid < revmap_.size()) {
return std::get<0>(revmap_[fid]);
}
return -1;
}
bool Muxer::post(const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packet &pkt) { bool Muxer::post(const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packet &pkt) {
SHARED_LOCK(mutex_, lk); SHARED_LOCK(mutex_, lk);
available(spkt.frameSetID()) += spkt.channel; available(spkt.frameSetID()) += spkt.channel;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment