TuttleOFX  1
tuttle::host::ofx::imageEffect::OfxhImage Class Reference

#include <OfxhImage.hpp>

Inheritance diagram for tuttle::host::ofx::imageEffect::OfxhImage:
Collaboration diagram for tuttle::host::ofx::imageEffect::OfxhImage:

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

Detailed Description

instance of an image inside an image effect

Definition at line 55 of file OfxhImage.hpp.


Member Typedef Documentation

typedef std::map<EReferenceOwner, std::ptrdiff_t> tuttle::host::ofx::imageEffect::OfxhImage::RefMap [protected]

Definition at line 69 of file OfxhImage.hpp.


Member Enumeration Documentation

Enumerator:
eReferenceOwnerHost 
eReferenceOwnerPlugin 

Definition at line 58 of file OfxhImage.hpp.


Constructor & Destructor Documentation

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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

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.

Here is the call graph for this function:


Member Function Documentation

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.

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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.

Here is the call graph for this function:


Field Documentation

for debug

Definition at line 71 of file OfxhImage.hpp.

Referenced by getClipName().

std::ptrdiff_t tuttle::host::ofx::imageEffect::OfxhImage::_count = 0 [static, protected]

temp.... for check

Definition at line 67 of file OfxhImage.hpp.

temp.... for check

Definition at line 68 of file OfxhImage.hpp.

Referenced by getId().

reference count on this image

Definition at line 70 of file OfxhImage.hpp.

Referenced by addReference(), getReferenceCount(), and releaseReference().

for debug

Definition at line 72 of file OfxhImage.hpp.

Referenced by getTime().


The documentation for this class was generated from the following files: