diff options
author | Jacek Antonelli | 2009-03-28 18:53:52 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-03-28 19:32:11 -0500 |
commit | 6542894a75f826203cab1ae482fdf5187be09205 (patch) | |
tree | f713cec18c5e9f5c7be30c272f6e485e852339a1 /linden | |
parent | Print out the plugins gstreamer finds, for debugging. (diff) | |
download | meta-impy-6542894a75f826203cab1ae482fdf5187be09205.zip meta-impy-6542894a75f826203cab1ae482fdf5187be09205.tar.gz meta-impy-6542894a75f826203cab1ae482fdf5187be09205.tar.bz2 meta-impy-6542894a75f826203cab1ae482fdf5187be09205.tar.xz |
Moved Windows GST_PLUGIN_PATH setup to LLMediaImplGStreamer.
LLAppViewer::gst_plugin_path -->
LLMediaImplGStreamer::set_gst_plugin_path
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamer.cpp | 27 | ||||
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamer.h | 4 | ||||
-rw-r--r-- | linden/indra/newview/llappviewer.cpp | 26 | ||||
-rw-r--r-- | linden/indra/newview/llappviewer.h | 2 |
4 files changed, 31 insertions, 28 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; |
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.h b/linden/indra/llmedia/llmediaimplgstreamer.h index dec970a..2918416 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.h +++ b/linden/indra/llmedia/llmediaimplgstreamer.h | |||
@@ -66,6 +66,9 @@ class LLMediaImplGStreamer: | |||
66 | static bool startup( LLMediaManagerData* init_data ); | 66 | static bool startup( LLMediaManagerData* init_data ); |
67 | static bool closedown(); | 67 | static bool closedown(); |
68 | 68 | ||
69 | // Sets GST_PLUGIN_PATH env var for GStreamer. | ||
70 | static void set_gst_plugin_path(); | ||
71 | |||
69 | /* virtual */ std::string getVersion(); | 72 | /* virtual */ std::string getVersion(); |
70 | /* virtual */ bool navigateTo( const std::string url ); | 73 | /* virtual */ bool navigateTo( const std::string url ); |
71 | /* virtual */ bool updateMedia(); | 74 | /* virtual */ bool updateMedia(); |
@@ -79,6 +82,7 @@ class LLMediaImplGStreamer: | |||
79 | LLMediaEmitter< LLMediaObserver > getEventEmitter() const {return mEventEmitter;}; | 82 | LLMediaEmitter< LLMediaObserver > getEventEmitter() const {return mEventEmitter;}; |
80 | 83 | ||
81 | private: | 84 | private: |
85 | |||
82 | // misc | 86 | // misc |
83 | bool unload(); | 87 | bool unload(); |
84 | bool pause(); | 88 | bool pause(); |
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 15ce1a3..6d87ca8 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -320,30 +320,6 @@ std::vector<std::string> gLoginURIs; | |||
320 | static std::string gHelperURI; | 320 | static std::string gHelperURI; |
321 | 321 | ||
322 | 322 | ||
323 | void LLAppViewer::gst_plugin_path() | ||
324 | { | ||
325 | #ifdef LL_WINDOWS | ||
326 | char* buffer; | ||
327 | |||
328 | // Get the current working directory: | ||
329 | if((buffer = _getcwd(NULL,0)) == NULL) | ||
330 | { | ||
331 | LL_INFOS("InitInfo") << "_getcwd error" << LL_ENDL; | ||
332 | } | ||
333 | else | ||
334 | { | ||
335 | LL_INFOS("InitInfo") << "Imprudence is installed at " << buffer << LL_ENDL; | ||
336 | |||
337 | std::string plugin_path = "GST_PLUGIN_PATH=" + std::string(buffer) + "\\lib\\gstreamer-plugins"; | ||
338 | |||
339 | // Place GST_PLUGIN_PATH in the environment settings for imprudence.exe | ||
340 | const char* gst_plugin_path = plugin_path.c_str(); | ||
341 | putenv(gst_plugin_path); | ||
342 | LL_INFOS("InitInfo") << "GST_PLUGIN_PATH set to " << getenv("GST_PLUGIN_PATH") << LL_ENDL; | ||
343 | } | ||
344 | #endif //LL_WINDOWS | ||
345 | } | ||
346 | |||
347 | void idle_afk_check() | 323 | void idle_afk_check() |
348 | { | 324 | { |
349 | // check idle timers | 325 | // check idle timers |
@@ -643,8 +619,6 @@ bool LLAppViewer::init() | |||
643 | LL_VERSION_PATCH, | 619 | LL_VERSION_PATCH, |
644 | LL_VERSION_BUILD ); | 620 | LL_VERSION_BUILD ); |
645 | 621 | ||
646 | gst_plugin_path(); | ||
647 | |||
648 | ////////////////////////////////////////////////////////////////////////////// | 622 | ////////////////////////////////////////////////////////////////////////////// |
649 | ////////////////////////////////////////////////////////////////////////////// | 623 | ////////////////////////////////////////////////////////////////////////////// |
650 | ////////////////////////////////////////////////////////////////////////////// | 624 | ////////////////////////////////////////////////////////////////////////////// |
diff --git a/linden/indra/newview/llappviewer.h b/linden/indra/newview/llappviewer.h index 2083a93..58dc835 100644 --- a/linden/indra/newview/llappviewer.h +++ b/linden/indra/newview/llappviewer.h | |||
@@ -138,8 +138,6 @@ public: | |||
138 | 138 | ||
139 | protected: | 139 | protected: |
140 | 140 | ||
141 | void gst_plugin_path(); // Sets GST_PLUGIN_PATH environment variable for GStreamer. | ||
142 | |||
143 | virtual bool initWindow(); // Initialize the viewer's window. | 141 | virtual bool initWindow(); // Initialize the viewer's window. |
144 | virtual bool initLogging(); // Initialize log files, logging system, return false on failure. | 142 | virtual bool initLogging(); // Initialize log files, logging system, return false on failure. |
145 | virtual void initConsole() {}; // Initialize OS level debugging console. | 143 | virtual void initConsole() {}; // Initialize OS level debugging console. |