aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerparcelmedia.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:37 -0500
committerJacek Antonelli2008-08-15 23:45:37 -0500
commit31ba05810c641f14e8ab5da8ad2aaf527779f6c1 (patch)
treec4b8d635dfb657fa4cfee7c285f8cadbf24afa90 /linden/indra/newview/llviewerparcelmedia.cpp
parentSecond Life viewer sources 1.19.1.1 (diff)
downloadmeta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.zip
meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.tar.gz
meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.tar.bz2
meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.tar.xz
Second Life viewer sources 1.19.1.2
Diffstat (limited to 'linden/indra/newview/llviewerparcelmedia.cpp')
-rw-r--r--linden/indra/newview/llviewerparcelmedia.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/linden/indra/newview/llviewerparcelmedia.cpp b/linden/indra/newview/llviewerparcelmedia.cpp
index 2925b8d..9180fb2 100644
--- a/linden/indra/newview/llviewerparcelmedia.cpp
+++ b/linden/indra/newview/llviewerparcelmedia.cpp
@@ -41,6 +41,7 @@
41#include "lluuid.h" 41#include "lluuid.h"
42#include "message.h" 42#include "message.h"
43#include "llviewerparcelmediaautoplay.h" 43#include "llviewerparcelmediaautoplay.h"
44#include "llviewerwindow.h"
44#include "llfirstuse.h" 45#include "llfirstuse.h"
45 46
46// Static Variables 47// Static Variables
@@ -48,6 +49,9 @@
48S32 LLViewerParcelMedia::sMediaParcelLocalID = 0; 49S32 LLViewerParcelMedia::sMediaParcelLocalID = 0;
49LLUUID LLViewerParcelMedia::sMediaRegionID; 50LLUUID LLViewerParcelMedia::sMediaRegionID;
50 51
52// Local functions
53void callback_play_media(S32 option, void* data);
54
51// Move this to its own file. 55// Move this to its own file.
52// helper class that tries to download a URL from a web site and calls a method 56// helper class that tries to download a URL from a web site and calls a method
53// on the Panel Land Media and to discover the MIME type 57// on the Panel Land Media and to discover the MIME type
@@ -152,6 +156,14 @@ void LLViewerParcelMedia::update(LLParcel* parcel)
152 LLViewerMedia::setMimeType(parcel->getMediaType()); 156 LLViewerMedia::setMimeType(parcel->getMediaType());
153 } 157 }
154 158
159 // First use warning
160 if( gSavedSettings.getWarning("FirstStreamingVideo") )
161 {
162 gViewerWindow->alertXml("ParcelCanPlayMedia",
163 callback_play_media, (void*)parcel);
164
165 }
166
155 } 167 }
156 } 168 }
157 else 169 else
@@ -361,3 +373,20 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg, void *
361 } 373 }
362 } 374 }
363} 375}
376
377void callback_play_media(S32 option, void* data)
378{
379 LLParcel* parcel = (LLParcel*)data;
380 if (option == 0)
381 {
382 gSavedSettings.setBOOL("AudioStreamingVideo", TRUE);
383 LLViewerParcelMedia::play(parcel);
384 }
385 else
386 {
387 gSavedSettings.setBOOL("AudioStreamingVideo", FALSE);
388 }
389 gSavedSettings.setWarning("FirstStreamingVideo", FALSE);
390
391}
392