diff --git a/applications/gui2/src/views/thumbnails.cpp b/applications/gui2/src/views/thumbnails.cpp index 99f55a0dbc49bf3e3bed272b3088665d82368cf8..c382f8d0b1625bf06a16e7bb4387e4cf65f9aa0c 100644 --- a/applications/gui2/src/views/thumbnails.cpp +++ b/applications/gui2/src/views/thumbnails.cpp @@ -140,6 +140,8 @@ void Thumbnails::updateThumbnails() { int source = thumbs.thumbnails.size(); auto &frame = fs->frames[source]; + perform_layout = true; + std::string name = "No Name"; if (frame.has(Channel::MetaData)) { const auto &meta = frame.get<std::map<std::string,std::string>>(Channel::MetaData); diff --git a/components/control/cpp/src/master.cpp b/components/control/cpp/src/master.cpp index c0677c03d5ab597464b5fb412944abb24183e379..159fc403bca1d26f76a9a94afb77d8daa11d5184 100644 --- a/components/control/cpp/src/master.cpp +++ b/components/control/cpp/src/master.cpp @@ -82,6 +82,8 @@ Master::Master(Configurable *root, Universe *net) ftl::UUID peer = p->id(); auto cs = getConfigurables(peer); for (auto c : cs) { + if (ftl::config::find(c) != nullptr) continue; + //LOG(INFO) << "NET CONFIG: " << c; ftl::config::json_t *configuration = new ftl::config::json_t; *configuration = getConfigurable(peer, c); diff --git a/components/streams/include/ftl/streams/feed.hpp b/components/streams/include/ftl/streams/feed.hpp index 9054831c20e25fd5653f0dcd76b1eb8602a7b596..95642070546cdd185565055df87cf8d2518d42cf 100644 --- a/components/streams/include/ftl/streams/feed.hpp +++ b/components/streams/include/ftl/streams/feed.hpp @@ -105,6 +105,7 @@ private: std::vector<std::string> netcams_; ftl::Handler<uint32_t> new_sources_cb_; + ftl::Handler<uint32_t> add_src_cb_; ftl::Handler<uint32_t> remove_sources_cb_; std::vector<Filter*> filters_; @@ -177,6 +178,8 @@ public: inline ftl::Handle onNewSources(const std::function<bool(uint32_t)> &cb) { return new_sources_cb_.on(cb); } + inline ftl::Handle onAdd(const std::function<bool(uint32_t)> &cb) { return add_src_cb_.on(cb); } + inline ftl::Handle onRemoveSources(const std::function<bool(uint32_t)> &cb) { return remove_sources_cb_.on(cb); } cv::Mat getThumbnail(const std::string &uri); diff --git a/components/streams/src/feed.cpp b/components/streams/src/feed.cpp index 5f0422565272a46aaae961966f9552188795ea61..c4b174cdef42329a20f63bd7cf2a31604f258b6f 100644 --- a/components/streams/src/feed.cpp +++ b/components/streams/src/feed.cpp @@ -634,6 +634,8 @@ uint32_t Feed::add(const std::string &path) { // ftl::URI instead of std::string as argument. Note the bug above. // TODO: write unit test for uri parsing add(fsid, uri.getBaseURI(), fstream); + + add_src_cb_.trigger(fsid); return fsid; } else if (scheme == ftl::URI::SCHEME_DEVICE) { @@ -680,6 +682,7 @@ uint32_t Feed::add(const std::string &path) { creator->start(); } + add_src_cb_.trigger(fsid); return fsid; } @@ -710,6 +713,9 @@ uint32_t Feed::add(const std::string &path) { LOG(INFO) << "Add Stream: " << stream->value("uri", std::string("NONE")) << " (" << fsid << ")"; + + add_src_cb_.trigger(fsid); + return fsid; } else{ throw ftl::exception("bad uri");