TuttleOFX
1
|
00001 #include "core.hpp" 00002 00003 #include <ofxImageEffect.h> 00004 00005 #include <boost/lexical_cast.hpp> 00006 00007 namespace tuttle { 00008 namespace ofx { 00009 00010 std::string mapStatusToString( const OfxStatus stat ) 00011 { 00012 switch( stat ) 00013 { 00014 case kOfxStatOK: return "kOfxStatOK"; 00015 case kOfxStatFailed: return "kOfxStatFailed"; 00016 case kOfxStatErrFatal: return "kOfxStatErrFatal"; 00017 case kOfxStatErrUnknown: return "kOfxStatErrUnknown"; 00018 case kOfxStatErrMissingHostFeature: return "kOfxStatErrMissingHostFeature"; 00019 case kOfxStatErrUnsupported: return "kOfxStatErrUnsupported"; 00020 case kOfxStatErrExists: return "kOfxStatErrExists"; 00021 case kOfxStatErrFormat: return "kOfxStatErrFormat"; 00022 case kOfxStatErrMemory: return "kOfxStatErrMemory"; 00023 case kOfxStatErrBadHandle: return "kOfxStatErrBadHandle"; 00024 case kOfxStatErrBadIndex: return "kOfxStatErrBadIndex"; 00025 case kOfxStatErrValue: return "kOfxStatErrValue"; 00026 case kOfxStatReplyYes: return "kOfxStatReplyYes"; 00027 case kOfxStatReplyNo: return "kOfxStatReplyNo"; 00028 case kOfxStatReplyDefault: return "kOfxStatReplyDefault"; 00029 case kOfxStatErrImageFormat: return "kOfxStatErrImageFormat"; 00030 } 00031 return "UNKNOWN STATUS CODE: " + boost::lexical_cast<std::string>( stat ); 00032 } 00033 00034 } 00035 } 00036 00037 std::ostream& operator<<( std::ostream& os, const OfxPlugin& v ) 00038 { 00039 os << "OfxPlugin {" << std::endl; 00040 os << " pluginApi" << v.pluginApi << std::endl; 00041 os << " apiVersion" << v.apiVersion << std::endl; 00042 os << " pluginIdentifier" << v.pluginIdentifier << std::endl; 00043 os << " pluginVersionMajor" << v.pluginVersionMajor << std::endl; 00044 os << " pluginVersionMinor" << v.pluginVersionMinor << std::endl; 00045 os << "}" << std::endl; 00046 return os; 00047 } 00048 00049 /* 00050 typedef struct OfxRangeI 00051 { 00052 int min, max; 00053 } OfxRangeI; 00054 00055 typedef struct OfxRangeD 00056 { 00057 double min, max; 00058 } OfxRangeD; 00059 00060 typedef struct OfxPointI 00061 { 00062 int x, y; 00063 } OfxPointI; 00064 00065 typedef struct OfxPointD 00066 { 00067 double x, y; 00068 } OfxPointD; 00069 00070 typedef struct OfxRectI 00071 { 00072 int x1, y1, x2, y2; 00073 } OfxRectI; 00074 00075 typedef struct OfxRectD 00076 { 00077 double x1, y1, x2, y2; 00078 } OfxRectD; 00079 00080 typedef struct OfxRGBAColourB 00081 { 00082 unsigned char r, g, b, a; 00083 }OfxRGBAColourB; 00084 00085 typedef struct OfxRGBAColourS 00086 { 00087 unsigned short r, g, b, a; 00088 }OfxRGBAColourS; 00089 00090 typedef struct OfxRGBAColourF 00091 { 00092 float r, g, b, a; 00093 }OfxRGBAColourF; 00094 00095 typedef struct OfxRGBAColourD 00096 { 00097 double r, g, b, a; 00098 }OfxRGBAColourD; 00099 00100 struct OfxRGBColourB 00101 { 00102 unsigned char r, g, b; 00103 }; 00104 00105 struct OfxRGBColourS 00106 { 00107 unsigned short r, g, b; 00108 }; 00109 00110 struct OfxRGBColourF 00111 { 00112 float r, g, b; 00113 }; 00114 00115 struct OfxRGBColourD 00116 { 00117 double r, g, b; 00118 }; 00119 00120 struct Ofx3DPointI 00121 { 00122 int x, y, z; 00123 }; 00124 00125 struct Ofx3DPointD 00126 { 00127 double x, y, z; 00128 }; 00129 00130 typedef struct OfxYUVAColourB 00131 { 00132 unsigned char y, u, v, a; 00133 }OfxYUVAColourB; 00134 00135 typedef struct OfxYUVAColourS 00136 { 00137 unsigned short y, u, v, a; 00138 }OfxYUVAColourS; 00139 00140 typedef struct OfxYUVAColourF 00141 { 00142 float y, u, v, a; 00143 }OfxYUVAColourF; 00144 */ 00145