diff options
author | Jay Threeth | 2011-04-05 03:09:17 -0700 |
---|---|---|
committer | Jay Threeth | 2011-04-05 03:09:17 -0700 |
commit | 7843f404157f43cb35f976e60438a4eace089ae1 (patch) | |
tree | d8deb6f999d8aeded128baca4e307916f2667866 /linden/indra/newview/llviewerparcelmedia.h | |
parent | Gui fix (diff) | |
parent | Shift the console up by a magic number to not cover the login panel. (diff) | |
download | meta-impy-7843f404157f43cb35f976e60438a4eace089ae1.zip meta-impy-7843f404157f43cb35f976e60438a4eace089ae1.tar.gz meta-impy-7843f404157f43cb35f976e60438a4eace089ae1.tar.bz2 meta-impy-7843f404157f43cb35f976e60438a4eace089ae1.tar.xz |
Merge branch 'exp' of github.com:onefang/meta-impy into libotr
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llviewerparcelmedia.h | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/linden/indra/newview/llviewerparcelmedia.h b/linden/indra/newview/llviewerparcelmedia.h index 7531a0f..f4c4312 100644 --- a/linden/indra/newview/llviewerparcelmedia.h +++ b/linden/indra/newview/llviewerparcelmedia.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #define LLVIEWERPARCELMEDIA_H | 34 | #define LLVIEWERPARCELMEDIA_H |
35 | 35 | ||
36 | #include "llviewermedia.h" | 36 | #include "llviewermedia.h" |
37 | #include "llmemory.h" | ||
37 | 38 | ||
38 | // For use by other patches so they know that media filtering is implemented. | 39 | // For use by other patches so they know that media filtering is implemented. |
39 | #define MEDIA_FILTERING 1 | 40 | #define MEDIA_FILTERING 1 |
@@ -41,6 +42,7 @@ | |||
41 | class LLMessageSystem; | 42 | class LLMessageSystem; |
42 | class LLParcel; | 43 | class LLParcel; |
43 | class LLViewerParcelMediaNavigationObserver; | 44 | class LLViewerParcelMediaNavigationObserver; |
45 | class LLViewerParcelMediaInfo; | ||
44 | 46 | ||
45 | 47 | ||
46 | // This class understands land parcels, network traffic, LSL media | 48 | // This class understands land parcels, network traffic, LSL media |
@@ -49,6 +51,13 @@ class LLViewerParcelMediaNavigationObserver; | |||
49 | class LLViewerParcelMedia : public LLViewerMediaObserver | 51 | class LLViewerParcelMedia : public LLViewerMediaObserver |
50 | { | 52 | { |
51 | LOG_CLASS(LLViewerParcelMedia); | 53 | LOG_CLASS(LLViewerParcelMedia); |
54 | private: | ||
55 | typedef enum e_command_origin | ||
56 | { | ||
57 | COMMAND_ORIGIN_LOCAL, | ||
58 | COMMAND_ORIGIN_REMOTE | ||
59 | } ECommandOrigin; | ||
60 | |||
52 | public: | 61 | public: |
53 | static void initClass(); | 62 | static void initClass(); |
54 | static void cleanupClass(); | 63 | static void cleanupClass(); |
@@ -57,14 +66,14 @@ class LLViewerParcelMedia : public LLViewerMediaObserver | |||
57 | // called when the agent's parcel has a new URL, or the agent has | 66 | // called when the agent's parcel has a new URL, or the agent has |
58 | // walked on to a new parcel with media | 67 | // walked on to a new parcel with media |
59 | 68 | ||
60 | static void play(LLParcel* parcel, bool filter = true); | 69 | static void play(LLParcel* parcel, bool filter = true, const ECommandOrigin origin = COMMAND_ORIGIN_LOCAL); |
61 | // user clicked play button in media transport controls | 70 | // user clicked play button in media transport controls |
62 | static void playStreamingMusic(LLParcel* parcel, bool filter = true); | 71 | static void playStreamingMusic(LLParcel* parcel, bool filter = true); |
63 | // play the parcel music stream | 72 | // play the parcel music stream |
64 | static void stopStreamingMusic(); | 73 | static void stopStreamingMusic(); |
65 | // stop the parcel music stream | 74 | // stop the parcel music stream |
66 | 75 | ||
67 | static void filterMedia(LLParcel* parcel, U32 type); // type: 0 = media, 1 = streaming music | 76 | static void filterMedia(LLParcel* parcel, U32 type, const ECommandOrigin origin); // type: 0 = media, 1 = streaming music |
68 | static bool allowedMedia(std::string media_url); | 77 | static bool allowedMedia(std::string media_url); |
69 | 78 | ||
70 | static bool loadDomainFilterList(); | 79 | static bool loadDomainFilterList(); |
@@ -90,6 +99,7 @@ class LLViewerParcelMedia : public LLViewerMediaObserver | |||
90 | 99 | ||
91 | static void processParcelMediaCommandMessage( LLMessageSystem *msg, void ** ); | 100 | static void processParcelMediaCommandMessage( LLMessageSystem *msg, void ** ); |
92 | static void processParcelMediaUpdate( LLMessageSystem *msg, void ** ); | 101 | static void processParcelMediaUpdate( LLMessageSystem *msg, void ** ); |
102 | static void undoParcelMediaUpdate(); // reset the parcel's media to what it was before ParcelMediaUpdate | ||
93 | static void sendMediaNavigateMessage(const std::string& url); | 103 | static void sendMediaNavigateMessage(const std::string& url); |
94 | 104 | ||
95 | // inherited from LLViewerMediaObserver | 105 | // inherited from LLViewerMediaObserver |
@@ -107,6 +117,7 @@ class LLViewerParcelMedia : public LLViewerMediaObserver | |||
107 | static std::set<std::string> sMediaQueries; | 117 | static std::set<std::string> sMediaQueries; |
108 | static std::set<std::string> sAllowedMedia; | 118 | static std::set<std::string> sAllowedMedia; |
109 | static std::set<std::string> sDeniedMedia; | 119 | static std::set<std::string> sDeniedMedia; |
120 | static LLPointer<LLViewerParcelMediaInfo> sSavedMediaInfo; // The parcel original media (before a remote command is applied) | ||
110 | }; | 121 | }; |
111 | 122 | ||
112 | 123 | ||
@@ -120,4 +131,29 @@ public: | |||
120 | 131 | ||
121 | }; | 132 | }; |
122 | 133 | ||
134 | class LLViewerParcelMediaInfo : public LLRefCount | ||
135 | { | ||
136 | public: | ||
137 | LLViewerParcelMediaInfo(const std::string url, | ||
138 | const std::string type, | ||
139 | const LLUUID media_id, | ||
140 | const S32 width, | ||
141 | const S32 height, | ||
142 | const U8 scale, | ||
143 | const U8 loop); | ||
144 | LLViewerParcelMediaInfo(const LLParcel* parcel); | ||
145 | ~LLViewerParcelMediaInfo() {} | ||
146 | void applyToParcel(LLParcel* parcel); | ||
147 | bool sameParcel(const LLParcel* parcel) const; | ||
148 | bool operator==(const LLViewerParcelMediaInfo &rhs) const; | ||
149 | private: | ||
150 | std::string mMediaURL; | ||
151 | std::string mMediaType; | ||
152 | LLUUID mMediaID; | ||
153 | S32 mMediaWidth; | ||
154 | S32 mMediaHeight; | ||
155 | U8 mMediaAutoScale; | ||
156 | U8 mMediaLoop; | ||
157 | S32 mParcelLocalID; | ||
158 | }; | ||
123 | #endif | 159 | #endif |