pub unsafe extern "C" fn FREMediaBufferLock(
ctx: FREContext,
mediaBuffer: FREObject,
pData: *mut FREBytes,
pWidth: *mut uint32_t,
pHeight: *mut uint32_t,
pStride: *mut uint32_t,
pFormat: *mut uint32_t,
) -> FREResultExpand description
Locks a MediaBuffer bitmap and returns information about the data storage.
Note that for every call to FREMediaBufferLock, a corresponding call to FREMediaBufferUnlock must be made.
Ideally this would be as swift as possible, as locking a media buffer would impact rendering of any bitmap
it contains. The unlock must be called prior to returning from the ANE function call though.
@param ctx The FREContext for the native extension instance.
@param mediaBuffer The AS3 MediaBuffer object for which the image data is requested.
@param pData Pointer to a byte pointer that will be set to the internal image data.
@param pWidth Pointer to a value that will be set to the width of the image data.
@param pHeight Pointer to a value that will be set to the height of the image data.
@param pStride Pointer to a value that will be set to the stride i.e. number of bytes between the start of each row on the image.
@param pFormat Pointer to a value that will be set to a format value (for future usage: currently images are ARGB format).
@returns FREResult::FRE_OK
FREResult::FRE_INVALID_ARGUMENT if any parameter is null
FREResult::FRE_INVALID_OBJECT if the MediaBuffer objects has an incorrect type
FREResult::FRE_WRONG_THREAD if called from the wrong thread; at some point this function will be updated to allow multi-thread calling