From 4be47b569f55543434088a746d15b6dd819e1ad5 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 23 Jan 2009 04:23:11 -0700 Subject: Windows version sets its own gstreamer environment variable --- ChangeLog.txt | 8 ++++++++ linden/indra/newview/llappviewer.cpp | 33 +++++++++++++++++++++++++++++++++ linden/indra/newview/llappviewer.h | 4 +++- 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 1ee8548..18d743c 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -2,6 +2,14 @@ =- 1.1.0 -= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +2009-01-22 McCabe Maxsted + + * linden/indra/newview/llappviewer.cpp: + Windows version sets its own gstreamer environment variable. + * linden/indra/newview/llappviewer.h: + Ditto. + + 2009-01-21 McCabe Maxsted * linden/indra/newview/skins/default/xui/en-us/alerts.xml: diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 9e68078..4bb235e 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -75,6 +75,9 @@ #if LL_WINDOWS #include "llwindebug.h" + #include + #include + #include #endif #if LL_WINDOWS @@ -316,6 +319,34 @@ std::string gLoginPage; std::vector gLoginURIs; static std::string gHelperURI; + +void LLAppViewer::gst_plugin_path() +{ +#ifdef LL_WINDOWS + char* buffer; + + // Get the current working directory: + if((buffer = _getcwd(NULL,0)) == NULL) + { + LL_INFOS("InitInfo") << "_getcwd error" << LL_ENDL; + } + else + { + LL_INFOS("InitInfo") << "Imprudence is installed at " << buffer << LL_ENDL; + + char plugin_path[255]; + strcpy (plugin_path,"GST_PLUGIN_PATH="); + strcat (plugin_path,buffer); + strcat (plugin_path,"\\lib"); + + // Place GST_PLUGIN_PATH in the environment settings for imprudence.exe + putenv(plugin_path); + + LL_INFOS("InitInfo") << "GST_PLUGIN_PATH set to " << getenv("GST_PLUGIN_PATH") << LL_ENDL; + } +#endif //LL_WINDOWS +} + void idle_afk_check() { // check idle timers @@ -615,6 +646,8 @@ bool LLAppViewer::init() LL_VERSION_PATCH, LL_VERSION_BUILD ); + gst_plugin_path(); + ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// diff --git a/linden/indra/newview/llappviewer.h b/linden/indra/newview/llappviewer.h index 801deb1..2083a93 100644 --- a/linden/indra/newview/llappviewer.h +++ b/linden/indra/newview/llappviewer.h @@ -137,6 +137,9 @@ public: void pingMainloopTimeout(const std::string& state, F32 secs = -1.0f); protected: + + void gst_plugin_path(); // Sets GST_PLUGIN_PATH environment variable for GStreamer. + virtual bool initWindow(); // Initialize the viewer's window. virtual bool initLogging(); // Initialize log files, logging system, return false on failure. virtual void initConsole() {}; // Initialize OS level debugging console. @@ -147,7 +150,6 @@ protected: virtual std::string generateSerialNumber() = 0; // Platforms specific classes generate this. - private: bool initThreads(); // Initialize viewer threads, return false on failure. -- cgit v1.1