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/indra/llmedia | |
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/indra/llmedia')
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamer.cpp | 27 | ||||
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamer.h | 4 |
2 files changed, 31 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; |
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(); |