diff options
author | Anders Arnholm | 2008-12-19 10:12:25 +0100 |
---|---|---|
committer | Anders Arnholm | 2008-12-19 10:12:25 +0100 |
commit | 324dfa1561efba6492b72ad4d9306e69b9124776 (patch) | |
tree | ec203e765d20e7e042bbb042cd520f00b3185f43 /linden/indra | |
parent | Make openal-1 version info (diff) | |
download | meta-impy-324dfa1561efba6492b72ad4d9306e69b9124776.zip meta-impy-324dfa1561efba6492b72ad4d9306e69b9124776.tar.gz meta-impy-324dfa1561efba6492b72ad4d9306e69b9124776.tar.bz2 meta-impy-324dfa1561efba6492b72ad4d9306e69b9124776.tar.xz |
Clean up logging to used standard LL metods.
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llaudio/audioengine.cpp | 56 | ||||
-rw-r--r-- | linden/indra/llaudio/audioengine_openal.cpp | 74 | ||||
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamer.cpp | 119 | ||||
-rw-r--r-- | linden/indra/llmedia/llmediaimplgstreamer.h | 2 | ||||
-rw-r--r-- | linden/indra/llmedia/llmediamanager.cpp | 4 | ||||
-rw-r--r-- | linden/indra/newview/app_settings/logcontrol.xml | 7 |
6 files changed, 148 insertions, 114 deletions
diff --git a/linden/indra/llaudio/audioengine.cpp b/linden/indra/llaudio/audioengine.cpp index 239981b..da9bcba 100644 --- a/linden/indra/llaudio/audioengine.cpp +++ b/linden/indra/llaudio/audioengine.cpp | |||
@@ -116,7 +116,7 @@ bool LLAudioEngine::init(const S32 num_channels, void* userdata) | |||
116 | // Initialize the decode manager | 116 | // Initialize the decode manager |
117 | gAudioDecodeMgrp = new LLAudioDecodeMgr; | 117 | gAudioDecodeMgrp = new LLAudioDecodeMgr; |
118 | 118 | ||
119 | llinfos << "LLAudioEngine::init() AudioEngine successfully initialized" << llendl; | 119 | LL_INFOS("AudioEngine") << "LLAudioEngine::init() AudioEngine successfully initialized" << llendl; |
120 | 120 | ||
121 | return true; | 121 | return true; |
122 | } | 122 | } |
@@ -171,7 +171,7 @@ void LLAudioEngine::shutdown() | |||
171 | // virtual | 171 | // virtual |
172 | void LLAudioEngine::startInternetStream(const std::string& url) | 172 | void LLAudioEngine::startInternetStream(const std::string& url) |
173 | { | 173 | { |
174 | llinfos << "entered startInternetStream()" << llendl; | 174 | LL_INFOS("AudioEngine") << "entered startInternetStream()" << llendl; |
175 | 175 | ||
176 | if (!mInternetStreamMedia) | 176 | if (!mInternetStreamMedia) |
177 | { | 177 | { |
@@ -179,7 +179,7 @@ void LLAudioEngine::startInternetStream(const std::string& url) | |||
179 | if (mgr) | 179 | if (mgr) |
180 | { | 180 | { |
181 | mInternetStreamMedia = mgr->createSourceFromMimeType(LLURI(url).scheme(), "audio/mpeg"); // assumes that whatever media implementation supports mp3 also supports vorbis. | 181 | mInternetStreamMedia = mgr->createSourceFromMimeType(LLURI(url).scheme(), "audio/mpeg"); // assumes that whatever media implementation supports mp3 also supports vorbis. |
182 | llinfos << "mInternetStreamMedia is now " << mInternetStreamMedia << llendl; | 182 | LL_INFOS("AudioEngine") << "mInternetStreamMedia is now " << mInternetStreamMedia << llendl; |
183 | } | 183 | } |
184 | } | 184 | } |
185 | 185 | ||
@@ -187,14 +187,14 @@ void LLAudioEngine::startInternetStream(const std::string& url) | |||
187 | return; | 187 | return; |
188 | 188 | ||
189 | if (!url.empty()) { | 189 | if (!url.empty()) { |
190 | llinfos << "Starting internet stream: " << url << llendl; | 190 | LL_INFOS("AudioEngine") << "Starting internet stream: " << url << llendl; |
191 | mInternetStreamURL = url; | 191 | mInternetStreamURL = url; |
192 | mInternetStreamMedia->navigateTo ( url ); | 192 | mInternetStreamMedia->navigateTo ( url ); |
193 | llinfos << "Playing....." << llendl; | 193 | LL_INFOS("AudioEngine") << "Playing....." << llendl; |
194 | mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_START); | 194 | mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_START); |
195 | mInternetStreamMedia->updateMedia(); | 195 | mInternetStreamMedia->updateMedia(); |
196 | } else { | 196 | } else { |
197 | llinfos << "setting stream to NULL"<< llendl; | 197 | LL_INFOS("AudioEngine") << "setting stream to NULL"<< llendl; |
198 | mInternetStreamURL.clear(); | 198 | mInternetStreamURL.clear(); |
199 | mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_STOP); | 199 | mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_STOP); |
200 | mInternetStreamMedia->updateMedia(); | 200 | mInternetStreamMedia->updateMedia(); |
@@ -205,12 +205,12 @@ void LLAudioEngine::startInternetStream(const std::string& url) | |||
205 | // virtual | 205 | // virtual |
206 | void LLAudioEngine::stopInternetStream() | 206 | void LLAudioEngine::stopInternetStream() |
207 | { | 207 | { |
208 | llinfos << "entered stopInternetStream()" << llendl; | 208 | LL_INFOS("AudioEngine") << "entered stopInternetStream()" << llendl; |
209 | 209 | ||
210 | if(mInternetStreamMedia) | 210 | if(mInternetStreamMedia) |
211 | { | 211 | { |
212 | if( ! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_STOP)){ | 212 | if( ! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_STOP)){ |
213 | llinfos << "attempting to stop stream failed!" << llendl; | 213 | LL_INFOS("AudioEngine") << "attempting to stop stream failed!" << llendl; |
214 | } | 214 | } |
215 | mInternetStreamMedia->updateMedia(); | 215 | mInternetStreamMedia->updateMedia(); |
216 | } | 216 | } |
@@ -221,7 +221,7 @@ void LLAudioEngine::stopInternetStream() | |||
221 | // virtual | 221 | // virtual |
222 | void LLAudioEngine::pauseInternetStream(int pause) | 222 | void LLAudioEngine::pauseInternetStream(int pause) |
223 | { | 223 | { |
224 | llinfos << "entered pauseInternetStream()" << llendl; | 224 | LL_INFOS("AudioEngine") << "entered pauseInternetStream()" << llendl; |
225 | 225 | ||
226 | if(!mInternetStreamMedia) | 226 | if(!mInternetStreamMedia) |
227 | return; | 227 | return; |
@@ -230,12 +230,12 @@ void LLAudioEngine::pauseInternetStream(int pause) | |||
230 | { | 230 | { |
231 | if(! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_PAUSE)) | 231 | if(! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_PAUSE)) |
232 | { | 232 | { |
233 | llinfos << "attempting to pause stream failed!" << llendl; | 233 | LL_INFOS("AudioEngine") << "attempting to pause stream failed!" << llendl; |
234 | } | 234 | } |
235 | } else { | 235 | } else { |
236 | if(! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_START)) | 236 | if(! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_START)) |
237 | { | 237 | { |
238 | llinfos << "attempting to unpause stream failed!" << llendl; | 238 | LL_INFOS("AudioEngine") << "attempting to unpause stream failed!" << llendl; |
239 | } | 239 | } |
240 | } | 240 | } |
241 | mInternetStreamMedia->updateMedia(); | 241 | mInternetStreamMedia->updateMedia(); |
@@ -386,7 +386,7 @@ void LLAudioEngine::idle(F32 max_decode_time) | |||
386 | LLAudioChannel *channelp = getFreeChannel(max_priority); | 386 | LLAudioChannel *channelp = getFreeChannel(max_priority); |
387 | if (channelp) | 387 | if (channelp) |
388 | { | 388 | { |
389 | //llinfos << "Replacing source in channel due to priority!" << llendl; | 389 | //LL_INFOS("AudioEngine") << "Replacing source in channel due to priority!" << llendl; |
390 | max_sourcep->setChannel(channelp); | 390 | max_sourcep->setChannel(channelp); |
391 | channelp->setSource(max_sourcep); | 391 | channelp->setSource(max_sourcep); |
392 | if (max_sourcep->isSyncSlave()) | 392 | if (max_sourcep->isSyncSlave()) |
@@ -553,7 +553,7 @@ void LLAudioEngine::idle(F32 max_decode_time) | |||
553 | { | 553 | { |
554 | if (!mBuffers[i]->mInUse && mBuffers[i]->mLastUseTimer.getElapsedTimeF32() > 30.f) | 554 | if (!mBuffers[i]->mInUse && mBuffers[i]->mLastUseTimer.getElapsedTimeF32() > 30.f) |
555 | { | 555 | { |
556 | //llinfos << "Flushing unused buffer!" << llendl; | 556 | //LL_INFOS("AudioEngine") << "Flushing unused buffer!" << llendl; |
557 | mBuffers[i]->mAudioDatap->mBufferp = NULL; | 557 | mBuffers[i]->mAudioDatap->mBufferp = NULL; |
558 | delete mBuffers[i]; | 558 | delete mBuffers[i]; |
559 | mBuffers[i] = NULL; | 559 | mBuffers[i] = NULL; |
@@ -666,8 +666,8 @@ LLAudioBuffer *LLAudioEngine::getFreeBuffer() | |||
666 | 666 | ||
667 | if (buffer_id >= 0) | 667 | if (buffer_id >= 0) |
668 | { | 668 | { |
669 | llinfos << "Taking over unused buffer " << buffer_id << llendl; | 669 | LL_INFOS("AudioEngine") << "Taking over unused buffer " << buffer_id << llendl; |
670 | //llinfos << "Flushing unused buffer!" << llendl; | 670 | //LL_INFOS("AudioEngine") << "Flushing unused buffer!" << llendl; |
671 | mBuffers[buffer_id]->mAudioDatap->mBufferp = NULL; | 671 | mBuffers[buffer_id]->mAudioDatap->mBufferp = NULL; |
672 | delete mBuffers[buffer_id]; | 672 | delete mBuffers[buffer_id]; |
673 | mBuffers[buffer_id] = createBuffer(); | 673 | mBuffers[buffer_id] = createBuffer(); |
@@ -879,7 +879,7 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i | |||
879 | const S32 type, const LLVector3d &pos_global) | 879 | const S32 type, const LLVector3d &pos_global) |
880 | { | 880 | { |
881 | // Create a new source (since this can't be associated with an existing source. | 881 | // Create a new source (since this can't be associated with an existing source. |
882 | //llinfos << "Localized: " << audio_uuid << llendl; | 882 | //LL_INFOS("AudioEngine") << "Localized: " << audio_uuid << llendl; |
883 | 883 | ||
884 | if (mMuted) | 884 | if (mMuted) |
885 | { | 885 | { |
@@ -1101,10 +1101,10 @@ bool LLAudioEngine::hasLocalFile(const LLUUID &uuid) | |||
1101 | 1101 | ||
1102 | void LLAudioEngine::startNextTransfer() | 1102 | void LLAudioEngine::startNextTransfer() |
1103 | { | 1103 | { |
1104 | //llinfos << "LLAudioEngine::startNextTransfer()" << llendl; | 1104 | //LL_INFOS("AudioEngine") << "LLAudioEngine::startNextTransfer()" << llendl; |
1105 | if (mCurrentTransfer.notNull() || getMuted()) | 1105 | if (mCurrentTransfer.notNull() || getMuted()) |
1106 | { | 1106 | { |
1107 | //llinfos << "Transfer in progress, aborting" << llendl; | 1107 | //LL_INFOS("AudioEngine") << "Transfer in progress, aborting" << llendl; |
1108 | return; | 1108 | return; |
1109 | } | 1109 | } |
1110 | 1110 | ||
@@ -1285,7 +1285,7 @@ void LLAudioEngine::startNextTransfer() | |||
1285 | 1285 | ||
1286 | if (asset_id.notNull()) | 1286 | if (asset_id.notNull()) |
1287 | { | 1287 | { |
1288 | llinfos << "Getting asset data for: " << asset_id << llendl; | 1288 | LL_INFOS("AudioEngine") << "Getting asset data for: " << asset_id << llendl; |
1289 | gAudiop->mCurrentTransfer = asset_id; | 1289 | gAudiop->mCurrentTransfer = asset_id; |
1290 | gAudiop->mCurrentTransferTimer.reset(); | 1290 | gAudiop->mCurrentTransferTimer.reset(); |
1291 | gAssetStorage->getAssetData(asset_id, LLAssetType::AT_SOUND, | 1291 | gAssetStorage->getAssetData(asset_id, LLAssetType::AT_SOUND, |
@@ -1293,7 +1293,7 @@ void LLAudioEngine::startNextTransfer() | |||
1293 | } | 1293 | } |
1294 | else | 1294 | else |
1295 | { | 1295 | { |
1296 | //llinfos << "No pending transfers?" << llendl; | 1296 | //LL_INFOS("AudioEngine") << "No pending transfers?" << llendl; |
1297 | } | 1297 | } |
1298 | } | 1298 | } |
1299 | 1299 | ||
@@ -1303,7 +1303,7 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E | |||
1303 | { | 1303 | { |
1304 | if (result_code) | 1304 | if (result_code) |
1305 | { | 1305 | { |
1306 | llinfos << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << llendl; | 1306 | LL_INFOS("AudioEngine") << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << llendl; |
1307 | // Need to mark data as bad to avoid constant rerequests. | 1307 | // Need to mark data as bad to avoid constant rerequests. |
1308 | LLAudioData *adp = gAudiop->getAudioData(uuid); | 1308 | LLAudioData *adp = gAudiop->getAudioData(uuid); |
1309 | if (adp) | 1309 | if (adp) |
@@ -1524,7 +1524,7 @@ bool LLAudioSource::isDone() | |||
1524 | { | 1524 | { |
1525 | // We don't have a channel assigned, and it's been | 1525 | // We don't have a channel assigned, and it's been |
1526 | // over 5 seconds since we tried to play it. Don't bother. | 1526 | // over 5 seconds since we tried to play it. Don't bother. |
1527 | //llinfos << "No channel assigned, source is done" << llendl; | 1527 | //LL_INFOS("AudioEngine") << "No channel assigned, source is done" << llendl; |
1528 | return true; | 1528 | return true; |
1529 | } | 1529 | } |
1530 | else | 1530 | else |
@@ -1684,7 +1684,7 @@ LLAudioChannel::LLAudioChannel() : | |||
1684 | LLAudioChannel::~LLAudioChannel() | 1684 | LLAudioChannel::~LLAudioChannel() |
1685 | { | 1685 | { |
1686 | // Need to disconnect any sources which are using this channel. | 1686 | // Need to disconnect any sources which are using this channel. |
1687 | //llinfos << "Cleaning up audio channel" << llendl; | 1687 | //LL_INFOS("AudioEngine") << "Cleaning up audio channel" << llendl; |
1688 | if (mCurrentSourcep) | 1688 | if (mCurrentSourcep) |
1689 | { | 1689 | { |
1690 | mCurrentSourcep->setChannel(NULL); | 1690 | mCurrentSourcep->setChannel(NULL); |
@@ -1695,12 +1695,12 @@ LLAudioChannel::~LLAudioChannel() | |||
1695 | 1695 | ||
1696 | void LLAudioChannel::setSource(LLAudioSource *sourcep) | 1696 | void LLAudioChannel::setSource(LLAudioSource *sourcep) |
1697 | { | 1697 | { |
1698 | //llinfos << this << ": setSource(" << sourcep << ")" << llendl; | 1698 | //LL_INFOS("AudioEngine") << this << ": setSource(" << sourcep << ")" << llendl; |
1699 | 1699 | ||
1700 | if (!sourcep) | 1700 | if (!sourcep) |
1701 | { | 1701 | { |
1702 | // Clearing the source for this channel, don't need to do anything. | 1702 | // Clearing the source for this channel, don't need to do anything. |
1703 | //llinfos << "Clearing source for channel" << llendl; | 1703 | //LL_INFOS("AudioEngine") << "Clearing source for channel" << llendl; |
1704 | cleanup(); | 1704 | cleanup(); |
1705 | mCurrentSourcep = NULL; | 1705 | mCurrentSourcep = NULL; |
1706 | mWaiting = false; | 1706 | mWaiting = false; |
@@ -1710,7 +1710,7 @@ void LLAudioChannel::setSource(LLAudioSource *sourcep) | |||
1710 | if (sourcep == mCurrentSourcep) | 1710 | if (sourcep == mCurrentSourcep) |
1711 | { | 1711 | { |
1712 | // Don't reallocate the channel, this will make FMOD goofy. | 1712 | // Don't reallocate the channel, this will make FMOD goofy. |
1713 | //llinfos << "Calling setSource with same source!" << llendl; | 1713 | //LL_INFOS("AudioEngine") << "Calling setSource with same source!" << llendl; |
1714 | } | 1714 | } |
1715 | 1715 | ||
1716 | mCurrentSourcep = sourcep; | 1716 | mCurrentSourcep = sourcep; |
@@ -1802,7 +1802,7 @@ bool LLAudioData::load() | |||
1802 | if (mBufferp) | 1802 | if (mBufferp) |
1803 | { | 1803 | { |
1804 | // We already have this sound in a buffer, don't do anything. | 1804 | // We already have this sound in a buffer, don't do anything. |
1805 | llinfos << "Already have a buffer for this sound, don't bother loading!" << llendl; | 1805 | LL_INFOS("AudioEngine") << "Already have a buffer for this sound, don't bother loading!" << llendl; |
1806 | return true; | 1806 | return true; |
1807 | } | 1807 | } |
1808 | 1808 | ||
@@ -1810,7 +1810,7 @@ bool LLAudioData::load() | |||
1810 | if (!mBufferp) | 1810 | if (!mBufferp) |
1811 | { | 1811 | { |
1812 | // No free buffers, abort. | 1812 | // No free buffers, abort. |
1813 | llinfos << "Not able to allocate a new audio buffer, aborting." << llendl; | 1813 | LL_INFOS("AudioEngine") << "Not able to allocate a new audio buffer, aborting." << llendl; |
1814 | return false; | 1814 | return false; |
1815 | } | 1815 | } |
1816 | 1816 | ||
diff --git a/linden/indra/llaudio/audioengine_openal.cpp b/linden/indra/llaudio/audioengine_openal.cpp index 002dfba..f13a5fa 100644 --- a/linden/indra/llaudio/audioengine_openal.cpp +++ b/linden/indra/llaudio/audioengine_openal.cpp | |||
@@ -62,33 +62,33 @@ bool LLAudioEngine_OpenAL::init(const S32 num_channels, void* userdata) | |||
62 | 62 | ||
63 | if(!alutInit(NULL, NULL)) | 63 | if(!alutInit(NULL, NULL)) |
64 | { | 64 | { |
65 | llwarns << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << llendl; | 65 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL; |
66 | return false; | 66 | return false; |
67 | } | 67 | } |
68 | 68 | ||
69 | llinfos << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << llendl; | 69 | LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << LL_ENDL; |
70 | 70 | ||
71 | llinfos << "OpenAL version: " | 71 | LL_INFOS("OpenAL") << "OpenAL version: " |
72 | << ll_safe_string(alGetString(AL_VERSION)) << llendl; | 72 | << ll_safe_string(alGetString(AL_VERSION)) << LL_ENDL; |
73 | llinfos << "OpenAL vendor: " | 73 | LL_INFOS("OpenAL") << "OpenAL vendor: " |
74 | << ll_safe_string(alGetString(AL_VENDOR)) << llendl; | 74 | << ll_safe_string(alGetString(AL_VENDOR)) << LL_ENDL; |
75 | llinfos << "OpenAL renderer: " | 75 | LL_INFOS("OpenAL") << "OpenAL renderer: " |
76 | << ll_safe_string(alGetString(AL_RENDERER)) << llendl; | 76 | << ll_safe_string(alGetString(AL_RENDERER)) << LL_ENDL; |
77 | 77 | ||
78 | ALint major = alutGetMajorVersion (); | 78 | ALint major = alutGetMajorVersion (); |
79 | ALint minor = alutGetMinorVersion (); | 79 | ALint minor = alutGetMinorVersion (); |
80 | llinfos << "ALUT version: " << major << "." << minor << llendl; | 80 | LL_INFOS("OpenAL") << "ALUT version: " << major << "." << minor << LL_ENDL; |
81 | 81 | ||
82 | ALCdevice *device = alcGetContextsDevice(alcGetCurrentContext()); | 82 | ALCdevice *device = alcGetContextsDevice(alcGetCurrentContext()); |
83 | 83 | ||
84 | alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &major); | 84 | alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &major); |
85 | alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &minor); | 85 | alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &minor); |
86 | llinfos << "ALC version: " << major << "." << minor << llendl; | 86 | LL_INFOS("OpenAL") << "ALC version: " << major << "." << minor << LL_ENDL; |
87 | 87 | ||
88 | llinfos << "ALC default device: " | 88 | LL_INFOS("OpenAL") << "ALC default device: " |
89 | << ll_safe_string(alcGetString(device, | 89 | << ll_safe_string(alcGetString(device, |
90 | ALC_DEFAULT_DEVICE_SPECIFIER)) | 90 | ALC_DEFAULT_DEVICE_SPECIFIER)) |
91 | << llendl; | 91 | << LL_ENDL; |
92 | 92 | ||
93 | return true; | 93 | return true; |
94 | } | 94 | } |
@@ -128,24 +128,24 @@ void LLAudioEngine_OpenAL::allocateListener() | |||
128 | mListenerp = (LLListener *) new LLListener_OpenAL(); | 128 | mListenerp = (LLListener *) new LLListener_OpenAL(); |
129 | if(!mListenerp) | 129 | if(!mListenerp) |
130 | { | 130 | { |
131 | llwarns << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << llendl; | 131 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << LL_ENDL; |
132 | } | 132 | } |
133 | } | 133 | } |
134 | 134 | ||
135 | // virtual | 135 | // virtual |
136 | void LLAudioEngine_OpenAL::shutdown() | 136 | void LLAudioEngine_OpenAL::shutdown() |
137 | { | 137 | { |
138 | llinfos << "About to LLAudioEngine::shutdown()" << llendl; | 138 | LL_INFOS("OpenAL") << "About to LLAudioEngine::shutdown()" << LL_ENDL; |
139 | LLAudioEngine::shutdown(); | 139 | LLAudioEngine::shutdown(); |
140 | 140 | ||
141 | llinfos << "About to alutExit()" << llendl; | 141 | LL_INFOS("OpenAL") << "About to alutExit()" << LL_ENDL; |
142 | if(!alutExit()) | 142 | if(!alutExit()) |
143 | { | 143 | { |
144 | llwarns << "Nuts." << llendl; | 144 | LL_WARNS("OpenAL") << "Nuts." << LL_ENDL; |
145 | llwarns << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << llendl; | 145 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL; |
146 | } | 146 | } |
147 | 147 | ||
148 | llinfos << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << llendl; | 148 | LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << LL_ENDL; |
149 | 149 | ||
150 | delete mListenerp; | 150 | delete mListenerp; |
151 | mListenerp = NULL; | 151 | mListenerp = NULL; |
@@ -163,7 +163,7 @@ LLAudioChannel *LLAudioEngine_OpenAL::createChannel() | |||
163 | 163 | ||
164 | void LLAudioEngine_OpenAL::setInternalGain(F32 gain) | 164 | void LLAudioEngine_OpenAL::setInternalGain(F32 gain) |
165 | { | 165 | { |
166 | //llinfos << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << llendl; | 166 | //LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << LL_ENDL; |
167 | alListenerf(AL_GAIN, gain); | 167 | alListenerf(AL_GAIN, gain); |
168 | } | 168 | } |
169 | 169 | ||
@@ -191,7 +191,7 @@ void LLAudioChannelOpenAL::play() | |||
191 | { | 191 | { |
192 | if (mALSource == AL_NONE) | 192 | if (mALSource == AL_NONE) |
193 | { | 193 | { |
194 | llwarns << "Playing without a mALSource, aborting" << llendl; | 194 | LL_WARNS("OpenAL") << "Playing without a mALSource, aborting" << LL_ENDL; |
195 | return; | 195 | return; |
196 | } | 196 | } |
197 | 197 | ||
@@ -216,8 +216,8 @@ void LLAudioChannelOpenAL::playSynced(LLAudioChannel *channelp) | |||
216 | alGetSourcef(masterchannelp->mALSource, AL_SEC_OFFSET, | 216 | alGetSourcef(masterchannelp->mALSource, AL_SEC_OFFSET, |
217 | &master_offset); | 217 | &master_offset); |
218 | 218 | ||
219 | llinfos << "Syncing with master at " << master_offset | 219 | LL_INFOS("OpenAL") << "Syncing with master at " << master_offset |
220 | << "sec" << llendl; | 220 | << "sec" << LL_ENDL; |
221 | // *TODO: detect when this fails, maybe use AL_SAMPLE_ | 221 | // *TODO: detect when this fails, maybe use AL_SAMPLE_ |
222 | alSourcef(mALSource, AL_SEC_OFFSET, master_offset); | 222 | alSourcef(mALSource, AL_SEC_OFFSET, master_offset); |
223 | } | 223 | } |
@@ -341,18 +341,18 @@ bool LLAudioBufferOpenAL::loadWAV(const std::string& filename) | |||
341 | ALenum error = alutGetError(); | 341 | ALenum error = alutGetError(); |
342 | if (gDirUtilp->fileExists(filename)) | 342 | if (gDirUtilp->fileExists(filename)) |
343 | { | 343 | { |
344 | llwarns << | 344 | LL_WARNS("OpenAL") << |
345 | "LLAudioBufferOpenAL::loadWAV() Error loading " | 345 | "LLAudioBufferOpenAL::loadWAV() Error loading " |
346 | << filename | 346 | << filename |
347 | << " " << alutGetErrorString(error) << llendl; | 347 | << " " << alutGetErrorString(error) << LL_ENDL; |
348 | } | 348 | } |
349 | else | 349 | else |
350 | { | 350 | { |
351 | // It's common for the file to not actually exist. | 351 | // It's common for the file to not actually exist. |
352 | lldebugs << | 352 | LL_DEBUGS("OpenAL") << |
353 | "LLAudioBufferOpenAL::loadWAV() Error loading " | 353 | "LLAudioBufferOpenAL::loadWAV() Error loading " |
354 | << filename | 354 | << filename |
355 | << " " << alutGetErrorString(error) << llendl; | 355 | << " " << alutGetErrorString(error) << LL_ENDL; |
356 | } | 356 | } |
357 | return false; | 357 | return false; |
358 | } | 358 | } |
@@ -376,7 +376,7 @@ U32 LLAudioBufferOpenAL::getLength() | |||
376 | void LLAudioEngine_OpenAL::initWind() | 376 | void LLAudioEngine_OpenAL::initWind() |
377 | { | 377 | { |
378 | ALenum error; | 378 | ALenum error; |
379 | llinfos << "LLAudioEngine_OpenAL::initWind() start" << llendl; | 379 | LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::initWind() start" << LL_ENDL; |
380 | 380 | ||
381 | mNumEmptyWindALBuffers = MAX_NUM_WIND_BUFFERS; | 381 | mNumEmptyWindALBuffers = MAX_NUM_WIND_BUFFERS; |
382 | 382 | ||
@@ -386,7 +386,7 @@ void LLAudioEngine_OpenAL::initWind() | |||
386 | 386 | ||
387 | if((error=alGetError()) != AL_NO_ERROR) | 387 | if((error=alGetError()) != AL_NO_ERROR) |
388 | { | 388 | { |
389 | llwarns << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: "<<error<<llendl; | 389 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: "<<error<<LL_ENDL; |
390 | } | 390 | } |
391 | 391 | ||
392 | mWindGen = new LLWindGen<WIND_SAMPLE_T>; | 392 | mWindGen = new LLWindGen<WIND_SAMPLE_T>; |
@@ -399,16 +399,16 @@ void LLAudioEngine_OpenAL::initWind() | |||
399 | 399 | ||
400 | if(mWindBuf==NULL) | 400 | if(mWindBuf==NULL) |
401 | { | 401 | { |
402 | llerrs << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << llendl; | 402 | LL_ERRS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << LL_ENDL; |
403 | mEnableWind=false; | 403 | mEnableWind=false; |
404 | } | 404 | } |
405 | 405 | ||
406 | llinfos << "LLAudioEngine_OpenAL::initWind() done" << llendl; | 406 | LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::initWind() done" << LL_ENDL; |
407 | } | 407 | } |
408 | 408 | ||
409 | void LLAudioEngine_OpenAL::cleanupWind() | 409 | void LLAudioEngine_OpenAL::cleanupWind() |
410 | { | 410 | { |
411 | llinfos << "LLAudioEngine_OpenAL::cleanupWind()" << llendl; | 411 | LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::cleanupWind()" << LL_ENDL; |
412 | 412 | ||
413 | if (mWindSource != AL_NONE) | 413 | if (mWindSource != AL_NONE) |
414 | { | 414 | { |
@@ -484,7 +484,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) | |||
484 | mNumEmptyWindALBuffers = llmin(mNumEmptyWindALBuffers + processed * 3 - unprocessed, MAX_NUM_WIND_BUFFERS-unprocessed); | 484 | mNumEmptyWindALBuffers = llmin(mNumEmptyWindALBuffers + processed * 3 - unprocessed, MAX_NUM_WIND_BUFFERS-unprocessed); |
485 | mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0); | 485 | mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0); |
486 | 486 | ||
487 | //llinfos << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << llendl; | 487 | //LL_INFOS("OpenAL") << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << LL_ENDL; |
488 | 488 | ||
489 | while(processed--) // unqueue old buffers | 489 | while(processed--) // unqueue old buffers |
490 | { | 490 | { |
@@ -495,7 +495,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) | |||
495 | error = alGetError(); | 495 | error = alGetError(); |
496 | if(error != AL_NO_ERROR) | 496 | if(error != AL_NO_ERROR) |
497 | { | 497 | { |
498 | llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl; | 498 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << LL_ENDL; |
499 | } | 499 | } |
500 | else | 500 | else |
501 | { | 501 | { |
@@ -511,7 +511,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) | |||
511 | alGenBuffers(1,&buffer); | 511 | alGenBuffers(1,&buffer); |
512 | if((error=alGetError()) != AL_NO_ERROR) | 512 | if((error=alGetError()) != AL_NO_ERROR) |
513 | { | 513 | { |
514 | llwarns << "LLAudioEngine_OpenAL::initWind() Error creating wind buffer: " << error << llendl; | 514 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind buffer: " << error << LL_ENDL; |
515 | break; | 515 | break; |
516 | } | 516 | } |
517 | 517 | ||
@@ -523,12 +523,12 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) | |||
523 | mWindBufFreq); | 523 | mWindBufFreq); |
524 | error = alGetError(); | 524 | error = alGetError(); |
525 | if(error != AL_NO_ERROR) | 525 | if(error != AL_NO_ERROR) |
526 | llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << llendl; | 526 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << LL_ENDL; |
527 | 527 | ||
528 | alSourceQueueBuffers(mWindSource, 1, &buffer); | 528 | alSourceQueueBuffers(mWindSource, 1, &buffer); |
529 | error = alGetError(); | 529 | error = alGetError(); |
530 | if(error != AL_NO_ERROR) | 530 | if(error != AL_NO_ERROR) |
531 | llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl; | 531 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << LL_ENDL; |
532 | 532 | ||
533 | --mNumEmptyWindALBuffers; | 533 | --mNumEmptyWindALBuffers; |
534 | } | 534 | } |
@@ -539,6 +539,6 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) | |||
539 | { | 539 | { |
540 | alSourcePlay(mWindSource); | 540 | alSourcePlay(mWindSource); |
541 | 541 | ||
542 | llinfos << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << llendl; | 542 | LL_INFOS("OpenAL") << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << LL_ENDL; |
543 | } | 543 | } |
544 | } | 544 | } |
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp index 5d6a648..5a8a8e0 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp | |||
@@ -49,6 +49,7 @@ extern "C" { | |||
49 | 49 | ||
50 | #include "llmediaimplgstreamer_syms.h" | 50 | #include "llmediaimplgstreamer_syms.h" |
51 | 51 | ||
52 | #include "llerror.h" | ||
52 | // register this impl with media manager factory | 53 | // register this impl with media manager factory |
53 | static LLMediaImplRegister sLLMediaImplGStreamerReg( "LLMediaImplGStreamer", new LLMediaImplGStreamerMaker() ); | 54 | static LLMediaImplRegister sLLMediaImplGStreamerReg( "LLMediaImplGStreamer", new LLMediaImplGStreamerMaker() ); |
54 | 55 | ||
@@ -73,12 +74,13 @@ LLMediaImplGStreamer () : | |||
73 | mTextureFormatType ( LL_MEDIA_UNSIGNED_INT_8_8_8_8_REV ), | 74 | mTextureFormatType ( LL_MEDIA_UNSIGNED_INT_8_8_8_8_REV ), |
74 | mPump ( NULL ), | 75 | mPump ( NULL ), |
75 | mPlaybin ( NULL ), | 76 | mPlaybin ( NULL ), |
76 | mVideoSink ( NULL ) | 77 | mVideoSink ( NULL ), |
78 | mState( GST_STATE_NULL ) | ||
77 | #ifdef LL_GST_SOUNDSINK | 79 | #ifdef LL_GST_SOUNDSINK |
78 | ,mAudioSink ( NULL ) | 80 | ,mAudioSink ( NULL ) |
79 | #endif // LL_GST_SOUNDSINK | 81 | #endif // LL_GST_SOUNDSINK |
80 | { | 82 | { |
81 | DEBUGMSG("constructing media..."); | 83 | LL_DEBUGS("MediaManager") << "constructing media..." << LL_ENDL; |
82 | 84 | ||
83 | setMediaDepth(4); | 85 | setMediaDepth(4); |
84 | 86 | ||
@@ -99,11 +101,12 @@ LLMediaImplGStreamer () : | |||
99 | 101 | ||
100 | if (NULL == getenv("LL_GSTREAMER_EXTERNAL")) { | 102 | if (NULL == getenv("LL_GSTREAMER_EXTERNAL")) { |
101 | // instantiate and connect a custom video sink | 103 | // instantiate and connect a custom video sink |
104 | LL_DEBUGS("MediaManager") << "extrenal video sink..." << LL_ENDL; | ||
102 | mVideoSink = | 105 | mVideoSink = |
103 | GST_SLVIDEO(llgst_element_factory_make ("private-slvideo", "slvideo")); | 106 | GST_SLVIDEO(llgst_element_factory_make ("private-slvideo", "slvideo")); |
104 | if (!mVideoSink) | 107 | if (!mVideoSink) |
105 | { | 108 | { |
106 | WARNMSG("Could not instantiate private-slvideo element."); | 109 | LL_WARNS("MediaImpl") << "Could not instantiate private-slvideo element." << LL_ENDL; |
107 | // todo: cleanup. | 110 | // todo: cleanup. |
108 | return; // error | 111 | return; // error |
109 | } | 112 | } |
@@ -111,12 +114,13 @@ LLMediaImplGStreamer () : | |||
111 | g_object_set(mPlaybin, "video-sink", mVideoSink, NULL); | 114 | g_object_set(mPlaybin, "video-sink", mVideoSink, NULL); |
112 | 115 | ||
113 | #ifdef LL_GST_SOUNDSINK | 116 | #ifdef LL_GST_SOUNDSINK |
117 | LL_DEBUGS("MediaManager") << "extrenal audio sink..." << LL_ENDL; | ||
114 | // instantiate and connect a custom audio sink | 118 | // instantiate and connect a custom audio sink |
115 | mAudioSink = | 119 | mAudioSink = |
116 | GST_SLSOUND(llgst_element_factory_make ("private-slsound", "slsound")); | 120 | GST_SLSOUND(llgst_element_factory_make ("private-slsound", "slsound")); |
117 | if (!mAudioSink) | 121 | if (!mAudioSink) |
118 | { | 122 | { |
119 | WARNMSG("Could not instantiate private-slsound element."); | 123 | LL_WARN("MediaImpl") << "Could not instantiate private-slsound element." << LL_ENDL; |
120 | // todo: cleanup. | 124 | // todo: cleanup. |
121 | return; // error | 125 | return; // error |
122 | } | 126 | } |
@@ -149,7 +153,7 @@ int LLMediaImplGStreamer::getTextureFormatInternal() const | |||
149 | LLMediaImplGStreamer:: | 153 | LLMediaImplGStreamer:: |
150 | ~LLMediaImplGStreamer () | 154 | ~LLMediaImplGStreamer () |
151 | { | 155 | { |
152 | DEBUGMSG("dtor of media..."); | 156 | LL_DEBUGS("MediaImpl") << ("dtor of media...") << LL_ENDL; |
153 | unload(); | 157 | unload(); |
154 | } | 158 | } |
155 | 159 | ||
@@ -176,21 +180,23 @@ startup ( LLMediaManagerData* init_data ) | |||
176 | "libgstvideo-0.10.so.0", | 180 | "libgstvideo-0.10.so.0", |
177 | "libgstaudio-0.10.so.0") ) | 181 | "libgstaudio-0.10.so.0") ) |
178 | { | 182 | { |
179 | WARNMSG("Couldn't find suitable GStreamer 0.10 support on this system - video playback disabled."); | 183 | LL_WARNS("MediaImpl") << "Couldn't find suitable GStreamer 0.10 support on this system - video playback disabled." << LL_ENDL; |
180 | return false; | 184 | return false; |
181 | } | 185 | } |
182 | 186 | ||
183 | if (llgst_segtrap_set_enabled) | 187 | if (llgst_segtrap_set_enabled) |
184 | llgst_segtrap_set_enabled(FALSE); | 188 | llgst_segtrap_set_enabled(FALSE); |
185 | else | 189 | else |
186 | WARNMSG("gst_segtrap_set_enabled() is not available; Automated crash-reporter may cease to function until next restart."); | 190 | { |
191 | LL_WARNS("MediaImpl") << "gst_segtrap_set_enabled() is not available; Automated crash-reporter may cease to function until next restart." << LL_ENDL; | ||
192 | } | ||
187 | 193 | ||
188 | // Protect against GStreamer resetting the locale, yuck. | 194 | // Protect against GStreamer resetting the locale, yuck. |
189 | static std::string saved_locale; | 195 | static std::string saved_locale; |
190 | saved_locale = setlocale(LC_ALL, NULL); | 196 | saved_locale = setlocale(LC_ALL, NULL); |
191 | if (0 == llgst_init_check(NULL, NULL, NULL)) | 197 | if (0 == llgst_init_check(NULL, NULL, NULL)) |
192 | { | 198 | { |
193 | WARNMSG("GST init failed for unspecified reason."); | 199 | LL_WARNS("MediaImpl") << "GST init failed for unspecified reason." << LL_ENDL; |
194 | setlocale(LC_ALL, saved_locale.c_str() ); | 200 | setlocale(LC_ALL, saved_locale.c_str() ); |
195 | return false; | 201 | return false; |
196 | } | 202 | } |
@@ -222,7 +228,7 @@ closedown() | |||
222 | // | 228 | // |
223 | //#define LL_GST_REPORT_STATE_CHANGES | 229 | //#define LL_GST_REPORT_STATE_CHANGES |
224 | #ifdef LL_GST_REPORT_STATE_CHANGES | 230 | #ifdef LL_GST_REPORT_STATE_CHANGES |
225 | static char* get_gst_state_name(GstState state) | 231 | static const char* get_gst_state_name(GstState state) |
226 | { | 232 | { |
227 | switch (state) { | 233 | switch (state) { |
228 | case GST_STATE_VOID_PENDING: return "VOID_PENDING"; | 234 | case GST_STATE_VOID_PENDING: return "VOID_PENDING"; |
@@ -241,17 +247,7 @@ LLMediaImplGStreamer::bus_callback (GstBus *bus, | |||
241 | GstMessage *message, | 247 | GstMessage *message, |
242 | gpointer data) | 248 | gpointer data) |
243 | { | 249 | { |
244 | if (GST_MESSAGE_TYPE(message) != GST_MESSAGE_STATE_CHANGED && | 250 | LL_DEBUGS("MediaCallback") << "Got GST message type: " << LLGST_MESSAGE_TYPE_NAME (message) << LL_ENDL; |
245 | GST_MESSAGE_TYPE(message) != GST_MESSAGE_BUFFERING) | ||
246 | { | ||
247 | DEBUGMSG("Got GST message type: %s", | ||
248 | LLGST_MESSAGE_TYPE_NAME (message)); | ||
249 | } | ||
250 | else | ||
251 | { | ||
252 | DEBUGMSG("Got GST message type: %s", | ||
253 | LLGST_MESSAGE_TYPE_NAME (message)); | ||
254 | } | ||
255 | 251 | ||
256 | LLMediaImplGStreamer *impl = (LLMediaImplGStreamer*)data; | 252 | LLMediaImplGStreamer *impl = (LLMediaImplGStreamer*)data; |
257 | 253 | ||
@@ -262,7 +258,7 @@ LLMediaImplGStreamer::bus_callback (GstBus *bus, | |||
262 | { | 258 | { |
263 | gint percent = 0; | 259 | gint percent = 0; |
264 | llgst_message_parse_buffering(message, &percent); | 260 | llgst_message_parse_buffering(message, &percent); |
265 | DEBUGMSG("GST buffering: %d%%", percent); | 261 | LL_DEBUGS("MediaBuffering") << "GST buffering: " << percent << "%%" << LL_ENDL; |
266 | LLMediaEvent event( impl, percent ); | 262 | LLMediaEvent event( impl, percent ); |
267 | impl->getEventEmitter().update( &LLMediaObserver::onUpdateProgress, event ); | 263 | impl->getEventEmitter().update( &LLMediaObserver::onUpdateProgress, event ); |
268 | 264 | ||
@@ -279,16 +275,18 @@ LLMediaImplGStreamer::bus_callback (GstBus *bus, | |||
279 | &pending_state); | 275 | &pending_state); |
280 | #ifdef LL_GST_REPORT_STATE_CHANGES | 276 | #ifdef LL_GST_REPORT_STATE_CHANGES |
281 | // not generally very useful, and rather spammy. | 277 | // not generally very useful, and rather spammy. |
282 | DEBUGMSG("state change (old,<new>,pending): %s,<%s>,%s", | 278 | LL_DEBUGS("MediaState") << "GST state change (old,<new>,pending): "<< get_gst_state_name(old_state) << ",<" << get_gst_state_name(new_state) << ">," << get_gst_state_name(pending_state) << LL_ENDL; |
283 | get_gst_state_name(old_state), | ||
284 | get_gst_state_name(new_state), | ||
285 | get_gst_state_name(pending_state)); | ||
286 | #endif // LL_GST_REPORT_STATE_CHANGES | 279 | #endif // LL_GST_REPORT_STATE_CHANGES |
287 | 280 | ||
288 | switch (new_state) { | 281 | switch (new_state) { |
289 | case GST_STATE_VOID_PENDING: | 282 | case GST_STATE_VOID_PENDING: |
290 | break; | 283 | break; |
291 | case GST_STATE_NULL: | 284 | case GST_STATE_NULL: |
285 | LL_DEBUGS("MediaImpl") << "State changed to NULL" << LL_ENDL; | ||
286 | if (impl->getState() == GST_STATE_PLAYING) { // We got stoped by gstremer... | ||
287 | impl->play(); | ||
288 | LL_DEBUGS("MediaImpl") << "Trying to restart." << LL_ENDL; | ||
289 | } | ||
292 | break; | 290 | break; |
293 | case GST_STATE_READY: | 291 | case GST_STATE_READY: |
294 | break; | 292 | break; |
@@ -309,11 +307,12 @@ LLMediaImplGStreamer::bus_callback (GstBus *bus, | |||
309 | gchar *debug = NULL; | 307 | gchar *debug = NULL; |
310 | 308 | ||
311 | llgst_message_parse_error (message, &err, &debug); | 309 | llgst_message_parse_error (message, &err, &debug); |
312 | WARNMSG("GST error: %s", err->message); | 310 | LL_WARNS("MediaImpl") << "GST Error: " << err->message << LL_ENDL; |
313 | g_error_free (err); | 311 | g_error_free (err); |
314 | g_free (debug); | 312 | g_free (debug); |
315 | 313 | ||
316 | impl->addCommand(LLMediaBase::COMMAND_STOP); | 314 | impl->addCommand(LLMediaBase::COMMAND_STOP); |
315 | //impl->addCommand(LLMediaBase::COMMAND_START); | ||
317 | 316 | ||
318 | break; | 317 | break; |
319 | } | 318 | } |
@@ -324,7 +323,8 @@ LLMediaImplGStreamer::bus_callback (GstBus *bus, | |||
324 | gchar *debug = NULL; | 323 | gchar *debug = NULL; |
325 | 324 | ||
326 | llgst_message_parse_info (message, &err, &debug); | 325 | llgst_message_parse_info (message, &err, &debug); |
327 | INFOMSG("GST info: %s", err->message); | 326 | LL_INFOS("MediaImpl") << "GST info: " << err->message |
327 | << LL_ENDL; | ||
328 | g_error_free (err); | 328 | g_error_free (err); |
329 | g_free (debug); | 329 | g_free (debug); |
330 | } | 330 | } |
@@ -335,18 +335,36 @@ LLMediaImplGStreamer::bus_callback (GstBus *bus, | |||
335 | gchar *debug = NULL; | 335 | gchar *debug = NULL; |
336 | 336 | ||
337 | llgst_message_parse_warning (message, &err, &debug); | 337 | llgst_message_parse_warning (message, &err, &debug); |
338 | WARNMSG("GST warning: %s", err->message); | 338 | LL_WARNS("MediaImpl") << "GST warning: " << err->message |
339 | << LL_ENDL; | ||
339 | g_error_free (err); | 340 | g_error_free (err); |
340 | g_free (debug); | 341 | g_free (debug); |
341 | 342 | ||
342 | break; | 343 | break; |
343 | } | 344 | } |
345 | case GST_MESSAGE_TAG: { | ||
346 | #if 0 | ||
347 | GstTagList *tag_list; | ||
348 | gchar *title; | ||
349 | gchar *artist; | ||
350 | llgst_message_parse_tag(message, &tag_list); | ||
351 | gboolean hazTitle = llgst_tag_list_get_string(tag_list, | ||
352 | GST_TAG_TITLE, &title); | ||
353 | gboolean hazArtist = llgst_tag_list_get_string(tag_list, | ||
354 | GST_TAG_ARTIST, &artist); | ||
355 | if(hazTitle) | ||
356 | LL_INFOS("MediaInfo") << "Title is " << title << LL_ENDL; | ||
357 | if(hazArtist) | ||
358 | LL_INFOS("MediaInfo") << "Artist is " << artist << LL_ENDL; | ||
359 | #endif | ||
360 | break; | ||
361 | } | ||
344 | case GST_MESSAGE_EOS: | 362 | case GST_MESSAGE_EOS: |
345 | /* end-of-stream */ | 363 | /* end-of-stream */ |
346 | DEBUGMSG("GST end-of-stream."); | 364 | LL_DEBUGS("MediaImpl") << "GST end-of-stream." << LL_ENDL; |
347 | if (impl->isLooping()) | 365 | if (impl->isLooping()) |
348 | { | 366 | { |
349 | DEBUGMSG("looping media..."); | 367 | LL_DEBUGS("MediaImpl") << "looping media..." << LL_ENDL; |
350 | impl->stop(); | 368 | impl->stop(); |
351 | impl->play(); | 369 | impl->play(); |
352 | } | 370 | } |
@@ -374,7 +392,8 @@ bool | |||
374 | LLMediaImplGStreamer:: | 392 | LLMediaImplGStreamer:: |
375 | navigateTo ( const std::string urlIn ) | 393 | navigateTo ( const std::string urlIn ) |
376 | { | 394 | { |
377 | DEBUGMSG("Setting media URI: %s", urlIn.c_str()); | 395 | LL_DEBUGS("MediaImpl") << "Setting media URI: " << urlIn.c_str() |
396 | << LL_ENDL; | ||
378 | 397 | ||
379 | if (NULL == mPump | 398 | if (NULL == mPump |
380 | #ifdef LL_GST_SOUNDSINK | 399 | #ifdef LL_GST_SOUNDSINK |
@@ -412,10 +431,11 @@ bool | |||
412 | LLMediaImplGStreamer:: | 431 | LLMediaImplGStreamer:: |
413 | unload () | 432 | unload () |
414 | { | 433 | { |
415 | DEBUGMSG("unloading media..."); | 434 | LL_DEBUGS("MediaImpl") << "unloading media..." << LL_ENDL; |
416 | if (mPlaybin) | 435 | if (mPlaybin) |
417 | { | 436 | { |
418 | llgst_element_set_state (mPlaybin, GST_STATE_NULL); | 437 | llgst_element_set_state (mPlaybin, GST_STATE_NULL); |
438 | mState = GST_STATE_NULL; | ||
419 | llgst_object_unref (GST_OBJECT (mPlaybin)); | 439 | llgst_object_unref (GST_OBJECT (mPlaybin)); |
420 | mPlaybin = NULL; | 440 | mPlaybin = NULL; |
421 | } | 441 | } |
@@ -443,7 +463,7 @@ bool | |||
443 | LLMediaImplGStreamer:: | 463 | LLMediaImplGStreamer:: |
444 | updateMedia () | 464 | updateMedia () |
445 | { | 465 | { |
446 | DEBUGMSG("updating media..."); | 466 | //LL_DEBUGS("MediaImpl") << "updating media..." << LL_ENDL; |
447 | 467 | ||
448 | // sanity check | 468 | // sanity check |
449 | if (NULL == mPump | 469 | if (NULL == mPump |
@@ -452,7 +472,7 @@ updateMedia () | |||
452 | #endif | 472 | #endif |
453 | || NULL == mPlaybin) | 473 | || NULL == mPlaybin) |
454 | { | 474 | { |
455 | DEBUGMSG("dead media..."); | 475 | LL_DEBUGS("MediaImpl") << "dead media..." << LL_ENDL; |
456 | return false; | 476 | return false; |
457 | } | 477 | } |
458 | 478 | ||
@@ -460,36 +480,33 @@ updateMedia () | |||
460 | switch (nextCommand()) | 480 | switch (nextCommand()) |
461 | { | 481 | { |
462 | case LLMediaBase::COMMAND_START: | 482 | case LLMediaBase::COMMAND_START: |
463 | DEBUGMSG("COMMAND_START"); | 483 | LL_DEBUGS("MediaImpl") << "COMMAND_START" << LL_ENDL; |
464 | if (getStatus() == LLMediaBase::STATUS_PAUSED || | 484 | if (getStatus() == LLMediaBase::STATUS_PAUSED || |
465 | getStatus() == LLMediaBase::STATUS_NAVIGATING || | 485 | getStatus() == LLMediaBase::STATUS_NAVIGATING || |
466 | getStatus() == LLMediaBase::STATUS_STOPPED) | 486 | getStatus() == LLMediaBase::STATUS_STOPPED) |
467 | { | 487 | { |
468 | DEBUGMSG("doing COMMAND_START"); | ||
469 | play(); | 488 | play(); |
470 | setStatus(LLMediaBase::STATUS_STARTED); | 489 | setStatus(LLMediaBase::STATUS_STARTED); |
471 | clearCommand(); | 490 | clearCommand(); |
472 | } | 491 | } |
473 | break; | 492 | break; |
474 | case LLMediaBase::COMMAND_STOP: | 493 | case LLMediaBase::COMMAND_STOP: |
475 | DEBUGMSG("COMMAND_STOP"); | 494 | LL_DEBUGS("MediaImpl") << "COMMAND_STOP" << LL_ENDL; |
476 | DEBUGMSG("doing COMMAND_STOP"); | ||
477 | stop(); | 495 | stop(); |
478 | setStatus(LLMediaBase::STATUS_STOPPED); | 496 | setStatus(LLMediaBase::STATUS_STOPPED); |
479 | clearCommand(); | 497 | clearCommand(); |
480 | break; | 498 | break; |
481 | case LLMediaBase::COMMAND_PAUSE: | 499 | case LLMediaBase::COMMAND_PAUSE: |
482 | DEBUGMSG("COMMAND_PAUSE"); | 500 | LL_DEBUGS("MediaImpl") << "COMMAND_PAUSE" << LL_ENDL; |
483 | if (getStatus() == LLMediaBase::STATUS_STARTED) | 501 | if (getStatus() == LLMediaBase::STATUS_STARTED) |
484 | { | 502 | { |
485 | DEBUGMSG("doing COMMAND_PAUSE"); | ||
486 | pause(); | 503 | pause(); |
487 | setStatus(LLMediaBase::STATUS_PAUSED); | 504 | setStatus(LLMediaBase::STATUS_PAUSED); |
488 | clearCommand(); | 505 | clearCommand(); |
489 | } | 506 | } |
490 | break; | 507 | break; |
491 | default: | 508 | default: |
492 | DEBUGMSG("COMMAND_?"); | 509 | LL_INFOS("MediaImpl") << "Unknown command" << LL_ENDL; |
493 | clearCommand(); | 510 | clearCommand(); |
494 | break; | 511 | break; |
495 | case LLMediaBase::COMMAND_NONE: | 512 | case LLMediaBase::COMMAND_NONE: |
@@ -507,7 +524,7 @@ updateMedia () | |||
507 | GST_OBJECT_LOCK(mVideoSink); | 524 | GST_OBJECT_LOCK(mVideoSink); |
508 | if (mVideoSink->retained_frame_ready) | 525 | if (mVideoSink->retained_frame_ready) |
509 | { | 526 | { |
510 | DEBUGMSG("NEW FRAME "); | 527 | LL_DEBUGS("MediaImpl") <<"NEW FRAME " << LL_ENDL; |
511 | if (mVideoSink->retained_frame_width != getMediaWidth() || | 528 | if (mVideoSink->retained_frame_width != getMediaWidth() || |
512 | mVideoSink->retained_frame_height != getMediaHeight()) | 529 | mVideoSink->retained_frame_height != getMediaHeight()) |
513 | // *TODO: also check for change in format | 530 | // *TODO: also check for change in format |
@@ -527,8 +544,9 @@ updateMedia () | |||
527 | mTextureFormatType = LL_MEDIA_UNSIGNED_INT_8_8_8_8_REV; | 544 | mTextureFormatType = LL_MEDIA_UNSIGNED_INT_8_8_8_8_REV; |
528 | } | 545 | } |
529 | mMediaRowbytes = neww * newd; | 546 | mMediaRowbytes = neww * newd; |
530 | DEBUGMSG("video container resized to %dx%d", | 547 | LL_DEBUGS("MediaImpl") |
531 | neww, newh); | 548 | << "video container resized to " << |
549 | neww <<"x"<< newh << LL_ENDL; | ||
532 | 550 | ||
533 | delete[] mediaData; | 551 | delete[] mediaData; |
534 | mediaData = new unsigned char[mMediaRowbytes * | 552 | mediaData = new unsigned char[mMediaRowbytes * |
@@ -568,9 +586,10 @@ bool | |||
568 | LLMediaImplGStreamer:: | 586 | LLMediaImplGStreamer:: |
569 | stop () | 587 | stop () |
570 | { | 588 | { |
571 | DEBUGMSG("stopping media..."); | 589 | LL_DEBUGS("MediaImpl") << "stopping media..." << LL_ENDL; |
572 | // todo: error-check this? | 590 | // todo: error-check this? |
573 | llgst_element_set_state(mPlaybin, GST_STATE_READY); | 591 | llgst_element_set_state(mPlaybin, GST_STATE_READY); |
592 | mState = GST_STATE_READY; | ||
574 | return true; | 593 | return true; |
575 | } | 594 | } |
576 | 595 | ||
@@ -580,9 +599,10 @@ bool | |||
580 | LLMediaImplGStreamer:: | 599 | LLMediaImplGStreamer:: |
581 | play () | 600 | play () |
582 | { | 601 | { |
583 | DEBUGMSG("playing media..."); | 602 | LL_DEBUGS("MediaImpl") << "playing media..." << LL_ENDL; |
584 | // todo: error-check this? | 603 | // todo: error-check this? |
585 | llgst_element_set_state(mPlaybin, GST_STATE_PLAYING); | 604 | llgst_element_set_state(mPlaybin, GST_STATE_PLAYING); |
605 | mState = GST_STATE_PLAYING; | ||
586 | return true; | 606 | return true; |
587 | } | 607 | } |
588 | 608 | ||
@@ -592,9 +612,10 @@ bool | |||
592 | LLMediaImplGStreamer:: | 612 | LLMediaImplGStreamer:: |
593 | pause () | 613 | pause () |
594 | { | 614 | { |
595 | DEBUGMSG("pausing media..."); | 615 | LL_DEBUGS("MediaImpl") <<"pausing media..." << LL_ENDL; |
596 | // todo: error-check this? | 616 | // todo: error-check this? |
597 | llgst_element_set_state(mPlaybin, GST_STATE_PAUSED); | 617 | llgst_element_set_state(mPlaybin, GST_STATE_PAUSED); |
618 | mState = GST_STATE_PAUSED; | ||
598 | return true; | 619 | return true; |
599 | }; | 620 | }; |
600 | 621 | ||
@@ -624,8 +645,8 @@ seek( double time ) | |||
624 | GST_SEEK_TYPE_SET, gint64(time*1000000000.0F), | 645 | GST_SEEK_TYPE_SET, gint64(time*1000000000.0F), |
625 | GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); | 646 | GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); |
626 | } | 647 | } |
627 | DEBUGMSG("MEDIA SEEK REQUEST to %fsec result was %d", | 648 | LL_DEBUGS("MediaImpl") << "MEDIA SEEK REQUEST to " << float(time) |
628 | float(time), int(success)); | 649 | << "sec result was " << int(success) << LL_ENDL; |
629 | return success; | 650 | return success; |
630 | } | 651 | } |
631 | 652 | ||
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.h b/linden/indra/llmedia/llmediaimplgstreamer.h index 247b0ce..4d0638a 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.h +++ b/linden/indra/llmedia/llmediaimplgstreamer.h | |||
@@ -100,9 +100,11 @@ class LLMediaImplGStreamer: | |||
100 | GMainLoop *mPump; // event pump for this media | 100 | GMainLoop *mPump; // event pump for this media |
101 | GstElement *mPlaybin; | 101 | GstElement *mPlaybin; |
102 | GstSLVideo *mVideoSink; | 102 | GstSLVideo *mVideoSink; |
103 | GstState mState; | ||
103 | #ifdef LL_GST_SOUNDSINK | 104 | #ifdef LL_GST_SOUNDSINK |
104 | GstSLSound *mAudioSink; | 105 | GstSLSound *mAudioSink; |
105 | #endif // LL_GST_SOUNDSINK | 106 | #endif // LL_GST_SOUNDSINK |
107 | GstState getState() const { return mState; } | ||
106 | }; | 108 | }; |
107 | 109 | ||
108 | class LLMediaImplGStreamerMaker : public LLMediaImplMaker | 110 | class LLMediaImplGStreamerMaker : public LLMediaImplMaker |
diff --git a/linden/indra/llmedia/llmediamanager.cpp b/linden/indra/llmedia/llmediamanager.cpp index 16c731f..57256e6 100644 --- a/linden/indra/llmedia/llmediamanager.cpp +++ b/linden/indra/llmedia/llmediamanager.cpp | |||
@@ -40,6 +40,7 @@ | |||
40 | # include "llmediaimplllmozlib.h" | 40 | # include "llmediaimplllmozlib.h" |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #include "llerror.h" | ||
43 | LLMediaManager* LLMediaManager::sInstance = 0; | 44 | LLMediaManager* LLMediaManager::sInstance = 0; |
44 | 45 | ||
45 | 46 | ||
@@ -75,6 +76,7 @@ void LLMediaManager::initClass( LLMediaManagerData* init_data ) | |||
75 | if ( ! sInstance ) | 76 | if ( ! sInstance ) |
76 | sInstance = new LLMediaManager(); | 77 | sInstance = new LLMediaManager(); |
77 | 78 | ||
79 | LL_DEBUGS("MediaManager") << "LLMediaManager::initClass" << LL_ENDL; | ||
78 | // Initialize impl classes here - this breaks the encapsulation model | 80 | // Initialize impl classes here - this breaks the encapsulation model |
79 | // but some of the initialization takes a long time and we only want to | 81 | // 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 | 82 | // do it once at app startup before any of the impls have been created |
@@ -84,10 +86,12 @@ void LLMediaManager::initClass( LLMediaManagerData* init_data ) | |||
84 | LLMediaImplExample2::startup( init_data ); | 86 | LLMediaImplExample2::startup( init_data ); |
85 | 87 | ||
86 | #if LL_QUICKTIME_ENABLED | 88 | #if LL_QUICKTIME_ENABLED |
89 | LL_DEBUGS("MediaManager") << "LLMediaManager::initClass: starting quicktime." << LL_ENDL; | ||
87 | LLMediaImplQuickTime::startup( init_data ); | 90 | LLMediaImplQuickTime::startup( init_data ); |
88 | #endif // LL_QUICKTIME_ENABLED | 91 | #endif // LL_QUICKTIME_ENABLED |
89 | 92 | ||
90 | #if LL_GSTREAMER_ENABLED | 93 | #if LL_GSTREAMER_ENABLED |
94 | LL_DEBUGS("MediaManager") << "LLMediaManager::initClass: starting gstreamer" << LL_ENDL; | ||
91 | LLMediaImplGStreamer::startup( init_data ); | 95 | LLMediaImplGStreamer::startup( init_data ); |
92 | #endif // LL_GSTREAMER_ENABLED | 96 | #endif // LL_GSTREAMER_ENABLED |
93 | } | 97 | } |
diff --git a/linden/indra/newview/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml index d7bb64c..f3b08f9 100644 --- a/linden/indra/newview/app_settings/logcontrol.xml +++ b/linden/indra/newview/app_settings/logcontrol.xml | |||
@@ -40,6 +40,13 @@ | |||
40 | </array> | 40 | </array> |
41 | <key>tags</key> | 41 | <key>tags</key> |
42 | <array> | 42 | <array> |
43 | <string>OpenAL</string> | ||
44 | <string>AudioEngine</string> | ||
45 | <string>MediaImpl</string> | ||
46 | <string>MediaInfo</string> | ||
47 | <string>MediaCallback</string> | ||
48 | <string>MediaBuffering</string> | ||
49 | <string>MediaState</string> | ||
43 | </array> | 50 | </array> |
44 | </map> | 51 | </map> |
45 | </array> | 52 | </array> |