diff options
-rw-r--r-- | ChangeLog.txt | 9 | ||||
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamer.cpp | 36 | ||||
-rw-r--r-- | linden/indra/newview/llappviewer.cpp | 3 |
3 files changed, 32 insertions, 16 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index bd95bce..476fd5e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -1,3 +1,12 @@ | |||
1 | 2009-03-29 McCabe Maxsted <hakushakukun@gmail.com> | ||
2 | |||
3 | * linden/indra/llmedia/llmediaimplgstreamer.cpp: | ||
4 | Added loading status to the log's plugin list. | ||
5 | set_gst_plugin_path now compiles for windows. | ||
6 | * linden/indra/newview/llappviewer.cpp: | ||
7 | Removed unnecessary headers. | ||
8 | |||
9 | |||
1 | 2009-03-28 Jacek Antonelli <jacek.antonelli@gmail.com> | 10 | 2009-03-28 Jacek Antonelli <jacek.antonelli@gmail.com> |
2 | 11 | ||
3 | * linden/indra/llmedia/llmediaimplgstreamer.cpp: | 12 | * linden/indra/llmedia/llmediaimplgstreamer.cpp: |
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp index debc95c..3c4d0a0 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp | |||
@@ -48,6 +48,8 @@ extern "C" { | |||
48 | 48 | ||
49 | #if LL_WINDOWS | 49 | #if LL_WINDOWS |
50 | #pragma warning(default : 4244) | 50 | #pragma warning(default : 4244) |
51 | #include <direct.h> | ||
52 | #include <stdlib.h> | ||
51 | #endif | 53 | #endif |
52 | 54 | ||
53 | #include "llmediamanager.h" | 55 | #include "llmediamanager.h" |
@@ -196,12 +198,14 @@ bool LLMediaImplGStreamer::startup (LLMediaManagerData* init_data) | |||
196 | LL_DEBUGS("MediaImpl") << "Found GStreamer plugins:" << LL_ENDL; | 198 | LL_DEBUGS("MediaImpl") << "Found GStreamer plugins:" << LL_ENDL; |
197 | GList *list; | 199 | GList *list; |
198 | GstRegistry *registry = gst_registry_get_default(); | 200 | GstRegistry *registry = gst_registry_get_default(); |
201 | std::string loaded = ""; | ||
199 | for (list = gst_registry_get_plugin_list(registry); | 202 | for (list = gst_registry_get_plugin_list(registry); |
200 | list != NULL; | 203 | list != NULL; |
201 | list = g_list_next(list)) | 204 | list = g_list_next(list)) |
202 | { | 205 | { |
203 | GstPlugin *list_plugin = (GstPlugin *)list->data; | 206 | GstPlugin *list_plugin = (GstPlugin *)list->data; |
204 | LL_DEBUGS("MediaImpl") << gst_plugin_get_name(list_plugin) << LL_ENDL; | 207 | (bool)gst_plugin_is_loaded(list_plugin) ? loaded = "Yes" : loaded = "No"; |
208 | LL_DEBUGS("MediaImpl") << gst_plugin_get_name(list_plugin) << ", loaded? " << loaded << LL_ENDL; | ||
205 | } | 209 | } |
206 | gst_plugin_list_free(list); | 210 | gst_plugin_list_free(list); |
207 | 211 | ||
@@ -225,12 +229,12 @@ void LLMediaImplGStreamer::set_gst_plugin_path() | |||
225 | 229 | ||
226 | if(imp_cwd == NULL) | 230 | if(imp_cwd == NULL) |
227 | { | 231 | { |
228 | LL_DEBUGS("LLMediaImpl") << "_getcwd failed, not setting GST_PLUGIN_PATH." | 232 | LL_DEBUGS("MediaImpl") << "_getcwd failed, not setting GST_PLUGIN_PATH." |
229 | << LL_ENDL; | 233 | << LL_ENDL; |
230 | } | 234 | } |
231 | else | 235 | else |
232 | { | 236 | { |
233 | LL_DEBUGS("LLMediaImpl") << "Imprudence is installed at " | 237 | LL_DEBUGS("MediaImpl") << "Imprudence is installed at " |
234 | << imp_cwd << LL_ENDL; | 238 | << imp_cwd << LL_ENDL; |
235 | 239 | ||
236 | // Grab the current path, if it's set. | 240 | // Grab the current path, if it's set. |
@@ -238,28 +242,34 @@ void LLMediaImplGStreamer::set_gst_plugin_path() | |||
238 | char *old_path = getenv("GST_PLUGIN_PATH"); | 242 | char *old_path = getenv("GST_PLUGIN_PATH"); |
239 | if(old_path == NULL) | 243 | if(old_path == NULL) |
240 | { | 244 | { |
241 | LL_DEBUGS("LLMediaImpl") << "Did not find user-set GST_PLUGIN_PATH." | 245 | LL_DEBUGS("MediaImpl") << "Did not find user-set GST_PLUGIN_PATH." |
242 | << LL_ENDL; | 246 | << LL_ENDL; |
243 | } | 247 | } |
244 | else | 248 | else |
245 | { | 249 | { |
246 | old_plugin_path = std::string( old_path ) + ":"; | 250 | old_plugin_path = ";" + std::string( old_path ); |
247 | } | 251 | } |
248 | 252 | ||
249 | 253 | ||
250 | // Search both Imprudence and Imprudence\lib\gstreamer-plugins. | 254 | // Search both Imprudence and Imprudence\lib\gstreamer-plugins. |
251 | // But we also want to first search the path the user has set, if any. | 255 | // If those fail, search the path the user has set, if any. |
252 | std::string plugin_path = | 256 | std::string plugin_path = |
253 | "GST_PLUGIN_PATH=" + | 257 | "GST_PLUGIN_PATH=" + |
254 | old_plugin_path + | 258 | std::string(imp_cwd) + "\\lib\\gstreamer-plugins;" + |
255 | std::string(imp_cwd) + ":" + | 259 | std::string(imp_cwd) + |
256 | std::string(imp_cwd) + "\\lib\\gstreamer-plugins"; | 260 | old_plugin_path; |
257 | 261 | ||
258 | // Place GST_PLUGIN_PATH in the environment settings for imprudence.exe | 262 | // Place GST_PLUGIN_PATH in the environment settings for imprudence.exe |
259 | putenv( (char*)plugin_path.c_str() ); | 263 | // Returns 0 on success |
260 | 264 | if(_putenv( (char*)plugin_path.c_str() )) | |
261 | LL_DEBUGS("LLMediaImpl") << "GST_PLUGIN_PATH set to " | 265 | { |
262 | << getenv("GST_PLUGIN_PATH") << LL_ENDL; | 266 | LL_WARNS("MediaImpl") << "Setting environment variable failed!" << LL_ENDL; |
267 | } | ||
268 | else | ||
269 | { | ||
270 | LL_DEBUGS("MediaImpl") << "GST_PLUGIN_PATH set to " | ||
271 | << getenv("GST_PLUGIN_PATH") << LL_ENDL; | ||
272 | } | ||
263 | } | 273 | } |
264 | 274 | ||
265 | #endif //LL_WINDOWS | 275 | #endif //LL_WINDOWS |
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 6d87ca8..b2bfccf 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -75,9 +75,6 @@ | |||
75 | 75 | ||
76 | #if LL_WINDOWS | 76 | #if LL_WINDOWS |
77 | #include "llwindebug.h" | 77 | #include "llwindebug.h" |
78 | #include <direct.h> | ||
79 | #include <errno.h> | ||
80 | #include <stdlib.h> | ||
81 | #endif | 78 | #endif |
82 | 79 | ||
83 | #if LL_WINDOWS | 80 | #if LL_WINDOWS |