summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerparcelmedia.h
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-11-14 23:44:45 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-11-14 23:44:45 +0200
commit4dd3d230ec7a43845f1a72dfcc7152ab04550d8e (patch)
tree2f6f9feefa9bdd7dd6ee4595bf65ad1af038047e /indra/newview/llviewerparcelmedia.h
parentb1ceef6ea4abffdfb36844c3b8e469283edce229 (diff)
parent78bdf57ad6610b34389226bf941ba736ca0c2225 (diff)
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llviewerparcelmedia.h')
-rw-r--r--indra/newview/llviewerparcelmedia.h87
1 files changed, 45 insertions, 42 deletions
diff --git a/indra/newview/llviewerparcelmedia.h b/indra/newview/llviewerparcelmedia.h
index 534f65b419..779a65bdf8 100644
--- a/indra/newview/llviewerparcelmedia.h
+++ b/indra/newview/llviewerparcelmedia.h
@@ -37,50 +37,53 @@ class LLViewerParcelMediaNavigationObserver;
// This class understands land parcels, network traffic, LSL media
// transport commands, and talks to the LLViewerMedia class to actually
// do playback. It allows us to remove code from LLViewerParcelMgr.
-class LLViewerParcelMedia : public LLViewerMediaObserver
+class LLViewerParcelMedia : public LLViewerMediaObserver, public LLSingleton<LLViewerParcelMedia>
{
+ LLSINGLETON(LLViewerParcelMedia);
+ ~LLViewerParcelMedia();
LOG_CLASS(LLViewerParcelMedia);
- public:
- static void initClass();
- static void cleanupClass();
-
- static void update(LLParcel* parcel);
- // called when the agent's parcel has a new URL, or the agent has
- // walked on to a new parcel with media
-
- static void play(LLParcel* parcel);
- // user clicked play button in media transport controls
-
- static void stop();
- // user clicked stop button in media transport controls
-
- static void pause();
- static void start();
- // restart after pause - no need for all the setup
-
- static void focus(bool focus);
-
- static void seek(F32 time);
- // jump to timecode time
-
- static LLPluginClassMediaOwner::EMediaStatus getStatus();
- static std::string getMimeType();
- static std::string getURL();
- static std::string getName();
- static viewer_media_t getParcelMedia();
-
- static void processParcelMediaCommandMessage( LLMessageSystem *msg, void ** );
- static void processParcelMediaUpdate( LLMessageSystem *msg, void ** );
- static void sendMediaNavigateMessage(const std::string& url);
-
- // inherited from LLViewerMediaObserver
- virtual void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
-
- public:
- static S32 sMediaParcelLocalID;
- static LLUUID sMediaRegionID;
- // HACK: this will change with Media on a Prim
- static viewer_media_t sMediaImpl;
+public:
+ void update(LLParcel* parcel);
+ // called when the agent's parcel has a new URL, or the agent has
+ // walked on to a new parcel with media
+
+ void play(LLParcel* parcel);
+ // user clicked play button in media transport controls
+
+ void stop();
+ // user clicked stop button in media transport controls
+
+ void pause();
+ void start();
+ // restart after pause - no need for all the setup
+
+ void focus(bool focus);
+
+ void seek(F32 time);
+ // jump to timecode time
+
+ LLPluginClassMediaOwner::EMediaStatus getStatus();
+ std::string getMimeType();
+ std::string getURL();
+ std::string getName();
+ viewer_media_t getParcelMedia();
+ bool hasParcelMedia() { return mMediaImpl.notNull(); }
+
+ static void parcelMediaCommandMessageHandler( LLMessageSystem *msg, void ** );
+ static void parcelMediaUpdateHandler( LLMessageSystem *msg, void ** );
+ void sendMediaNavigateMessage(const std::string& url);
+
+ // inherited from LLViewerMediaObserver
+ virtual void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
+
+private:
+ void processParcelMediaCommandMessage(LLMessageSystem *msg);
+ void processParcelMediaUpdate(LLMessageSystem *msg);
+
+ S32 mMediaParcelLocalID;
+ LLUUID mMediaRegionID;
+ // HACK: this will change with Media on a Prim
+ viewer_media_t mMediaImpl;
};