llmediaengine.h

Go to the documentation of this file.
00001 
00032 #ifndef LLMEDIAENGINE_H
00033 #define LLMEDIAENGINE_H
00034 
00035 #include "linden_common.h"
00036 #include "lluuid.h"
00037 #include "llimage.h"
00038 
00039 #include "llmediabase.h"
00040 #include "llmediaobservers.h"
00041 
00042 
00043 #include "message.h"
00044 
00046 // media engine singleton
00047 class LLMediaEngine
00048 {
00049 public:
00050         static void initClass();
00051         static void updateClass(F32 volume);
00052         static void cleanupClass();
00053 
00054 protected:
00055         // don't let anyone else make one of these
00056         LLMediaEngine ();
00057 
00058 public:
00059         virtual ~LLMediaEngine ();
00060 
00061         // used to get access to single instance of the class (singleton pattern)
00062         static LLMediaEngine* getInstance ();
00063 
00064         // public methods
00065         BOOL init ();
00066         BOOL update ();
00067         
00068         // Pass web_url true if it's a web page, false if it's a movie.
00069         // path is to mozilla directory for mozilla
00070         BOOL load( const LLString& urlIn, bool web_url, const LLString& path, S32 width_pixels, S32 height_pixels);
00071         
00072         BOOL isLoaded ();
00073         BOOL unload ();
00074         BOOL play ();
00075         BOOL loop ();
00076         BOOL pause ();
00077         BOOL stop ();
00078         BOOL seek (F64 time);
00079         void setAvailable ( BOOL availableIn );
00080         BOOL isAvailable ();
00081         void setEnabled ( BOOL enabledIn );
00082         BOOL isEnabled ();
00083         void setAutoScaled ( BOOL autoScaledIn );
00084         BOOL isAutoScaled ();
00085         BOOL setVolume ( F32 volumeIn );
00086 
00087         void setUrl ( const LLString& urlIn );
00088         const LLString& getUrl ();
00089         void setImageUUID ( LLUUID textureIdIn );
00090         LLUUID getImageUUID ();
00091 
00092         // MBW -- XXX -- This should return a LLMediaMovieBase, but the web and movie media classes still haven't been
00093         // fully disentangled.
00094         LLMediaBase* getMediaRenderer();
00095         LLImageRaw* getImageRaw() { return mImageRaw; }
00096         void handleSizeChangedRequest();
00097         
00099         //
00100         static void convertImageAndLoadUrl ( bool enableLooping, bool web_url, const std::string& path);
00101 
00103         //
00104         static void process_parcel_media ( LLMessageSystem *msg, void ** );
00105         static void process_parcel_media_update ( LLMessageSystem *msg, void ** );
00106 
00107         // proxy configuration
00108         void setNetworkProxy ( BOOL enabledIn, const LLString& addressIn, 
00109                                                                                 S32 portIn, S32 socksIn, const LLString& excludeIn );
00110 
00111         void getNetworkProxy ( BOOL& enabledOut, LLString& addressOut,
00112                                                                                         S32& portOut, S32& socksOut, LLString& excludeOuy );
00113 
00114 private:
00115         void createImageRaw();
00116         void destroyImageRaw();
00117 
00118 private:
00119         BOOL mAvailable;
00120         BOOL mEnabled;
00121         BOOL mAutoScaled;
00122         LLString mUrl;
00123         // MBW -- XXX -- This should be a LLMediaMovieBase, but the web and movie media classes still haven't been
00124         // fully disentangled.
00125         LLMediaBase* mMediaRenderer;    
00126         LLPointer<LLImageRaw> mImageRaw;
00127 
00128         LLUUID mImageUUID;
00129         F32 mVolume;
00130 
00131         // proxy information
00132         BOOL mProxyEnabled;
00133         LLString mProxyAddress;
00134         S32 mProxyPort;
00135         S32 mProxySocks;
00136         LLString mProxyExlude;
00137 
00138 private:
00139         static LLMediaEngine* sInstance;
00140 };
00141 
00142 #endif // LLMEDIAENGINE_H
00143 

Generated on Thu Jul 1 06:08:51 2010 for Second Life Viewer by  doxygen 1.4.7