aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmedia
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:37 -0500
committerJacek Antonelli2008-08-15 23:45:37 -0500
commit31ba05810c641f14e8ab5da8ad2aaf527779f6c1 (patch)
treec4b8d635dfb657fa4cfee7c285f8cadbf24afa90 /linden/indra/llmedia
parentSecond Life viewer sources 1.19.1.1 (diff)
downloadmeta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.zip
meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.tar.gz
meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.tar.bz2
meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.tar.xz
Second Life viewer sources 1.19.1.2
Diffstat (limited to '')
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer.cpp4
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer_syms.cpp2
-rw-r--r--linden/indra/llmedia/llmediaimplllmozlib.cpp40
3 files changed, 11 insertions, 35 deletions
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp
index b54d088..8b0363a 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp
@@ -185,11 +185,15 @@ startup ( LLMediaManagerData* init_data )
185 else 185 else
186 WARNMSG("gst_segtrap_set_enabled() is not available; Automated crash-reporter may cease to function until next restart."); 186 WARNMSG("gst_segtrap_set_enabled() is not available; Automated crash-reporter may cease to function until next restart.");
187 187
188 // Protect against GStreamer resetting the locale, yuck.
189 std::string saved_locale = setlocale(LC_ALL, NULL);
188 if (0 == llgst_init_check(NULL, NULL, NULL)) 190 if (0 == llgst_init_check(NULL, NULL, NULL))
189 { 191 {
190 WARNMSG("GST init failed for unspecified reason."); 192 WARNMSG("GST init failed for unspecified reason.");
193 setlocale(LC_ALL, saved_locale.c_str() );
191 return false; 194 return false;
192 } 195 }
196 setlocale(LC_ALL, saved_locale.c_str() );
193 197
194 // Init our custom plugins - only really need do this once. 198 // Init our custom plugins - only really need do this once.
195 gst_slvideo_init_class(); 199 gst_slvideo_init_class();
diff --git a/linden/indra/llmedia/llmediaimplgstreamer_syms.cpp b/linden/indra/llmedia/llmediaimplgstreamer_syms.cpp
index bba3ef5..c5e3c7b 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer_syms.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamer_syms.cpp
@@ -124,7 +124,7 @@ bool grab_gst_syms(std::string gst_dso_name,
124 } 124 }
125 else 125 else
126 { 126 {
127 INFOMSG("Couldn't load DSO: ", gst_dso_name.c_str()); 127 INFOMSG("Couldn't load DSO: %s", gst_dso_name.c_str());
128 rtn = false; // failure 128 rtn = false; // failure
129 } 129 }
130 130
diff --git a/linden/indra/llmedia/llmediaimplllmozlib.cpp b/linden/indra/llmedia/llmediaimplllmozlib.cpp
index 87d9c77..5efaa59 100644
--- a/linden/indra/llmedia/llmediaimplllmozlib.cpp
+++ b/linden/indra/llmedia/llmediaimplllmozlib.cpp
@@ -47,7 +47,10 @@
47 // Linux, MESA headers, but not necessarily assuming MESA runtime. 47 // Linux, MESA headers, but not necessarily assuming MESA runtime.
48 // quotes so we get libraries/.../GL/ version 48 // quotes so we get libraries/.../GL/ version
49 #include "GL/gl.h" 49 #include "GL/gl.h"
50 #include <locale.h> 50#endif
51
52#if LL_LINUX
53 #include <locale.h>
51#endif 54#endif
52 55
53#include <iostream> 56#include <iostream>
@@ -59,7 +62,8 @@ static LLMediaImplRegister sLLMediaImplLLMozLibReg( "LLMediaImplLLMozLib", new L
59// 62//
60LLMediaImplLLMozLibMaker::LLMediaImplLLMozLibMaker() 63LLMediaImplLLMozLibMaker::LLMediaImplLLMozLibMaker()
61{ 64{
62 // Register to handle the scheme 65 // Register to handle the mime category
66 mMimeTypes.push_back( "image/svg+xml" );
63 mMimeTypeCategories.push_back( "text" ); 67 mMimeTypeCategories.push_back( "text" );
64#if !LL_QUICKTIME_ENABLED 68#if !LL_QUICKTIME_ENABLED
65 mMimeTypeCategories.push_back( "image" ); 69 mMimeTypeCategories.push_back( "image" );
@@ -198,17 +202,9 @@ bool LLMediaImplLLMozLib::setCaretColor( unsigned int red, unsigned int green, u
198// virtual 202// virtual
199bool LLMediaImplLLMozLib::navigateTo( const std::string url ) 203bool LLMediaImplLLMozLib::navigateTo( const std::string url )
200{ 204{
201#if LL_LINUX
202 std::string saved_locale = setlocale(LC_ALL, NULL);
203#endif // LL_LINUX
204
205 // pass url to llmozlib 205 // pass url to llmozlib
206 LLMozLib::getInstance()->navigateTo( mWindowId, url ); 206 LLMozLib::getInstance()->navigateTo( mWindowId, url );
207 207
208#if LL_LINUX
209 setlocale(LC_ALL, saved_locale.c_str() );
210#endif // LL_LINUX
211
212 // emit event with size change to kick things off 208 // emit event with size change to kick things off
213 LLMediaEvent event( this ); 209 LLMediaEvent event( this );
214 mEventEmitter.update( &LLMediaObserver::onMediaSizeChange, event ); 210 mEventEmitter.update( &LLMediaObserver::onMediaSizeChange, event );
@@ -264,10 +260,6 @@ bool LLMediaImplLLMozLib::updateState()
264 clearCommand(); 260 clearCommand();
265 }; 261 };
266 262
267#if LL_LINUX
268 std::string saved_locale = setlocale(LC_ALL, NULL);
269#endif // LL_LINUX
270
271 if ( nextCommand() == LLMediaBase::COMMAND_BACK ) 263 if ( nextCommand() == LLMediaBase::COMMAND_BACK )
272 { 264 {
273 setStatus( LLMediaBase::STATUS_STARTED ); 265 setStatus( LLMediaBase::STATUS_STARTED );
@@ -282,10 +274,6 @@ bool LLMediaImplLLMozLib::updateState()
282 clearCommand(); 274 clearCommand();
283 }; 275 };
284 276
285#if LL_LINUX
286 setlocale(LC_ALL, saved_locale.c_str() );
287#endif // LL_LINUX
288
289 return true; 277 return true;
290} 278}
291 279
@@ -382,16 +370,8 @@ bool LLMediaImplLLMozLib::recomputeSizes()
382 new_height = LLMediaManager::textureHeightFromMediaHeight( new_height ); 370 new_height = LLMediaManager::textureHeightFromMediaHeight( new_height );
383 } 371 }
384 372
385#if LL_LINUX
386 std::string saved_locale = setlocale(LC_ALL, NULL);
387#endif // LL_LINUX
388
389 bool status = LLMozLib::getInstance()->setSize( mWindowId, new_width, new_height ); 373 bool status = LLMozLib::getInstance()->setSize( mWindowId, new_width, new_height );
390 374
391#if LL_LINUX
392 setlocale(LC_ALL, saved_locale.c_str() );
393#endif // LL_LINUX
394
395 if (status) 375 if (status)
396 setMediaSize(new_width, new_height); 376 setMediaSize(new_width, new_height);
397 377
@@ -623,20 +603,12 @@ bool LLMediaImplLLMozLib::clearCookies()
623// virtual 603// virtual
624bool LLMediaImplLLMozLib::reset() 604bool LLMediaImplLLMozLib::reset()
625{ 605{
626#if LL_LINUX
627 std::string saved_locale = setlocale(LC_ALL, NULL);
628#endif // LL_LINUX
629
630 LLMozLib::getInstance()->remObserver( mWindowId, this ); 606 LLMozLib::getInstance()->remObserver( mWindowId, this );
631 607
632 LLMozLib::getInstance()->destroyBrowserWindow( mWindowId ); 608 LLMozLib::getInstance()->destroyBrowserWindow( mWindowId );
633 609
634 mWindowId = 0; 610 mWindowId = 0;
635 611
636#if LL_LINUX
637 setlocale(LC_ALL, saved_locale.c_str() );
638#endif // LL_LINUX
639
640 return true; 612 return true;
641} 613}
642 614