GreenScreen: remove string_utils dependency

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

Change-Id: I493cc14d55d0519c1e5ea7b4de2ec8065473562b
diff --git a/GreenScreen/CMakeLists.txt b/GreenScreen/CMakeLists.txt
index b19d1fd..2b8af88 100644
--- a/GreenScreen/CMakeLists.txt
+++ b/GreenScreen/CMakeLists.txt
@@ -56,7 +56,6 @@
                ./../lib/accel.cpp
                ./../lib/frameUtils.cpp
                ./../lib/frameFilter.cpp
-               ${DAEMON_SRC}/string_utils.cpp
                )
 
 set(plugin_HDR pluginMediaHandler.h
diff --git a/GreenScreen/ffmpeg/package.json b/GreenScreen/ffmpeg/package.json
index bf8413d..fe7cfe8 100644
--- a/GreenScreen/ffmpeg/package.json
+++ b/GreenScreen/ffmpeg/package.json
@@ -1,6 +1,6 @@
 {
     "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": [
diff --git a/GreenScreen/ffmpeg/rules.mak b/GreenScreen/ffmpeg/rules.mak
index ee69f58..33bdb42 100644
--- a/GreenScreen/ffmpeg/rules.mak
+++ b/GreenScreen/ffmpeg/rules.mak
@@ -1,4 +1,4 @@
-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 @@
 	$(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)
 
diff --git a/GreenScreen/pluginProcessor.cpp b/GreenScreen/pluginProcessor.cpp
index 1337f6f..5a10145 100644
--- a/GreenScreen/pluginProcessor.cpp
+++ b/GreenScreen/pluginProcessor.cpp
@@ -27,9 +27,28 @@
 }
 #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 @@
 
         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