From 6b300252187e4856920795ae412d0537f630c518 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 11 Aug 2016 13:23:58 -0700 Subject: [PATCH] Fix GStreamer setup --- src/VideoStreaming/VideoStreaming.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/VideoStreaming/VideoStreaming.cc b/src/VideoStreaming/VideoStreaming.cc index 92bd7e87d..4b45adbc5 100644 --- a/src/VideoStreaming/VideoStreaming.cc +++ b/src/VideoStreaming/VideoStreaming.cc @@ -42,16 +42,12 @@ #endif #if defined(QGC_GST_STREAMING) -#if defined(__macos__) -#ifdef QGC_INSTALL_RELEASE static void qgcputenv(const QString& key, const QString& root, const QString& path) { QString value = root + path; qputenv(key.toStdString().c_str(), QByteArray(value.toStdString().c_str())); } #endif -#endif -#endif void initializeVideoStreaming(int &argc, char* argv[]) { @@ -67,6 +63,9 @@ void initializeVideoStreaming(int &argc, char* argv[]) qgcputenv("GST_PLUGIN_PATH_1_0", currentDir, "/../Frameworks/GStreamer.framework/Versions/Current/lib/gstreamer-1.0"); qgcputenv("GST_PLUGIN_PATH", currentDir, "/../Frameworks/GStreamer.framework/Versions/Current/lib/gstreamer-1.0"); #endif + #elif defined(Q_OS_WIN) + QString currentDir = QCoreApplication::applicationDirPath(); + qgcputenv("GST_PLUGIN_PATH", currentDir, "/gstreamer-plugins"); #endif // Initialize GStreamer GError* error = NULL; -- 2.22.0