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

GreenScreen: remove string_utils dependency

After inclusion of fmt/core.h The GreenScreen plugin was
failing to compile.

Change-Id: I493cc14d55d0519c1e5ea7b4de2ec8065473562b
parent bd29ac65
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,6 @@ set(plugin_SRC main.cpp
./../lib/accel.cpp
./../lib/frameUtils.cpp
./../lib/frameFilter.cpp
${DAEMON_SRC}/string_utils.cpp
)
set(plugin_HDR pluginMediaHandler.h
......
{
"name": "ffmpeg",
"version": "n4.4",
"version": "n4.4.2",
"url": "https://github.com/FFmpeg/FFmpeg/archive/__VERSION__.tar.gz",
"deps": [
"zlib",
......@@ -13,7 +13,7 @@
"patches": [
"change-RTCP-ratio.patch",
"rtp_ext_abs_send_time.patch",
"libopusenc-enable-FEC.patch",
"libopusenc-reload-packet-loss-at-encode.patch",
"libopusdec-enable-FEC.patch"
],
"win_patches": [
......
FFMPEG_HASH := n4.4
FFMPEG_HASH := n4.4.2
FFMPEG_URL := https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/$(FFMPEG_HASH).tar.gz
PKGS+=ffmpeg
......@@ -339,7 +339,9 @@ ffmpeg: ffmpeg-$(FFMPEG_HASH).tar.gz
$(APPLY) $(SRC)/ffmpeg/change-RTCP-ratio.patch
$(APPLY) $(SRC)/ffmpeg/rtp_ext_abs_send_time.patch
$(APPLY) $(SRC)/ffmpeg/libopusdec-enable-FEC.patch
$(APPLY) $(SRC)/ffmpeg/libopusenc-enable-FEC.patch
$(APPLY) $(SRC)/ffmpeg/libopusenc-reload-packet-loss-at-encode.patch
$(APPLY) $(SRC)/ffmpeg/ios-disable-b-frames.patch
$(APPLY) $(SRC)/ffmpeg/screen-sharing-x11-fix.patch
$(UPDATE_AUTOCONFIG)
$(MOVE)
......
......@@ -27,9 +27,28 @@ extern "C" {
}
#include <frameUtils.h>
#include <pluglog.h>
#ifdef WIN32
#include <string_utils.h>
#include <WTypes.h>
namespace string_utils {
std::wstring
to_wstring(const std::string& str) {
int codePage = CP_UTF8;
int srcLength = (int) str.length();
int requiredSize = MultiByteToWideChar(codePage, 0, str.c_str(), srcLength, nullptr, 0);
if (!requiredSize) {
throw std::runtime_error("Can't convert string to wstring");
}
std::wstring result((size_t) requiredSize, 0);
if (!MultiByteToWideChar(codePage, 0, str.c_str(), srcLength, &(*result.begin()), requiredSize)) {
throw std::runtime_error("Can't convert string to wstring");
}
return result;
}
} // namespace string_utils
#endif
const char sep = separator();
const std::string TAG = "FORESEG";
......@@ -77,7 +96,7 @@ PluginProcessor::initModel(const std::string& modelPath, bool activateAcc)
sessOpt_.SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_ALL);
#ifdef WIN32
session_ = new Ort::Session(env_, to_wstring(modelPath).c_str(), sessOpt_);
session_ = new Ort::Session(env_, string_utils::to_wstring(modelPath).c_str(), sessOpt_);
#else
session_ = new Ort::Session(env_, modelPath.c_str(), sessOpt_);
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment