Add a PrimMediaMasterEnabled debug flag to allow us to disable the media data client
Conceptually reviewed by Monroemaster
parent
e62ee60e11
commit
fc40740e1e
|
|
@ -5470,6 +5470,17 @@
|
|||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>13</integer>
|
||||
</map>
|
||||
<key>PrimMediaMasterEnabled</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether or not Media on a Prim is enabled.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>PrimMediaControlsUseHoverControlSet</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -204,8 +204,8 @@ void LLVOVolume::markDead()
|
|||
if (!mDead)
|
||||
{
|
||||
LLMediaDataClientObject::ptr_t obj = new LLMediaDataClientObjectImpl(const_cast<LLVOVolume*>(this), false);
|
||||
sObjectMediaClient->removeFromQueue(obj);
|
||||
sObjectMediaNavigateClient->removeFromQueue(obj);
|
||||
if (sObjectMediaClient) sObjectMediaClient->removeFromQueue(obj);
|
||||
if (sObjectMediaNavigateClient) sObjectMediaNavigateClient->removeFromQueue(obj);
|
||||
|
||||
// Detach all media impls from this object
|
||||
for(U32 i = 0 ; i < mMediaImplList.size() ; i++)
|
||||
|
|
@ -222,15 +222,18 @@ void LLVOVolume::markDead()
|
|||
void LLVOVolume::initClass()
|
||||
{
|
||||
// gSavedSettings better be around
|
||||
const F32 queue_timer_delay = gSavedSettings.getF32("PrimMediaRequestQueueDelay");
|
||||
const F32 retry_timer_delay = gSavedSettings.getF32("PrimMediaRetryTimerDelay");
|
||||
const U32 max_retries = gSavedSettings.getU32("PrimMediaMaxRetries");
|
||||
const U32 max_sorted_queue_size = gSavedSettings.getU32("PrimMediaMaxSortedQueueSize");
|
||||
const U32 max_round_robin_queue_size = gSavedSettings.getU32("PrimMediaMaxRoundRobinQueueSize");
|
||||
sObjectMediaClient = new LLObjectMediaDataClient(queue_timer_delay, retry_timer_delay, max_retries,
|
||||
max_sorted_queue_size, max_round_robin_queue_size);
|
||||
sObjectMediaNavigateClient = new LLObjectMediaNavigateClient(queue_timer_delay, retry_timer_delay,
|
||||
max_retries, max_sorted_queue_size, max_round_robin_queue_size);
|
||||
if (gSavedSettings.getBOOL("PrimMediaMasterEnabled"))
|
||||
{
|
||||
const F32 queue_timer_delay = gSavedSettings.getF32("PrimMediaRequestQueueDelay");
|
||||
const F32 retry_timer_delay = gSavedSettings.getF32("PrimMediaRetryTimerDelay");
|
||||
const U32 max_retries = gSavedSettings.getU32("PrimMediaMaxRetries");
|
||||
const U32 max_sorted_queue_size = gSavedSettings.getU32("PrimMediaMaxSortedQueueSize");
|
||||
const U32 max_round_robin_queue_size = gSavedSettings.getU32("PrimMediaMaxRoundRobinQueueSize");
|
||||
sObjectMediaClient = new LLObjectMediaDataClient(queue_timer_delay, retry_timer_delay, max_retries,
|
||||
max_sorted_queue_size, max_round_robin_queue_size);
|
||||
sObjectMediaNavigateClient = new LLObjectMediaNavigateClient(queue_timer_delay, retry_timer_delay,
|
||||
max_retries, max_sorted_queue_size, max_round_robin_queue_size);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
@ -1719,14 +1722,15 @@ LLVector3 LLVOVolume::getApproximateFaceNormal(U8 face_id)
|
|||
|
||||
void LLVOVolume::requestMediaDataUpdate(bool isNew)
|
||||
{
|
||||
sObjectMediaClient->fetchMedia(new LLMediaDataClientObjectImpl(this, isNew));
|
||||
if (sObjectMediaClient)
|
||||
sObjectMediaClient->fetchMedia(new LLMediaDataClientObjectImpl(this, isNew));
|
||||
}
|
||||
|
||||
bool LLVOVolume::isMediaDataBeingFetched() const
|
||||
{
|
||||
// I know what I'm doing by const_casting this away: this is just
|
||||
// a wrapper class that is only going to do a lookup.
|
||||
return sObjectMediaClient->isInQueue(new LLMediaDataClientObjectImpl(const_cast<LLVOVolume*>(this), false));
|
||||
return (sObjectMediaClient) ? sObjectMediaClient->isInQueue(new LLMediaDataClientObjectImpl(const_cast<LLVOVolume*>(this), false)) : false;
|
||||
}
|
||||
|
||||
void LLVOVolume::cleanUpMediaImpls()
|
||||
|
|
@ -1925,7 +1929,7 @@ void LLVOVolume::mediaNavigated(LLViewerMediaImpl *impl, LLPluginClassMedia* plu
|
|||
// "bounce back" to the current URL from the media entry
|
||||
mediaNavigateBounceBack(face_index);
|
||||
}
|
||||
else
|
||||
else if (sObjectMediaNavigateClient)
|
||||
{
|
||||
|
||||
llinfos << "broadcasting navigate with URI " << new_location << llendl;
|
||||
|
|
@ -1994,7 +1998,8 @@ void LLVOVolume::mediaEvent(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin,
|
|||
|
||||
void LLVOVolume::sendMediaDataUpdate()
|
||||
{
|
||||
sObjectMediaClient->updateMedia(new LLMediaDataClientObjectImpl(this, false));
|
||||
if (sObjectMediaClient)
|
||||
sObjectMediaClient->updateMedia(new LLMediaDataClientObjectImpl(this, false));
|
||||
}
|
||||
|
||||
void LLVOVolume::removeMediaImpl(S32 texture_index)
|
||||
|
|
|
|||
Loading…
Reference in New Issue