diff --git a/applications/vision/src/main.cpp b/applications/vision/src/main.cpp index d8f4d58a537bac564c545caef45661a11ff5499a..b9f8933004793f0d062f0bc3651a362a28bb3abf 100644 --- a/applications/vision/src/main.cpp +++ b/applications/vision/src/main.cpp @@ -197,10 +197,7 @@ static void run(ftl::Configurable *root) { "clipping" }); - std::atomic_flag busy; - busy.clear(); - - auto h = creator->onFrameSet([sender,outstream,&stats_count,&latency,&frames,&stats_time,pipeline,&busy,&encodable,&previous_encodable](const ftl::data::FrameSetPtr &fs) { + auto h = creator->onFrameSet([sender,outstream,&stats_count,&latency,&frames,&stats_time,pipeline,&encodable,&previous_encodable](const ftl::data::FrameSetPtr &fs) { // Decide what to encode here, based upon what remote users select const auto sel = outstream->selectedNoExcept(fs->frameset()); @@ -222,7 +219,7 @@ static void run(ftl::Configurable *root) { fs->set(ftl::data::FSFlag::AUTO_SEND); - bool did_pipe = pipeline->apply(*fs, *fs, [fs,&frames,&latency,&busy]() { + bool did_pipe = pipeline->apply(*fs, *fs, [fs,&frames,&latency]() { if (fs->hasAnyChanged(Channel::Depth)) fs->flush(Channel::Depth); ++frames; latency += float(ftl::timer::get_time() - fs->timestamp()); @@ -236,7 +233,7 @@ static void run(ftl::Configurable *root) { // Do some encoding (eg. colour) whilst pipeline runs - ftl::pool.push([fs,&stats_count,&latency,&frames,&stats_time,&busy](int id){ + ftl::pool.push([fs,&stats_count,&latency,&frames,&stats_time](int id){ if (fs->hasAnyChanged(Channel::Audio)) { fs->flush(ftl::codecs::Channel::Audio); } diff --git a/components/operators/src/operator.cpp b/components/operators/src/operator.cpp index f0e5c677193e141f79820b59308686d6ded2d7aa..4cc0f90598d49fc70eb6b48eec773a5733b6a459 100644 --- a/components/operators/src/operator.cpp +++ b/components/operators/src/operator.cpp @@ -83,7 +83,6 @@ bool Graph::apply(FrameSet &in, FrameSet &out, const std::function<void()> &cb) return false; } - callback_ = cb; valid_buffers_.clear(); for (auto &f : out.frames) { @@ -184,7 +183,6 @@ bool Graph::apply(Frame &in, Frame &out, const std::function<void()> &cb) { } valid_buffers_.clear(); - callback_ = cb; if (!out.hasOwn(Channel::Pipelines)) out.create<std::list<std::string>>(Channel::Pipelines); auto pls = out.set<std::list<std::string>>(Channel::Pipelines); diff --git a/components/streams/src/feed.cpp b/components/streams/src/feed.cpp index ba46586d5dc90e0067f2ed7dfb48acade9ed53bd..54b35d200183ee0f9134cee7f528040119898f37 100644 --- a/components/streams/src/feed.cpp +++ b/components/streams/src/feed.cpp @@ -184,7 +184,9 @@ Feed::Feed(nlohmann::json &config, ftl::net::Universe*net) : lk.unlock(); - if (pipeline) pipeline->apply(*fs, *fs, [this,fs]() { + bool did_pipe = false; + + if (pipeline) did_pipe = pipeline->apply(*fs, *fs, [this,fs]() { SHARED_LOCK(mtx_, lk); std::atomic_store(&latest_.at(fs->frameset()), fs); @@ -222,6 +224,10 @@ Feed::Feed(nlohmann::json &config, ftl::net::Universe*net) : //lk.lock(); + if (!did_pipe) { + LOG(WARNING) << "GUI Pipeline dropped"; + } + return true; });