TuttleOFX
1
|
#include <OfxhImage.hpp>
Public Types | |
enum | EReferenceOwner { eReferenceOwnerHost, eReferenceOwnerPlugin } |
Public Member Functions | |
virtual | ~OfxhImage () |
OfxhImage () | |
basic ctor, makes empty property set but sets not value | |
OfxhImage (attribute::OfxhClip &instance, const OfxTime time) | |
OfxPropertySetHandle | getPropHandle () const |
const std::string & | getClipName () const |
OfxTime | getTime () const |
std::ptrdiff_t | getId () const |
OfxRectI | getBounds () const |
get the bounds of the pixels in memory | |
OfxRectI | getROD () const |
get the full region of this image | |
EBitDepth | getBitDepth () const |
std::size_t | getBitDepthMemorySize () const |
int | getRowBytes () const |
EPixelComponent | getComponentsType () const |
int | getReferenceCount (const EReferenceOwner from) const |
void | addReference (const EReferenceOwner from, const std::size_t n=1) |
bool | releaseReference (const EReferenceOwner from) |
release the reference count, which, if zero, deletes this | |
Protected Types | |
typedef std::map < EReferenceOwner, std::ptrdiff_t > | RefMap |
Protected Member Functions | |
void | initClipBits (attribute::OfxhClip &instance) |
called during ctors to get bits from the clip props into ours | |
Protected Attributes | |
std::ptrdiff_t | _id |
temp.... for check | |
RefMap | _referenceCount |
reference count on this image | |
std::string | _clipName |
for debug | |
OfxTime | _time |
for debug | |
Static Protected Attributes | |
static std::ptrdiff_t | _count = 0 |
temp.... for check |
instance of an image inside an image effect
Definition at line 55 of file OfxhImage.hpp.
typedef std::map<EReferenceOwner, std::ptrdiff_t> tuttle::host::ofx::imageEffect::OfxhImage::RefMap [protected] |
Definition at line 69 of file OfxhImage.hpp.
Definition at line 58 of file OfxhImage.hpp.
tuttle::host::ofx::imageEffect::OfxhImage::~OfxhImage | ( | ) | [virtual] |
construction based on clip instance
OfxhImage::OfxhImage( attribute::OfxhClip& instance, OfxTime time, double renderScaleX, double renderScaleY, void* data, const OfxRectI& bounds, const OfxRectI& rod, int rowBytes, const std::string& field, const std::string& uniqueIdentifier ) : property::OfxhSet( imageStuffs ) , _id( _count++ ) , _clipName( instance.getName() ) , _time( time ) { TUTTLE_TLOG( TUTTLE_INFO, "++ OfxhImage, clipName:" << getClipName() << ", time:" << getTime() << ", id:" << getId() << ", ref host:" << getReferenceCount( ofx::imageEffect::OfxhImage::eReferenceOwnerHost ) << ", ref plugins:" << getReferenceCount( ofx::imageEffect::OfxhImage::eReferenceOwnerPlugin ) ); initClipBits( instance );
set other data setDoubleProperty( kOfxImageEffectPropRenderScale, renderScaleX, 0 ); setDoubleProperty( kOfxImageEffectPropRenderScale, renderScaleY, 1 ); setPointerProperty( kOfxImagePropData, data ); setIntProperty( kOfxImagePropBounds, bounds.x1, 0 ); setIntProperty( kOfxImagePropBounds, bounds.y1, 1 ); setIntProperty( kOfxImagePropBounds, bounds.x2, 2 ); setIntProperty( kOfxImagePropBounds, bounds.y2, 3 ); setIntProperty( kOfxImagePropRegionOfDefinition, rod.x1, 0 ); setIntProperty( kOfxImagePropRegionOfDefinition, rod.y1, 1 ); setIntProperty( kOfxImagePropRegionOfDefinition, rod.x2, 2 ); setIntProperty( kOfxImagePropRegionOfDefinition, rod.y2, 3 ); setIntProperty( kOfxImagePropRowBytes, rowBytes );
setStringProperty( kOfxImagePropField, field ); setStringProperty( kOfxImageClipPropFieldOrder, field ); setStringProperty( kOfxImagePropUniqueIdentifier, uniqueIdentifier ); }
Definition at line 137 of file OfxhImage.cpp.
References eReferenceOwnerHost, eReferenceOwnerPlugin, getClipName(), getId(), getReferenceCount(), getTime(), tuttle::quotes(), TUTTLE_LOG_INFO, and TUTTLE_LOG_TRACE.
tuttle::host::ofx::imageEffect::OfxhImage::OfxhImage | ( | ) |
basic ctor, makes empty property set but sets not value
Definition at line 62 of file OfxhImage.cpp.
References eReferenceOwnerHost, eReferenceOwnerPlugin, getClipName(), getId(), getReferenceCount(), getTime(), and TUTTLE_LOG_TRACE.
tuttle::host::ofx::imageEffect::OfxhImage::OfxhImage | ( | attribute::OfxhClip & | instance, |
const OfxTime | time | ||
) | [explicit] |
construct from a clip instance, but leave the filling it to the calling code via the propery set
make an image from a clip instance
Definition at line 78 of file OfxhImage.cpp.
References eReferenceOwnerHost, eReferenceOwnerPlugin, getClipName(), getId(), getReferenceCount(), getTime(), initClipBits(), and TUTTLE_LOG_TRACE.
void tuttle::host::ofx::imageEffect::OfxhImage::addReference | ( | const EReferenceOwner | from, |
const std::size_t | n = 1 |
||
) |
Definition at line 250 of file OfxhImage.cpp.
References _referenceCount, getClipName(), getId(), getReferenceCount(), getTime(), TUTTLE_INFO, and TUTTLE_TLOG.
EBitDepth tuttle::host::ofx::imageEffect::OfxhImage::getBitDepth | ( | ) | const |
Definition at line 197 of file OfxhImage.cpp.
References tuttle::ofx::imageEffect::eBitDepthFloat, tuttle::ofx::imageEffect::eBitDepthNone, tuttle::ofx::imageEffect::eBitDepthUByte, tuttle::ofx::imageEffect::eBitDepthUShort, and tuttle::host::ofx::property::OfxhSet::getStringProperty().
Referenced by tuttle::host::attribute::Image::copy(), getBitDepthMemorySize(), and tuttle::host::attribute::Image::getImage().
std::size_t tuttle::host::ofx::imageEffect::OfxhImage::getBitDepthMemorySize | ( | ) | const [inline] |
Definition at line 155 of file OfxhImage.hpp.
References tuttle::ofx::imageEffect::bitDepthMemorySize(), and getBitDepth().
OfxRectI tuttle::host::ofx::imageEffect::OfxhImage::getBounds | ( | ) | const |
get the bounds of the pixels in memory
Definition at line 183 of file OfxhImage.cpp.
References tuttle::host::ofx::property::OfxhSet::getIntPropertyN().
Referenced by tuttle::host::attribute::Image::getGilView(), tuttle::host::attribute::Image::getImage(), and tuttle::host::attribute::Image::pixel().
const std::string& tuttle::host::ofx::imageEffect::OfxhImage::getClipName | ( | ) | const [inline] |
Definition at line 143 of file OfxhImage.hpp.
References _clipName.
Referenced by addReference(), OfxhImage(), releaseReference(), and ~OfxhImage().
EPixelComponent tuttle::host::ofx::imageEffect::OfxhImage::getComponentsType | ( | ) | const |
Definition at line 217 of file OfxhImage.cpp.
References tuttle::ofx::imageEffect::ePixelComponentAlpha, tuttle::ofx::imageEffect::ePixelComponentNone, tuttle::ofx::imageEffect::ePixelComponentRGB, tuttle::ofx::imageEffect::ePixelComponentRGBA, and tuttle::host::ofx::property::OfxhSet::getStringProperty().
Referenced by tuttle::host::attribute::Image::copy(), tuttle::host::attribute::Image::getImage(), and tuttle::host::attribute::Image::getNbComponents().
std::ptrdiff_t tuttle::host::ofx::imageEffect::OfxhImage::getId | ( | ) | const [inline] |
Definition at line 145 of file OfxhImage.hpp.
References _id.
Referenced by addReference(), OfxhImage(), releaseReference(), and ~OfxhImage().
OfxPropertySetHandle tuttle::host::ofx::imageEffect::OfxhImage::getPropHandle | ( | ) | const [inline] |
Definition at line 138 of file OfxhImage.hpp.
References tuttle::host::ofx::property::OfxhSet::getHandle().
int tuttle::host::ofx::imageEffect::OfxhImage::getReferenceCount | ( | const EReferenceOwner | from | ) | const |
Definition at line 242 of file OfxhImage.cpp.
References _referenceCount.
Referenced by addReference(), OfxhImage(), releaseReference(), and ~OfxhImage().
OfxRectI tuttle::host::ofx::imageEffect::OfxhImage::getROD | ( | ) | const |
get the full region of this image
Definition at line 190 of file OfxhImage.cpp.
References tuttle::host::ofx::property::OfxhSet::getIntPropertyN().
int tuttle::host::ofx::imageEffect::OfxhImage::getRowBytes | ( | ) | const |
Definition at line 237 of file OfxhImage.cpp.
References tuttle::host::ofx::property::OfxhSet::getIntProperty().
Referenced by tuttle::host::attribute::Image::getGilView(), and tuttle::host::attribute::Image::getImage().
OfxTime tuttle::host::ofx::imageEffect::OfxhImage::getTime | ( | ) | const [inline] |
Definition at line 144 of file OfxhImage.hpp.
References _time.
Referenced by addReference(), OfxhImage(), releaseReference(), and ~OfxhImage().
void tuttle::host::ofx::imageEffect::OfxhImage::initClipBits | ( | attribute::OfxhClip & | instance | ) | [protected] |
called during ctors to get bits from the clip props into ours
called during ctor to get bits from the clip props into ours
Definition at line 163 of file OfxhImage.cpp.
References tuttle::host::ofx::property::OfxhSet::getDoubleProperty(), tuttle::host::ofx::attribute::OfxhAttribute::getProperties(), tuttle::host::ofx::property::OfxhSet::getStringProperty(), tuttle::host::ofx::property::OfxhSet::setDoubleProperty(), and tuttle::host::ofx::property::OfxhSet::setStringProperty().
Referenced by OfxhImage().
bool tuttle::host::ofx::imageEffect::OfxhImage::releaseReference | ( | const EReferenceOwner | from | ) |
release the reference count, which, if zero, deletes this
Definition at line 256 of file OfxhImage.cpp.
References _referenceCount, getClipName(), getId(), getReferenceCount(), getTime(), TUTTLE_INFO, and TUTTLE_TLOG.
std::string tuttle::host::ofx::imageEffect::OfxhImage::_clipName [protected] |
std::ptrdiff_t tuttle::host::ofx::imageEffect::OfxhImage::_count = 0 [static, protected] |
temp.... for check
Definition at line 67 of file OfxhImage.hpp.
std::ptrdiff_t tuttle::host::ofx::imageEffect::OfxhImage::_id [protected] |
reference count on this image
Definition at line 70 of file OfxhImage.hpp.
Referenced by addReference(), getReferenceCount(), and releaseReference().
OfxTime tuttle::host::ofx::imageEffect::OfxhImage::_time [protected] |