Skip to content
Snippets Groups Projects
Commit 465e42a0 authored by Aline Gondim Santos's avatar Aline Gondim Santos
Browse files

modify mediaHandlerDetails

Change-Id: I07b8ff9e9df44109859bf954dd54acdcfc506ac3
parent ef9f8562
No related branches found
No related tags found
No related merge requests found
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
"key": "modellist", "key": "modellist",
"title": "Model to load", "title": "Model to load",
"summary": "Select the model to use", "summary": "Select the model to use",
"defaultValue": "model_256_Qlatency.tflite", "defaultValue": "frozen_inference_graph.pb",
"entries": ["mv2_DLV3_256_MQ", "mv2_DLV3_256_QLATENCY_16", "mv2_DLV3_256_QLATENCY_8"], "entries": ["frozen_inference_graph", "mv2_DLV3_256_MQ", "mv2_DLV3_256_QLATENCY_16", "mv2_DLV3_256_QLATENCY_8"],
"entryValues": ["mobilenet_v2_deeplab_v3_256_myquant.tflite", "model_256_Qlatency_16.tflite", "model_256_Qlatency.tflite"] "entryValues": ["frozen_inference_graph", "mobilenet_v2_deeplab_v3_256_myquant.tflite", "model_256_Qlatency_16.tflite", "model_256_Qlatency.tflite"]
}, },
{ {
"category" : "ImageBackground", "category" : "ImageBackground",
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"key": "backgroundlist", "key": "backgroundlist",
"title": "Background image", "title": "Background image",
"summary": "Select the image background to use", "summary": "Select the image background to use",
"defaultValue": "background2.png", "defaultValue": "background1.png",
"entries": ["background1", "background2"], "entries": ["background1", "background2"],
"entryValues": ["background1.png", "background2.png"] "entryValues": ["background1.png", "background2.png"]
} }
......
/* /*
* Copyright (C) 2004-2020 Savoir-faire Linux Inc. * Copyright (C) 2020 Savoir-faire Linux Inc.
* *
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com> * Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
* *
...@@ -32,8 +32,6 @@ namespace jami ...@@ -32,8 +32,6 @@ namespace jami
setGlobalPluginParameters(ppm_); setGlobalPluginParameters(ppm_);
setId(datapath_); setId(datapath_);
mVS = std::make_shared<VideoSubscriber>(datapath_); mVS = std::make_shared<VideoSubscriber>(datapath_);
// mpInput = std::make_shared<VideoSubscriber>(datapath_);
// mpReceive = std::make_shared<VideoSubscriber>(datapath_);
} }
void PluginMediaHandler::notifyAVFrameSubject(const StreamData &data, jami::avSubjectPtr subject) void PluginMediaHandler::notifyAVFrameSubject(const StreamData &data, jami::avSubjectPtr subject)
...@@ -43,30 +41,20 @@ namespace jami ...@@ -43,30 +41,20 @@ namespace jami
std::string direction = data.direction ? "Receive" : "Preview"; std::string direction = data.direction ? "Receive" : "Preview";
oss << "NEW SUBJECT: [" << data.id << "," << direction << "]" << std::endl; oss << "NEW SUBJECT: [" << data.id << "," << direction << "]" << std::endl;
bool preferredStreamDirection = false; bool preferredStreamDirection = false;
if (!ppm_.empty() && ppm_.find("streamslist") != ppm_.end()) if (!ppm_.empty() && ppm_.find("streamslist") != ppm_.end())
{ {
Plog::log(Plog::LogPriority::INFO, TAG, "SET PARAMETERS"); Plog::log(Plog::LogPriority::INFO, TAG, "SET PARAMETERS");
// PluginParameters* mPluginParameters = nullptr;
// getGlobalPluginParameters(mPluginParameters);
// Plog::log(Plog::LogPriority::INFO, TAG, "GOT PARAMETERS");
preferredStreamDirection = ppm_.at("streamslist")=="in"?true:false; preferredStreamDirection = ppm_.at("streamslist")=="in"?true:false;
// if(mPluginParameters != nullptr)
// {
// preferredStreamDirection = mPluginParameters->stream=="in"?true:false;
// }
} }
oss << "preferredStreamDirection " << preferredStreamDirection << std::endl; oss << "preferredStreamDirection " << preferredStreamDirection << std::endl;
if (data.type == StreamType::video && !data.direction && data.direction == preferredStreamDirection) if (data.type == StreamType::video && !data.direction && data.direction == preferredStreamDirection)
{ {
subject->attach(mVS.get()); // my image subject->attach(mVS.get()); // my image
// subject->attach(mpInput.get()); // my image
oss << "got my sent image attached" << std::endl; oss << "got my sent image attached" << std::endl;
} else if (data.type == StreamType::video && data.direction && data.direction == preferredStreamDirection) } else if (data.type == StreamType::video && data.direction && data.direction == preferredStreamDirection)
{ {
subject->attach(mVS.get()); // the image i receive from the others on the call subject->attach(mVS.get()); // the image i receive from the others on the call
// subject->attach(mpReceive.get()); // the image i receive from the others on the call
oss << "got my received image attached" << std::endl; oss << "got my received image attached" << std::endl;
} }
Plog::log(Plog::LogPriority::INFO, TAG, oss.str()); Plog::log(Plog::LogPriority::INFO, TAG, oss.str());
...@@ -74,7 +62,13 @@ namespace jami ...@@ -74,7 +62,13 @@ namespace jami
std::map<std::string, std::string> PluginMediaHandler::getCallMediaHandlerDetails() std::map<std::string, std::string> PluginMediaHandler::getCallMediaHandlerDetails()
{ {
return {{"icoPath", datapath_ + sep + "icon.png"}}; std::map<std::string, std::string> mediaHandlerDetails = {};
mediaHandlerDetails["name"] = "Foreground Segmentation";
mediaHandlerDetails["iconPath"] = datapath_ + sep + "icon.png";
mediaHandlerDetails["pluginId"] = id();
return mediaHandlerDetails;
} }
void PluginMediaHandler::setPreferenceAttribute(const std::string &key, const std::string &value) void PluginMediaHandler::setPreferenceAttribute(const std::string &key, const std::string &value)
...@@ -94,8 +88,6 @@ namespace jami ...@@ -94,8 +88,6 @@ namespace jami
void PluginMediaHandler::detach() void PluginMediaHandler::detach()
{ {
mVS->detach(); mVS->detach();
// mpInput->detach();
// mpReceive->detach();
} }
PluginMediaHandler::~PluginMediaHandler() PluginMediaHandler::~PluginMediaHandler()
......
...@@ -44,8 +44,6 @@ namespace jami ...@@ -44,8 +44,6 @@ namespace jami
virtual void setPreferenceAttribute(const std::string& key, const std::string& value) override; virtual void setPreferenceAttribute(const std::string& key, const std::string& value) override;
std::shared_ptr<VideoSubscriber> mVS; std::shared_ptr<VideoSubscriber> mVS;
// std::shared_ptr<VideoSubscriber> mpInput;
// std::shared_ptr<VideoSubscriber> mpReceive;
std::string dataPath() const { return datapath_; } std::string dataPath() const { return datapath_; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment