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

Resolve thumb refresh issue

parent 58571ec4
Branches
No related tags found
1 merge request!316Resolves #343 GUI and Frame Refactor
Pipeline #28436 passed
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment