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

Player to output FTL stream info

parent 15a03573
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <ftl/timer.hpp> #include <ftl/timer.hpp>
#include <fstream> #include <fstream>
#include <bitset>
#include <Eigen/Eigen> #include <Eigen/Eigen>
...@@ -57,8 +58,23 @@ int main(int argc, char **argv) { ...@@ -57,8 +58,23 @@ int main(int argc, char **argv) {
int current_stream = 0; int current_stream = 0;
int current_channel = 0; int current_channel = 0;
ftl::timer::add(ftl::timer::kTimerMain, [&current_stream,&current_channel,&r](int64_t ts) { int stream_mask = 0;
bool res = r.read(ts, [&current_stream,&current_channel,&r](const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packet &pkt) { std::vector<std::bitset<128>> channel_mask;
ftl::timer::add(ftl::timer::kTimerMain, [&current_stream,&current_channel,&r,&stream_mask,&channel_mask](int64_t ts) {
bool res = r.read(ts, [&current_stream,&current_channel,&r,&stream_mask,&channel_mask](const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packet &pkt) {
if (!(stream_mask & (1 << spkt.streamID))) {
stream_mask |= 1 << spkt.streamID;
LOG(INFO) << " - Stream found (" << (int)spkt.streamID << ")";
channel_mask.push_back(0);
}
if (!(channel_mask[spkt.streamID][(int)spkt.channel])) {
channel_mask[spkt.streamID].set((int)spkt.channel);
LOG(INFO) << " - Channel " << (int)spkt.channel << " found (" << (int)spkt.streamID << ")";
}
if (spkt.streamID == current_stream) { if (spkt.streamID == current_stream) {
if (pkt.codec == codec_t::POSE) { if (pkt.codec == codec_t::POSE) {
......
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