Go to the documentation of this file.00001 #ifndef _QT_UTILS
00002 #define _QT_UTILS
00003
00004
00005 #include "ofConstants.h"
00006
00007 #ifndef TARGET_LINUX
00008
00009 #include "ofGraphics.h"
00010
00011
00012 #ifdef TARGET_OSX
00013 #include <QuickTime/QuickTime.h>
00014 #include <CoreServices/CoreServices.h>
00015 #include <ApplicationServices/ApplicationServices.h>
00016 #else
00017 #include <QTML.h>
00018 #include <FixMath.h>
00019 #include <QuickTimeComponents.h>
00020 #include <TextUtils.h>
00021 #include <MediaHandlers.h>
00022
00023 #endif
00024
00025
00026 #ifdef TARGET_OSX
00027 #define p2cstr(aStr) CFStringGetCStringPtr(CFStringCreateWithPascalString(NULL, aStr, kCFStringEncodingMacRoman),kCFStringEncodingMacRoman)
00028 #endif
00029
00030
00031 typedef struct{
00032 unsigned char r;
00033 unsigned char g;
00034 unsigned char b;
00035 } pix24;
00036
00037
00038
00039
00040
00041 void initializeQuicktime();
00042 void closeQuicktime();
00043 void convertPixels(unsigned char * gWorldPixels, unsigned char * rgbPixels, int w, int h);
00044 Boolean SeqGrabberModalFilterUPP(DialogPtr theDialog, const EventRecord *theEvent, short *itemHit, long refCon);
00045 OSErr IsMPEGMediaHandler(MediaHandler inMediaHandler, Boolean *outIsMPEG);
00046 ComponentResult MPEGMediaGetStaticFrameRate(MediaHandler inMPEGMediaHandler, Fixed *outStaticFrameRate);
00047 OSErr MediaGetStaticFrameRate(Media inMovieMedia, double *outFPS);
00048 void MovieGetVideoMediaAndMediaHandler(Movie inMovie, Media *outMedia,
00049 MediaHandler *outMediaHandler);
00050 void MovieGetStaticFrameRate(Movie inMovie, double *outStaticFrameRate);
00051
00052 #ifdef TARGET_OSX
00053 OSErr GetSettingsPreference(CFStringRef inKey, UserData *outUserData);
00054 OSErr SaveSettingsPreference(CFStringRef inKey, UserData inUserData);
00055 #endif
00056
00057 #endif
00058
00059 #endif