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 {
void reset() override;
int originStream(int fsid, int fid);
private:
struct StreamEntry {
Stream *stream;
......
......@@ -75,6 +75,13 @@ bool Muxer::onPacket(const std::function<void(const ftl::codecs::StreamPacket &,
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) {
SHARED_LOCK(mutex_, lk);
available(spkt.frameSetID()) += spkt.channel;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment