Name

OfxImageEffectSuiteV1::imageMemoryLock — Lock the memory associated with a memory handle and make it available for use.

Synopsis

#include "ofxImageEffect.h" 
OfxStatus(*imageMemoryLock)(OfxImageMemoryHandlememoryHandle,
  void **returnedPtr);
 

Arguments

  • memoryHandle -
  • returnedPtr -

Description

This function locks them memory associated with a memory handle and returns a pointer to it. The memory will be 16 byte aligned, to allow use of vector operations.

Note that memory locks and unlocks nest.

After the first lock call, the contents of the memory pointer to by returnedPtr is undefined. All subsequent calls to lock will return memory with the same contents as the previous call.

Also, if unlocked, then relocked, the memory associated with a memory handle may be at a different address.

See also OfxImageEffectSuiteV1::imageMemoryUnlock and ImageEffectsMemoryAllocation.

Returns

  • kOfxStatOK if the memory was locked, a pointer is placed in returnedPtr
  • kOfxStatErrBadHandle if the value of memoryHandle was not a valid pointer returned by OfxImageEffectSuiteV1::imageMemoryAlloc, null is placed in returnedPtr
  • kOfxStatErrMemory if there was not enough memory to satisfy the call, returnedPtr is set to NULL