Merge branch 'DRTVWR-545-maint-mix' of https://bitbucket.org/lindenlab/viewer

master
Ansariel 2021-11-10 21:21:51 +01:00
commit b14d460dca
15 changed files with 271 additions and 135 deletions

View File

@ -814,9 +814,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>45dedb5b09995cd794304150e94fcf21</string>
<string>2653c3627fd8687ff9e003425fd14834</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87950/806969/dullahan-1.12.2.202109170444_91.1.21_g9dd45fe_chromium-91.0.4472.114-darwin64-563968.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/90199/821852/dullahan-1.12.3.202111032211_91.1.21_g9dd45fe_chromium-91.0.4472.114-darwin64-565428.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@ -826,9 +826,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>d0fd9d7086699da4bb5ccc935622a717</string>
<string>b4003772562a5dd40bc112eec7cba5f5</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/88276/809277/dullahan-1.12.2.202109230751_91.1.21_g9dd45fe_chromium-91.0.4472.114-windows-563968.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/90201/821871/dullahan-1.12.3.202111032221_91.1.21_g9dd45fe_chromium-91.0.4472.114-windows-565428.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -838,9 +838,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>7e8c3ccd420ff5aef24ff72d609ba394</string>
<string>d9030d7a7390b3bda7de2adcc27e535a</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/88275/809281/dullahan-1.12.2.202109230751_91.1.21_g9dd45fe_chromium-91.0.4472.114-windows64-563968.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/90200/821876/dullahan-1.12.3.202111032221_91.1.21_g9dd45fe_chromium-91.0.4472.114-windows64-565428.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
@ -859,7 +859,7 @@
</map>
</map>
<key>version</key>
<string>1.12.2.202109230751_91.1.21_g9dd45fe_chromium-91.0.4472.114</string>
<string>1.12.3.202111032221_91.1.21_g9dd45fe_chromium-91.0.4472.114</string>
</map>
<key>elfio</key>
<map>

View File

@ -5,7 +5,6 @@ project(media_plugin_cef)
include(Boost)
include(00-Common)
include(LLCommon)
include(LLImage)
include(LLPlugin)
include(LLMath)
include(LLRender)
@ -13,7 +12,6 @@ include(LLWindow)
include(Linking)
include(PluginAPI)
include(MediaPluginBase)
include(OpenGL)
include(CEFPlugin)
@ -22,7 +20,6 @@ include_directories(
${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
${LLCOMMON_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
${LLIMAGE_INCLUDE_DIRS}
${LLRENDER_INCLUDE_DIRS}
${LLWINDOW_INCLUDE_DIRS}
${CEF_INCLUDE_DIR}

View File

@ -29,7 +29,7 @@
#include "linden_common.h"
#include "indra_constants.h" // for indra keyboard codes
#include "llgl.h"
#include "llglheaders.h" // for GL_* constants
#include "llsdutil.h"
#include "llplugininstance.h"
#include "llpluginmessage.h"
@ -37,9 +37,6 @@
#include "volume_catcher.h"
#include "media_plugin_base.h"
#include <functional>
#include <chrono>
#include "dullahan.h"
#include "dullahan_version.h"

View File

@ -283,35 +283,16 @@ void MediaPluginLibVLC::playMedia()
return;
}
// A new call to play the media is received after the initial one. Typically
// this is due to a size change request either as the media naturally resizes
// to the size of the prim container, or else, as a 2D window is resized by the
// user. Stopping the media, helps avoid a race condition where the media pixel
// buffer size is out of sync with the declared size (width/height) for a frame
// or two and the plugin crashes as VLC tries to decode a frame into unallocated
// memory.
if (mLibVLCMediaPlayer)
{
// stop listening to events while we reset things
libvlc_event_manager_t* em = libvlc_media_player_event_manager(mLibVLCMediaPlayer);
if (em)
{
libvlc_event_detach(em, libvlc_MediaPlayerOpening, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerPlaying, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerPaused, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerStopped, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerEndReached, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerEncounteredError, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerTimeChanged, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerPositionChanged, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerLengthChanged, eventCallbacks, NULL);
libvlc_event_detach(em, libvlc_MediaPlayerTitleChanged, eventCallbacks, NULL);
};
libvlc_media_player_stop(mLibVLCMediaPlayer);
libvlc_media_player_release(mLibVLCMediaPlayer);
mLibVLCMediaPlayer = 0;
}
if (mLibVLCMedia)
{
libvlc_media_release(mLibVLCMedia);
mLibVLCMedia = 0;
}
mLibVLCMedia = libvlc_media_new_location(mLibVLC, mURL.c_str());
@ -345,6 +326,9 @@ void MediaPluginLibVLC::playMedia()
libvlc_event_attach(em, libvlc_MediaPlayerTitleChanged, eventCallbacks, this);
}
libvlc_video_set_callbacks(mLibVLCMediaPlayer, lock, unlock, display, &mLibVLCCallbackContext);
libvlc_video_set_format(mLibVLCMediaPlayer, "RV32", mWidth, mHeight, mWidth * mDepth);
mLibVLCCallbackContext.parent = this;
mLibVLCCallbackContext.texture_pixels = mPixels;
mLibVLCCallbackContext.mp = mLibVLCMediaPlayer;
@ -366,14 +350,11 @@ void MediaPluginLibVLC::playMedia()
setStatus(STATUS_LOADED);
libvlc_video_set_callbacks(mLibVLCMediaPlayer, lock, unlock, display, &mLibVLCCallbackContext);
libvlc_video_set_format(mLibVLCMediaPlayer, "RV32", mWidth, mHeight, mWidth * mDepth);
// note this relies on the "set_loop" message arriving before the "start" (play) one
// but that appears to always be the case
if (mIsLooping)
{
libvlc_media_add_option(mLibVLCMedia, "input-repeat=-1");
libvlc_media_add_option(mLibVLCMedia, "input-repeat=65535");
}
libvlc_media_player_play(mLibVLCMediaPlayer);

View File

@ -2684,10 +2684,8 @@ if (DARWIN)
# SIGH, as of 2018-05-24 (cmake 3.11.1) the INSTALL_RPATH property simply
# does not work. Try this:
LINK_FLAGS "-rpath @loader_path/../Frameworks"
MACOSX_BUNDLE_INFO_PLIST
# <FS:CR> Use Firestorm plist
#"${CMAKE_CURRENT_SOURCE_DIR}/Info-SecondLife.plist"
"${CMAKE_CURRENT_SOURCE_DIR}/Info-Firestorm.plist"
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info-Firestorm.plist"
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${MACOSX_BUNDLE_GUI_IDENTIFIER}"
)
set(VIEWER_APP_BUNDLE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app")

View File

@ -11,7 +11,7 @@
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>

View File

@ -1804,6 +1804,12 @@ bool LLAppViewer::doFrame()
FSZoneN("Shutdown:SaveSnapshot");
pauseMainloopTimeout();
saveFinalSnapshot();
if (LLVoiceClient::instanceExists())
{
LLVoiceClient::getInstance()->terminate();
}
disconnectViewer();
resumeMainloopTimeout();
}

View File

@ -463,7 +463,7 @@ void LLPanelFace::sendBump(U32 bumpiness)
//
LLSelectedTEMaterial::setNormalID(this, current_normal_map);
LLSelectMgr::getInstance()->selectionSetBumpmap( bump );
LLSelectMgr::getInstance()->selectionSetBumpmap( bump, bumpytexture_ctrl->getImageItemID() );
}
void LLPanelFace::sendTexGen()
@ -495,7 +495,7 @@ void LLPanelFace::sendShiny(U32 shininess)
LLSelectedTEMaterial::setSpecularID(this, specmap);
LLSelectMgr::getInstance()->selectionSetShiny( shiny );
LLSelectMgr::getInstance()->selectionSetShiny( shiny, texture_ctrl->getImageItemID() );
updateShinyControls(!specmap.isNull(), true);

View File

@ -50,6 +50,7 @@
//#include "llfirstuse.h"
#include "llfocusmgr.h"
#include "llmanipscale.h"
#include "llinventorymodel.h"
#include "llpreviewscript.h"
#include "llresmgr.h"
#include "llselectmgr.h"
@ -57,6 +58,7 @@
#include "lltextbox.h"
#include "lltool.h"
#include "lltoolcomp.h"
#include "lltooldraganddrop.h"
#include "lltoolmgr.h"
#include "lltrans.h"
#include "llui.h"
@ -783,7 +785,7 @@ void LLPanelVolume::onLightCancelTexture(const LLSD& data)
// selection of "None" texture.
LLUUID tex_id = LightTextureCtrl->getImageAssetID();
bool is_spotlight = volobjp->isLightSpotlight();
volobjp->setLightTextureID(tex_id); //updates spotlight
setLightTextureID(tex_id, LightTextureCtrl->getImageItemID(), volobjp); //updates spotlight
if (!is_spotlight && tex_id.notNull())
{
@ -828,7 +830,7 @@ void LLPanelVolume::onLightSelectTexture(const LLSD& data)
if(LightTextureCtrl)
{
LLUUID id = LightTextureCtrl->getImageAssetID();
volobjp->setLightTextureID(id);
setLightTextureID(id, LightTextureCtrl->getImageItemID(), volobjp);
}
}
@ -891,11 +893,12 @@ void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata )
if(LightTextureCtrl)
{
LLUUID id = LightTextureCtrl->getImageAssetID();
LLUUID item_id = LightTextureCtrl->getImageItemID();
if (id.notNull())
{
if (!volobjp->isLightSpotlight())
{ //this commit is making this a spot light, set UI to default params
volobjp->setLightTextureID(id);
setLightTextureID(id, item_id, volobjp);
LLVector3 spot_params = volobjp->getSpotLightParams();
self->getChild<LLUICtrl>("Light FOV")->setValue(spot_params.mV[0]);
self->getChild<LLUICtrl>("Light Focus")->setValue(spot_params.mV[1]);
@ -905,7 +908,7 @@ void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata )
{ //modifying existing params, this time volobjp won't change params on its own.
if (volobjp->getLightTextureID() != id)
{
volobjp->setLightTextureID(id);
setLightTextureID(id, item_id, volobjp);
}
LLVector3 spot_params;
@ -917,7 +920,7 @@ void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata )
}
else if (volobjp->isLightSpotlight())
{ //no longer a spot light
volobjp->setLightTextureID(id);
setLightTextureID(id, item_id, volobjp);
//self->getChildView("Light FOV")->setEnabled(FALSE);
//self->getChildView("Light Focus")->setEnabled(FALSE);
//self->getChildView("Light Ambiance")->setEnabled(FALSE);
@ -934,6 +937,19 @@ void LLPanelVolume::onCommitIsLight( LLUICtrl* ctrl, void* userdata )
self->sendIsLight();
}
// static
void LLPanelVolume::setLightTextureID(const LLUUID &asset_id, const LLUUID &item_id, LLVOVolume* volobjp)
{
if (volobjp)
{
LLViewerInventoryItem* item = gInventory.getItem(item_id);
if (item && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()))
{
LLToolDragAndDrop::handleDropTextureProtections(volobjp, item, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null);
}
volobjp->setLightTextureID(asset_id);
}
}
//----------------------------------------------------------------------------
// static

View File

@ -40,6 +40,7 @@ class LLButton;
class LLViewerObject;
class LLComboBox;
class LLColorSwatchCtrl;
class LLVOVolume;
class LLPanelVolume : public LLPanel
{
@ -73,6 +74,8 @@ public:
void onLightCancelTexture(const LLSD& data);
void onLightSelectTexture(const LLSD& data);
static void setLightTextureID(const LLUUID &asset_id, const LLUUID &item_id, LLVOVolume* volobjp);
protected:
void getState();

View File

@ -2022,7 +2022,7 @@ BOOL LLSelectMgr::selectionRevertTextures()
return revert_successful;
}
void LLSelectMgr::selectionSetBumpmap(U8 bumpmap)
void LLSelectMgr::selectionSetBumpmap(U8 bumpmap, const LLUUID &image_id)
{
struct f : public LLSelectedTEFunctor
{
@ -2038,7 +2038,22 @@ void LLSelectMgr::selectionSetBumpmap(U8 bumpmap)
return true;
}
} setfunc(bumpmap);
getSelection()->applyToTEs(&setfunc);
LLViewerInventoryItem* item = gInventory.getItem(image_id);
if(item
&& !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())
&& (mSelectedObjects->getNumNodes() > 1) )
{
LL_WARNS() << "Attempted to apply no-copy texture to multiple objects" << LL_ENDL;
return;
}
if (item && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()))
{
LLViewerObject *object = mSelectedObjects->getFirstRootObject();
if (!object) return;
LLToolDragAndDrop::handleDropTextureProtections(object, item, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null);
}
getSelection()->applyToTEs(&setfunc);
LLSelectMgrSendFunctor sendfunc;
getSelection()->applyToObjects(&sendfunc);
@ -2067,7 +2082,7 @@ void LLSelectMgr::selectionSetTexGen(U8 texgen)
}
void LLSelectMgr::selectionSetShiny(U8 shiny)
void LLSelectMgr::selectionSetShiny(U8 shiny, const LLUUID &image_id)
{
struct f : public LLSelectedTEFunctor
{
@ -2083,7 +2098,22 @@ void LLSelectMgr::selectionSetShiny(U8 shiny)
return true;
}
} setfunc(shiny);
getSelection()->applyToTEs(&setfunc);
LLViewerInventoryItem* item = gInventory.getItem(image_id);
if(item
&& !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())
&& (mSelectedObjects->getNumNodes() > 1) )
{
LL_WARNS() << "Attempted to apply no-copy texture to multiple objects" << LL_ENDL;
return;
}
if (item && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()))
{
LLViewerObject *object = mSelectedObjects->getFirstRootObject();
if (!object) return;
LLToolDragAndDrop::handleDropTextureProtections(object, item, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null);
}
getSelection()->applyToTEs(&setfunc);
LLSelectMgrSendFunctor sendfunc;
getSelection()->applyToObjects(&sendfunc);

View File

@ -682,9 +682,9 @@ public:
void selectionRevertColors();
void selectionRevertShinyColors();
BOOL selectionRevertTextures();
void selectionSetBumpmap( U8 bumpmap );
void selectionSetBumpmap( U8 bumpmap, const LLUUID &image_id );
void selectionSetTexGen( U8 texgen );
void selectionSetShiny( U8 shiny );
void selectionSetShiny( U8 shiny, const LLUUID &image_id );
void selectionSetFullbright( U8 fullbright );
void selectionSetMedia( U8 media_type, const LLSD &media_data );
void selectionSetClickAction(U8 action);

View File

@ -401,6 +401,11 @@ void LLVivoxVoiceClient::init(LLPumpIO *pump)
void LLVivoxVoiceClient::terminate()
{
if (sShuttingDown)
{
return;
}
// needs to be done manually here since we will not get another pass in
// coroutines... that mechanism is long since gone.
if (mIsLoggedIn)
@ -1242,6 +1247,11 @@ bool LLVivoxVoiceClient::provisionVoiceAccount()
LLVoiceVivoxStats::getInstance()->provisionAttemptStart();
result = httpAdapter->postAndSuspend(httpRequest, url, LLSD(), httpOpts);
if (sShuttingDown)
{
return false;
}
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@ -1249,14 +1259,12 @@ bool LLVivoxVoiceClient::provisionVoiceAccount()
{
F32 timeout = pow(PROVISION_RETRY_TIMEOUT, static_cast<float>(retryCount));
LL_WARNS("Voice") << "Provision CAP 404. Retrying in " << timeout << " seconds. Retries: " << (S32)retryCount << LL_ENDL;
llcoro::suspendUntilTimeout(timeout);
if (sShuttingDown)
{
return false;
}
else
{
llcoro::suspendUntilTimeout(timeout);
}
}
else if (!status)
{
@ -1631,6 +1639,11 @@ bool LLVivoxVoiceClient::requestParcelVoiceInfo()
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, LLSD());
if (sShuttingDown)
{
return false;
}
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@ -1736,6 +1749,11 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession)
llcoro::suspend();
if (sShuttingDown)
{
return false;
}
LLSD result;
if (mSpatialJoiningNum == MAX_NORMAL_JOINING_SPATIAL_NUM)
@ -1801,7 +1819,6 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession)
if (sShuttingDown)
{
mIsJoiningSession = false;
return false;
}
@ -1924,6 +1941,11 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait)
result = llcoro::suspendUntilEventOnWithTimeout(mVivoxPump, LOGOUT_ATTEMPT_TIMEOUT, timeoutResult);
if (sShuttingDown)
{
return false;
}
LL_DEBUGS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL;
if (result.has("session"))
{
@ -1988,54 +2010,76 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait)
return status;
}
typedef enum e_voice_wait_for_channel_state
{
VOICE_CHANNEL_STATE_LOGIN = 0, // entry point
VOICE_CHANNEL_STATE_CHECK_EFFECTS,
VOICE_CHANNEL_STATE_START_CHANNEL_PROCESSING,
VOICE_CHANNEL_STATE_PROCESS_CHANNEL,
VOICE_CHANNEL_STATE_NEXT_CHANNEL_DELAY,
VOICE_CHANNEL_STATE_NEXT_CHANNEL_CHECK,
VOICE_CHANNEL_STATE_LOGOUT,
VOICE_CHANNEL_STATE_RELOG,
VOICE_CHANNEL_STATE_DONE,
} EVoiceWaitForChannelState;
bool LLVivoxVoiceClient::waitForChannel()
{
LL_INFOS("Voice") << "Waiting for channel" << LL_ENDL;
EVoiceWaitForChannelState state = VOICE_CHANNEL_STATE_LOGIN;
do
{
if (!loginToVivox())
{
return false;
}
if (sShuttingDown)
{
// terminate() forcefully disconects voice, no need for cleanup
return false;
}
if (LLVoiceClient::instance().getVoiceEffectEnabled())
switch (state)
{
retrieveVoiceFonts();
if (sShuttingDown)
case VOICE_CHANNEL_STATE_LOGIN:
if (!loginToVivox())
{
return false;
}
state = VOICE_CHANNEL_STATE_CHECK_EFFECTS;
break;
// Request the set of available voice fonts.
refreshVoiceEffectLists(false);
}
#if USE_SESSION_GROUPS
// Rider: This code is completely unchanged from the original state machine
// It does not seem to be in active use... but I'd rather not rip it out.
// create the main session group
setState(stateCreatingSessionGroup);
sessionGroupCreateSendMessage();
#endif
do
{
mIsProcessingChannels = true;
llcoro::suspend();
if (sShuttingDown)
case VOICE_CHANNEL_STATE_CHECK_EFFECTS:
if (LLVoiceClient::instance().getVoiceEffectEnabled())
{
mRelogRequested = false;
break;
retrieveVoiceFonts();
if (sShuttingDown)
{
return false;
}
// Request the set of available voice fonts.
refreshVoiceEffectLists(false);
}
#if USE_SESSION_GROUPS
// Rider: This code is completely unchanged from the original state machine
// It does not seem to be in active use... but I'd rather not rip it out.
// create the main session group
setState(stateCreatingSessionGroup);
sessionGroupCreateSendMessage();
#endif
state = VOICE_CHANNEL_STATE_START_CHANNEL_PROCESSING;
break;
case VOICE_CHANNEL_STATE_START_CHANNEL_PROCESSING:
mIsProcessingChannels = true;
llcoro::suspend();
state = VOICE_CHANNEL_STATE_PROCESS_CHANNEL;
break;
case VOICE_CHANNEL_STATE_PROCESS_CHANNEL:
if (mTuningMode)
{
performMicTuning();
@ -2079,63 +2123,91 @@ bool LLVivoxVoiceClient::waitForChannel()
}
}
if (!mNextAudioSession && !sShuttingDown)
state = VOICE_CHANNEL_STATE_NEXT_CHANNEL_DELAY;
break;
case VOICE_CHANNEL_STATE_NEXT_CHANNEL_DELAY:
if (!mNextAudioSession)
{
llcoro::suspendUntilTimeout(1.0);
}
state = VOICE_CHANNEL_STATE_NEXT_CHANNEL_CHECK;
break;
if (sShuttingDown)
case VOICE_CHANNEL_STATE_NEXT_CHANNEL_CHECK:
if (mVoiceEnabled && !mRelogRequested)
{
mRelogRequested = false;
state = VOICE_CHANNEL_STATE_START_CHANNEL_PROCESSING;
break;
}
else
{
mIsProcessingChannels = false;
LL_DEBUGS("Voice")
<< "leaving inner waitForChannel loop"
<< " RelogRequested=" << mRelogRequested
<< " VoiceEnabled=" << mVoiceEnabled
<< LL_ENDL;
state = VOICE_CHANNEL_STATE_LOGOUT;
break;
}
} while (!sShuttingDown && mVoiceEnabled && !mRelogRequested);
case VOICE_CHANNEL_STATE_LOGOUT:
logoutOfVivox(true /*bool wait*/);
if (mRelogRequested)
{
state = VOICE_CHANNEL_STATE_RELOG;
}
else
{
state = VOICE_CHANNEL_STATE_DONE;
}
break;
if (!sShuttingDown)
{
LL_DEBUGS("Voice")
<< "leaving inner waitForChannel loop"
<< " RelogRequested=" << mRelogRequested
<< " VoiceEnabled=" << mVoiceEnabled
<< LL_ENDL;
}
else
{
// if sShuttingDown is set, we already logged out
LL_DEBUGS("Voice") << "leaving inner waitForChannel loop." << LL_ENDL;
return false;
}
mIsProcessingChannels = false;
logoutOfVivox(!sShuttingDown /*bool wait*/);
if (mRelogRequested && !sShuttingDown)
{
case VOICE_CHANNEL_STATE_RELOG:
LL_DEBUGS("Voice") << "Relog Requested, restarting provisioning" << LL_ENDL;
if (!provisionVoiceAccount())
{
if (sShuttingDown)
{
return false;
}
LL_WARNS("Voice") << "provisioning voice failed; giving up" << LL_ENDL;
giveUp();
return false;
}
if (mVoiceEnabled && mRelogRequested && isGatewayRunning())
{
state = VOICE_CHANNEL_STATE_LOGIN;
}
else
{
state = VOICE_CHANNEL_STATE_DONE;
}
break;
case VOICE_CHANNEL_STATE_DONE:
LL_DEBUGS("Voice")
<< "exiting"
<< " RelogRequested=" << mRelogRequested
<< " VoiceEnabled=" << mVoiceEnabled
<< LL_ENDL;
return !sShuttingDown;
}
} while (!sShuttingDown && mVoiceEnabled && mRelogRequested && isGatewayRunning());
LL_DEBUGS("Voice")
<< "exiting"
<< " RelogRequested=" << mRelogRequested
<< " VoiceEnabled=" << mVoiceEnabled
<< LL_ENDL;
return !sShuttingDown;
} while (true);
}
bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)
{
LL_INFOS("Voice") << "running new voice session " << session->mHandle << LL_ENDL;
if (!addAndJoinSession(session))
bool joined_session = addAndJoinSession(session);
if (sShuttingDown)
{
return false;
}
if (!joined_session)
{
notifyStatusObservers(LLVoiceClientStatusObserver::ERROR_UNKNOWN);
@ -2159,9 +2231,19 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)
mIsInChannel = true;
mMuteMicDirty = true;
while (mVoiceEnabled && isGatewayRunning() && !mSessionTerminateRequested && !mTuningMode)
while (!sShuttingDown
&& mVoiceEnabled
&& isGatewayRunning()
&& !mSessionTerminateRequested
&& !mTuningMode)
{
sendCaptureAndRenderDevices(); // suspends
if (sShuttingDown)
{
return false;
}
if (mSessionTerminateRequested)
{
break;
@ -2191,10 +2273,15 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)
// cap for the parcel voice info. If we can't request it
// then we don't have the cap URL so we do nothing and will
// recheck next time around
if (requestParcelVoiceInfo())
if (requestParcelVoiceInfo()) // suspends
{ // The parcel voice URI has changed.. break out and reconnect.
break;
}
if (sShuttingDown)
{
return false;
}
}
// Do the calculation that enforces the listener<->speaker tether (and also updates the real camera position)
enforceTether();
@ -2213,6 +2300,12 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)
mIsInitialized = true;
LLSD result = llcoro::suspendUntilEventOnWithTimeout(mVivoxPump, UPDATE_THROTTLE_SECONDS, timeoutEvent);
if (sShuttingDown)
{
return false;
}
if (!result.has("timeout")) // logging the timeout event spams the log
{
LL_DEBUGS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL;
@ -2255,6 +2348,11 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)
}
}
if (sShuttingDown)
{
return false;
}
mIsInChannel = false;
LL_DEBUGS("Voice") << "terminating at end of runSession" << LL_ENDL;
terminateAudioSession(true);

View File

@ -4,5 +4,13 @@
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.automation.apple-events</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
</dict>
</plist>

View File

@ -1590,8 +1590,10 @@ class DarwinManifest(ViewerManifest):
dylibexecutable)
# copy LibVLC plugin itself
self.path2basename("../media_plugins/libvlc/" + self.args['configuration'],
"media_plugin_libvlc.dylib")
dylibexecutable = 'media_plugin_libvlc.dylib'
self.path2basename("../media_plugins/libvlc/" + self.args['configuration'], dylibexecutable)
# add @rpath for the correct LibVLC subfolder
self.run_command(['install_name_tool', '-add_rpath', '@loader_path/lib', self.dst_path_of(dylibexecutable)])
# copy LibVLC dynamic libraries
with self.prefix(src=os.path.join(self.args['build'], os.pardir, 'packages', 'lib', 'release' ), dst="lib"):
@ -1764,7 +1766,7 @@ class DarwinManifest(ViewerManifest):
self.run_command(['codesign', '--force', '--timestamp', '--keychain', viewer_keychain, '--sign', identity, cef_path])
self.run_command(['codesign', '--force', '--timestamp', '--keychain', viewer_keychain, '--sign', identity, greenlet_path])
self.run_command(['codesign', '--verbose', '--deep', '--force', '--options', 'runtime', '--keychain', viewer_keychain, '--sign', identity, slplugin_path])
self.run_command(['codesign', '--verbose', '--deep', '--force', '--options', 'runtime', '--keychain', viewer_keychain, '--sign', identity, app_in_dmg])
self.run_command(['codesign', '--verbose', '--deep', '--force', '--entitlements', self.src_path_of("slplugin.entitlements"), '--options', 'runtime', '--keychain', viewer_keychain, '--sign', identity, app_in_dmg])
signed=True # if no exception was raised, the codesign worked
except ManifestError as err:
if sign_attempts: