llmediaimplquicktime.h

Go to the documentation of this file.
00001 
00032 #ifndef LLMEDIAIMPLQUICKTIME_H
00033 #define LLMEDIAIMPLQUICKTIME_H
00034 
00035 #include "llmediaimplcommon.h"
00036 #include "llmediaimplfactory.h"
00037 
00038 #if LL_QUICKTIME_ENABLED
00039 
00040 #include <string>
00041 
00042 // QuickTime includes
00043 #if defined(__APPLE__)
00044         #include <QuickTime/QuickTime.h>
00045 #elif defined(WIN32)
00046         #include "MacTypes.h"
00047         #include "QTML.h"
00048         #include "Movies.h"
00049         #include "QDoffscreen.h"
00050         #include "FixMath.h"
00051 #endif
00052 
00053 class  LLMediaManagerData;
00054 
00055 class LLMediaImplQuickTime :
00056         public LLMediaImplCommon
00057 {
00058         public:
00059                 LLMediaImplQuickTime();
00060                 virtual ~LLMediaImplQuickTime();
00061 
00062                 static bool startup( LLMediaManagerData* init_data );
00063                 static bool closedown();
00064 
00065                 /* virtual */ std::string getVersion();
00066                 /* virtual */ bool navigateTo( const std::string url );
00067                 /* virtual */ bool updateMedia();
00068                 /* virtual */ unsigned char* getMediaData();
00069                 /* virtual */ int getMediaDataWidth() const;
00070                 /* virtual */ int getTextureFormatPrimary() const;
00071                 /* virtual */ int getTextureFormatType() const;
00072                 /* virtual */ bool seek( double time );
00073                 /* virtual */ bool setVolume( float volume );
00074 
00075                 bool sizeChanged();
00076 
00077         private:
00078                 static OSErr movieDrawingCompleteCallback( Movie call_back_movie, long ref );
00079                 static Boolean mcActionFilterCallBack( MovieController mc, short action, void *params, long ref );
00080                 static void moviePrePrerollCompleteCallback( Movie movie, OSErr preroll_err, void *refcon );
00081 
00082                 bool load( const std::string url );
00083                 bool unload();
00084                 void rewind();
00085                 bool processState();
00086                 bool setMovieBoxEnhanced( Rect* rect );
00087 
00088                 Movie mMovieHandle;
00089                 GWorldPtr mGWorldHandle;
00090                 ComponentInstance mMovieController;
00091                 const int mMinWidth;
00092                 const int mMaxWidth;
00093                 const int mMinHeight;
00094                 const int mMaxHeight;
00095                 int mCurVolume;
00096 };
00097 
00098 // The maker class
00099 class LLMediaImplQuickTimeMaker : public LLMediaImplMaker
00100 {
00101         public:
00102                 LLMediaImplQuickTimeMaker();
00103                 LLMediaImplQuickTime* create()
00104                 {
00105                         return new LLMediaImplQuickTime();
00106                 }
00107 };
00108 
00109 #endif // LL_QUICKTIME_ENABLED
00110 
00111 #endif  // LLMEDIAIMPLQUICKTIME_H

Generated on Fri May 16 08:32:21 2008 for SecondLife by  doxygen 1.5.5