diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/linux_tools/register_secondlifeprotocol.sh | 22 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llviewermedia_streamingaudio.cpp | 31 | ||||
-rw-r--r-- | indra/newview/llvoiceclient.cpp | 27 |
4 files changed, 62 insertions, 23 deletions
diff --git a/indra/newview/linux_tools/register_secondlifeprotocol.sh b/indra/newview/linux_tools/register_secondlifeprotocol.sh index c7b4d55461..16e73cb854 100755 --- a/indra/newview/linux_tools/register_secondlifeprotocol.sh +++ b/indra/newview/linux_tools/register_secondlifeprotocol.sh @@ -22,13 +22,12 @@ else fi # Register handler for KDE-aware apps -if [ -z "$KDEHOME" ]; then - KDEHOME=~/.kde -fi -LLKDEPROTDIR=${KDEHOME}/share/services -if [ -d "$LLKDEPROTDIR" ]; then - LLKDEPROTFILE=${LLKDEPROTDIR}/secondlife.protocol - cat > ${LLKDEPROTFILE} <<EOF || echo Warning: Did not register secondlife:// handler with KDE: Could not write ${LLKDEPROTFILE} +for LLKDECONFIG in kde-config kde4-config; do + if [ `which $LLKDECONFIG` ]; then + LLKDEPROTODIR=`$LLKDECONFIG --path services | cut -d ':' -f 1` + if [ -d "$LLKDEPROTODIR" ]; then + LLKDEPROTOFILE=${LLKDEPROTODIR}/secondlife.protocol + cat > ${LLKDEPROTOFILE} <<EOF || echo Warning: Did not register secondlife:// handler with KDE: Could not write ${LLKDEPROTOFILE} [Protocol] exec=${HANDLER} '%u' protocol=secondlife @@ -41,6 +40,9 @@ writing=false makedir=false deleting=false EOF -else - echo Warning: Did not register secondlife:// handler with KDE: Directory $LLKDEPROTDIR does not exist. -fi + else + echo Warning: Did not register secondlife:// handler with KDE: Directory $LLKDEPROTODIR does not exist. + fi + fi +done + diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 70f15e0057..388e0c8d8d 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2534,6 +2534,11 @@ void LLIMMgr::processAgentListUpdates(const LLUUID& session_id, const LLSD& body if (speaker_mgr) { speaker_mgr->updateSpeakers(body); + + // also the same call is added into LLVoiceClient::participantUpdatedEvent because + // sometimes it is called AFTER LLViewerChatterBoxSessionAgentListUpdates::post() + // when moderation state changed too late. See EXT-3544. + speaker_mgr->update(true); } else { diff --git a/indra/newview/llviewermedia_streamingaudio.cpp b/indra/newview/llviewermedia_streamingaudio.cpp index 90cfb85821..e9293ac5a4 100644 --- a/indra/newview/llviewermedia_streamingaudio.cpp +++ b/indra/newview/llviewermedia_streamingaudio.cpp @@ -1,7 +1,7 @@ /** * @file llviewermedia_streamingaudio.h * @author Tofu Linden, Sam Kolb - * @brief LLStreamingAudio_MediaPlugins implementation - an implementation of the streaming audio interface which is implemented as a client of the media plugins API. + * @brief LLStreamingAudio_MediaPlugins implementation - an implementation of the streaming audio interface which is implemented as a client of the media plugin API. * * $LicenseInfo:firstyear=2009&license=viewergpl$ * @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "linden_common.h" #include "llpluginclassmedia.h" +#include "llpluginclassmediaowner.h" #include "llviewermedia.h" #include "llviewermedia_streamingaudio.h" @@ -61,18 +62,18 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url) if (!mMediaPlugin) // lazy-init the underlying media plugin { mMediaPlugin = initializeMedia("audio/mpeg"); // assumes that whatever media implementation supports mp3 also supports vorbis. - llinfos << "mMediaPlugin is now " << mMediaPlugin << llendl; + llinfos << "steaming audio mMediaPlugin is now " << mMediaPlugin << llendl; } if(!mMediaPlugin) return; - + if (!url.empty()) { llinfos << "Starting internet stream: " << url << llendl; mURL = url; mMediaPlugin->loadURI ( url ); mMediaPlugin->start(); - llinfos << "Playing....." << llendl; + llinfos << "Playing stream..." << llendl; } else { llinfos << "setting stream to NULL"<< llendl; mURL.clear(); @@ -82,6 +83,7 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url) void LLStreamingAudio_MediaPlugins::stop() { + llinfos << "Stopping internet stream." << llendl; if(mMediaPlugin) { mMediaPlugin->stop(); @@ -97,10 +99,12 @@ void LLStreamingAudio_MediaPlugins::pause(int pause) if(pause) { + llinfos << "Pausing internet stream." << llendl; mMediaPlugin->pause(); } else { + llinfos << "Unpausing internet stream." << llendl; mMediaPlugin->start(); } } @@ -114,20 +118,21 @@ void LLStreamingAudio_MediaPlugins::update() int LLStreamingAudio_MediaPlugins::isPlaying() { if (!mMediaPlugin) - return 0; + return 0; // stopped - // *TODO: can probably do better than this - if (mMediaPlugin->isPluginRunning()) - { - return 1; // Active and playing - } + LLPluginClassMediaOwner::EMediaStatus status = + mMediaPlugin->getStatus(); - if (mMediaPlugin->isPluginExited()) + switch (status) { + case LLPluginClassMediaOwner::MEDIA_LOADING: // but not MEDIA_LOADED + case LLPluginClassMediaOwner::MEDIA_PLAYING: + return 1; // Active and playing + case LLPluginClassMediaOwner::MEDIA_PAUSED: + return 2; // paused + default: return 0; // stopped } - - return 2; // paused } void LLStreamingAudio_MediaPlugins::setGain(F32 vol) diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index cfa1f05ec0..c2d26a1971 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -4443,6 +4443,33 @@ void LLVoiceClient::participantUpdatedEvent( participant->mPower = 0.0f; } participant->mVolume = volume; + + + // *HACH: mantipov: added while working on EXT-3544 + /* + Sometimes LLVoiceClient::participantUpdatedEvent callback is called BEFORE + LLViewerChatterBoxSessionAgentListUpdates::post() sometimes AFTER. + + participantUpdatedEvent updates voice participant state in particular participantState::mIsModeratorMuted + Originally we wanted to update session Speaker Manager to fire LLSpeakerVoiceModerationEvent to fix the EXT-3544 bug. + Calling of the LLSpeakerMgr::update() method was added into LLIMMgr::processAgentListUpdates. + + But in case participantUpdatedEvent() is called after LLViewerChatterBoxSessionAgentListUpdates::post() + voice participant mIsModeratorMuted is changed after speakers are updated in Speaker Manager + and event is not fired. + + So, we have to call LLSpeakerMgr::update() here. In any case it is better than call it + in LLCallFloater::draw() + */ + LLVoiceChannel* voice_cnl = LLVoiceChannel::getCurrentVoiceChannel(); + if (voice_cnl) + { + LLSpeakerMgr* speaker_manager = LLIMModel::getInstance()->getSpeakerManager(voice_cnl->getSessionID()); + if (speaker_manager) + { + speaker_manager->update(true); + } + } } else { |