diff options
Diffstat (limited to 'linden/indra/llmedia/llmediaimplgstreamer.cpp')
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamer.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp index d661f74..ed7b36e 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp | |||
@@ -164,6 +164,8 @@ bool LLMediaImplGStreamer::startup (LLMediaManagerData* init_data) | |||
164 | // Init the glib type system - we need it. | 164 | // Init the glib type system - we need it. |
165 | g_type_init(); | 165 | g_type_init(); |
166 | 166 | ||
167 | set_gst_plugin_path(); | ||
168 | |||
167 | // Protect against GStreamer resetting the locale, yuck. | 169 | // Protect against GStreamer resetting the locale, yuck. |
168 | static std::string saved_locale; | 170 | static std::string saved_locale; |
169 | saved_locale = setlocale(LC_ALL, NULL); | 171 | saved_locale = setlocale(LC_ALL, NULL); |
@@ -199,6 +201,31 @@ bool LLMediaImplGStreamer::startup (LLMediaManagerData* init_data) | |||
199 | } | 201 | } |
200 | 202 | ||
201 | 203 | ||
204 | void LLMediaImplGStreamer::set_gst_plugin_path() | ||
205 | { | ||
206 | #ifdef LL_WINDOWS | ||
207 | char* buffer; | ||
208 | |||
209 | // Get the current working directory: | ||
210 | if((buffer = _getcwd(NULL,0)) == NULL) | ||
211 | { | ||
212 | LL_INFOS("InitInfo") << "_getcwd error" << LL_ENDL; | ||
213 | } | ||
214 | else | ||
215 | { | ||
216 | LL_INFOS("InitInfo") << "Imprudence is installed at " << buffer << LL_ENDL; | ||
217 | |||
218 | std::string plugin_path = "GST_PLUGIN_PATH=" + std::string(buffer) + "\\lib\\gstreamer-plugins"; | ||
219 | |||
220 | // Place GST_PLUGIN_PATH in the environment settings for imprudence.exe | ||
221 | const char* gst_plugin_path = plugin_path.c_str(); | ||
222 | putenv(gst_plugin_path); | ||
223 | LL_INFOS("InitInfo") << "GST_PLUGIN_PATH set to " << getenv("GST_PLUGIN_PATH") << LL_ENDL; | ||
224 | } | ||
225 | #endif //LL_WINDOWS | ||
226 | } | ||
227 | |||
228 | |||
202 | bool LLMediaImplGStreamer::closedown() | 229 | bool LLMediaImplGStreamer::closedown() |
203 | { | 230 | { |
204 | return true; | 231 | return true; |