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

minor change

parent 90eaa7a1
No related branches found
No related tags found
1 merge request!127Implements #196 stream capturing
Pipeline #15266 passed
...@@ -165,9 +165,12 @@ static void run(ftl::Configurable *root) { ...@@ -165,9 +165,12 @@ static void run(ftl::Configurable *root) {
std::ofstream fileout; std::ofstream fileout;
ftl::codecs::Writer writer(fileout); ftl::codecs::Writer writer(fileout);
auto recorder = [&writer](ftl::rgbd::Source *src, const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packet &pkt) { auto recorder = [&writer](ftl::rgbd::Source *src, const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packet &pkt) {
LOG(INFO) << "About to write";
writer.write(spkt, pkt); writer.write(spkt, pkt);
}; };
root->set("record", false);
// Allow stream recording // Allow stream recording
root->on("record", [&group,&fileout,&writer,&recorder](const ftl::config::Event &e) { root->on("record", [&group,&fileout,&writer,&recorder](const ftl::config::Event &e) {
if (e.entity->value("record", false)) { if (e.entity->value("record", false)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment