TuttleOFX
1
|
00001 #ifndef _TUTTLE_HOST_OUTPUTBUFFERWRAPPER_HPP_ 00002 #define _TUTTLE_HOST_OUTPUTBUFFERWRAPPER_HPP_ 00003 00004 #include "INode.hpp" 00005 #include <tuttle/host/attribute/Param.hpp> 00006 #include <tuttle/host/attribute/ClipImage.hpp> 00007 #include <tuttle/host/attribute/ClipImage.hpp> 00008 #include <tuttle/host/ofx/attribute/OfxhClipImageDescriptor.hpp> 00009 #include <tuttle/host/graph/ProcessVertexData.hpp> 00010 #include <tuttle/host/graph/ProcessVertexAtTimeData.hpp> 00011 00012 namespace tuttle { 00013 namespace host { 00014 00015 class OutputBufferWrapper 00016 { 00017 private: 00018 INode* _node; 00019 00020 public: 00021 00022 enum EBitDepth 00023 { 00024 eBitDepthCustom = -1, ///< some non standard bit depth 00025 eBitDepthNone = 0, ///< bit depth that indicates no data is present 00026 eBitDepthUByte = 1, 00027 eBitDepthUShort = 2, 00028 eBitDepthFloat = 3 00029 }; 00030 00031 enum EPixelComponent 00032 { 00033 ePixelComponentNone, 00034 ePixelComponentRGBA, 00035 ePixelComponentRGB, 00036 ePixelComponentAlpha, 00037 ePixelComponentCustom ///< some non standard pixel type 00038 }; 00039 00040 enum EField 00041 { 00042 eFieldNone, //< @brief unfielded image 00043 eFieldBoth, //< @brief fielded image with both fields present 00044 eFieldLower, //< @brief only the spatially lower field is present 00045 eFieldUpper //< @brief only the spatially upper field is present 00046 }; 00047 00048 typedef void* CustomDataPtr; 00049 typedef void (*CallbackOutputImagePtr)( OfxTime time, CustomDataPtr outputCustomData, void* rawdata, int width, int height, int rowSizeBytes, EBitDepth bitDepth, EPixelComponent components, EField field ); 00050 typedef void (*CallbackDestroyCustomDataPtr)( CustomDataPtr outputCustomData ); 00051 00052 OutputBufferWrapper( INode& node ) 00053 : _node(&node) 00054 {} 00055 OutputBufferWrapper() 00056 : _node(NULL) 00057 {} 00058 ~OutputBufferWrapper() {} 00059 00060 INode& getNode() { return *_node; } 00061 00062 void setCallback( CallbackOutputImagePtr callback, CustomDataPtr customData = NULL, CallbackDestroyCustomDataPtr destroyCustomData = NULL ); 00063 }; 00064 00065 } 00066 } 00067 00068 #endif 00069