diff options
Diffstat (limited to 'linden/indra/llmedia/llmediamanager.cpp')
-rw-r--r-- | linden/indra/llmedia/llmediamanager.cpp | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/linden/indra/llmedia/llmediamanager.cpp b/linden/indra/llmedia/llmediamanager.cpp index 6db8dbe..59dc8a0 100644 --- a/linden/indra/llmedia/llmediamanager.cpp +++ b/linden/indra/llmedia/llmediamanager.cpp | |||
@@ -30,16 +30,29 @@ | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include "llmediamanager.h" | 32 | #include "llmediamanager.h" |
33 | |||
34 | #if LL_WINDOWS | ||
35 | // GStreamer 0.10.22 - gstutils.h - conversion from 'guint64' to 'guint8'. | ||
36 | // This was an intentional change to make GStreamer more threadsafe, and | ||
37 | // is okay. Delete this bit if GStreamer ever gets more VS-friendly -- McCabe | ||
38 | #pragma warning(disable : 4244) | ||
39 | #endif | ||
40 | #include "llmediaimplgstreamer.h" | ||
41 | #if LL_WINDOWS | ||
42 | #pragma warning(default : 4244) | ||
43 | #endif | ||
44 | |||
33 | #include "llmediaimplfactory.h" | 45 | #include "llmediaimplfactory.h" |
34 | 46 | ||
35 | #include "llmediaimplexample1.h" | 47 | #include "llmediaimplexample1.h" |
36 | #include "llmediaimplexample2.h" | 48 | #include "llmediaimplexample2.h" |
37 | #include "llmediaimplquicktime.h" | 49 | #include "llmediaimplquicktime.h" |
38 | #include "llmediaimplgstreamer.h" | 50 | |
39 | #if LL_LLMOZLIB_ENABLED | 51 | #if LL_LLMOZLIB_ENABLED |
40 | # include "llmediaimplllmozlib.h" | 52 | # include "llmediaimplllmozlib.h" |
41 | #endif | 53 | #endif |
42 | 54 | ||
55 | #include "llerror.h" | ||
43 | LLMediaManager* LLMediaManager::sInstance = 0; | 56 | LLMediaManager* LLMediaManager::sInstance = 0; |
44 | 57 | ||
45 | 58 | ||
@@ -75,6 +88,7 @@ void LLMediaManager::initClass( LLMediaManagerData* init_data ) | |||
75 | if ( ! sInstance ) | 88 | if ( ! sInstance ) |
76 | sInstance = new LLMediaManager(); | 89 | sInstance = new LLMediaManager(); |
77 | 90 | ||
91 | LL_DEBUGS("MediaManager") << "LLMediaManager::initClass" << LL_ENDL; | ||
78 | // Initialize impl classes here - this breaks the encapsulation model | 92 | // Initialize impl classes here - this breaks the encapsulation model |
79 | // but some of the initialization takes a long time and we only want to | 93 | // but some of the initialization takes a long time and we only want to |
80 | // do it once at app startup before any of the impls have been created | 94 | // do it once at app startup before any of the impls have been created |
@@ -84,12 +98,14 @@ void LLMediaManager::initClass( LLMediaManagerData* init_data ) | |||
84 | LLMediaImplExample2::startup( init_data ); | 98 | LLMediaImplExample2::startup( init_data ); |
85 | 99 | ||
86 | #if LL_QUICKTIME_ENABLED | 100 | #if LL_QUICKTIME_ENABLED |
101 | LL_DEBUGS("MediaManager") << "LLMediaManager::initClass: starting quicktime." << LL_ENDL; | ||
87 | LLMediaImplQuickTime::startup( init_data ); | 102 | LLMediaImplQuickTime::startup( init_data ); |
88 | #endif // LL_QUICKTIME_ENABLED | 103 | #endif // LL_QUICKTIME_ENABLED |
89 | 104 | ||
90 | #if LL_GSTREAMER_ENABLED | 105 | ///#if LL_GSTREAMER_ENABLED |
106 | LL_DEBUGS("MediaManager") << "LLMediaManager::initClass: starting gstreamer" << LL_ENDL; | ||
91 | LLMediaImplGStreamer::startup( init_data ); | 107 | LLMediaImplGStreamer::startup( init_data ); |
92 | #endif // LL_GSTREAMER_ENABLED | 108 | ///#endif // LL_GSTREAMER_ENABLED |
93 | } | 109 | } |
94 | 110 | ||
95 | //////////////////////////////////////////////////////////////////////////////// | 111 | //////////////////////////////////////////////////////////////////////////////// |
@@ -129,9 +145,9 @@ void LLMediaManager::cleanupClass() | |||
129 | LLMediaImplQuickTime::closedown(); | 145 | LLMediaImplQuickTime::closedown(); |
130 | #endif // LL_QUICKTIME_ENABLED | 146 | #endif // LL_QUICKTIME_ENABLED |
131 | 147 | ||
132 | #if LL_GSTREAMER_ENABLED | 148 | ///#if LL_GSTREAMER_ENABLED |
133 | LLMediaImplGStreamer::closedown(); | 149 | LLMediaImplGStreamer::closedown(); |
134 | #endif // LL_QUICKTIME_ENABLED | 150 | ///#endif // LL_QUICKTIME_ENABLED |
135 | 151 | ||
136 | if ( sInstance ) | 152 | if ( sInstance ) |
137 | delete sInstance; | 153 | delete sInstance; |
@@ -150,8 +166,10 @@ LLMediaManager* LLMediaManager::getInstance() | |||
150 | // (static) | 166 | // (static) |
151 | void LLMediaManager::setBrowserUserAgent(std::string user_agent) | 167 | void LLMediaManager::setBrowserUserAgent(std::string user_agent) |
152 | { | 168 | { |
169 | #if LL_LLMOZLIB_ENABLED | ||
153 | // *HACK: Breaks encapsulation model, as initClass does above. JC | 170 | // *HACK: Breaks encapsulation model, as initClass does above. JC |
154 | LLMediaImplLLMozLib::setBrowserUserAgent(user_agent); | 171 | LLMediaImplLLMozLib::setBrowserUserAgent(user_agent); |
172 | #endif | ||
155 | } | 173 | } |
156 | 174 | ||
157 | //////////////////////////////////////////////////////////////////////////////// | 175 | //////////////////////////////////////////////////////////////////////////////// |