Merge branch 'Moap' of git://github.com/Shyotl/SingularityViewer into VoiceUpdate

Conflicts:
	indra/newview/llfloateractivespeakers.h - llparticipantlist.h got changed from a panel to a layoutpanel
	indra/newview/lloverlaybar.cpp - Silly conflict, I change one line, Shyotl changes the next two.

Compile fixies:
	indra/newview/llavataractions.cpp needed to include llnotifications.h
	indra/newview/llvoicechannel.cpp needed to include llnotifications.h
This commit is contained in:
Lirusaito
2013-06-23 22:36:04 -04:00
parent 498b63be99
commit 3739639295
177 changed files with 9426 additions and 1650 deletions

View File

@@ -35,12 +35,14 @@
#include "llviewerparcelmedia.h"
#include "llviewercontrol.h"
#include "llviewermedia.h"
#include "llviewerregion.h"
#include "llparcel.h"
#include "llviewerparcelmgr.h"
#include "lluuid.h"
#include "message.h"
#include "llviewertexturelist.h" // for texture stats
#include "llagent.h"
#include "llmimetypes.h"
const F32 AUTOPLAY_TIME = 5; // how many seconds before we autoplay
const F32 AUTOPLAY_SIZE = 24*24; // how big the texture must be (pixel area) before we autoplay
@@ -48,6 +50,8 @@ const F32 AUTOPLAY_SPEED = 0.1f; // how slow should the agent be moving t
LLViewerParcelMediaAutoPlay::LLViewerParcelMediaAutoPlay() :
LLEventTimer(1),
mLastParcelID(-1),
mPlayed(FALSE),
mTimeInParcel(0)
{
@@ -81,39 +85,54 @@ void LLViewerParcelMediaAutoPlay::playStarted()
BOOL LLViewerParcelMediaAutoPlay::tick()
{
LLParcel *this_parcel = NULL;
LLViewerRegion *this_region = NULL;
std::string this_media_url;
std::string this_media_type;
LLUUID this_media_texture_id;
S32 this_parcel_id = 0;
LLUUID this_region_id;
this_region = gAgent.getRegion();
if (this_region)
{
this_region_id = this_region->getRegionID();
}
this_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (this_parcel)
{
this_media_url = std::string(this_parcel->getMediaURL());
this_media_url = this_parcel->getMediaURL();
this_media_type = this_parcel->getMediaType();
this_media_texture_id = this_parcel->getMediaID();
this_parcel_id = this_parcel->getLocalID();
}
if (this_parcel_id != mLastParcelID)
if (this_parcel_id != mLastParcelID ||
this_region_id != mLastRegionID)
{
// we've entered a new parcel
mPlayed = FALSE; // we haven't autoplayed yet
mTimeInParcel = 0; // reset our timer
mLastParcelID = this_parcel_id;
mLastRegionID = this_region_id;
}
mTimeInParcel += mPeriod; // increase mTimeInParcel by the amount of time between ticks
mTimeInParcel += mPeriod; // increase mTimeInParcel by the amount of time between ticks
if ((!mPlayed) && // if we've never played
(mTimeInParcel > AUTOPLAY_TIME) && // and if we've been here for so many seconds
(this_media_url.size() != 0) && // and if the parcel has media
(LLViewerParcelMedia::sMediaImpl.isNull())) // and if the media is not already playing
if ((!mPlayed) && // if we've never played
(mTimeInParcel > AUTOPLAY_TIME) && // and if we've been here for so many seconds
(!this_media_url.empty()) && // and if the parcel has media
(stricmp(this_media_type.c_str(), LLMIMETypes::getDefaultMimeType().c_str()) != 0) &&
(LLViewerParcelMedia::sMediaImpl.isNull())) // and if the media is not already playing
{
if (this_media_texture_id.notNull()) // and if the media texture is good
if (this_media_texture_id.notNull()) // and if the media texture is good
{
LLViewerTexture *image = LLViewerTextureManager::getFetchedTexture(this_media_texture_id, FALSE);
LLViewerMediaTexture *image = LLViewerTextureManager::getMediaTexture(this_media_texture_id, FALSE) ;
F32 image_size = 0;