pub unsafe extern "C" fn FREMediaBufferLock(
ctx: FREContext,
mediaBuffer: FREObject,
pData: *mut FREBytes,
pWidth: *mut u32,
pHeight: *mut u32,
pStride: *mut u32,
pFormat: *mut u32,
) -> 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.
§Parameters
ctx: TheFREContextfor the native extension instance.mediaBuffer: The AS3MediaBufferobject for which the image data is requested.pData: Pointer to a byte pointer that will be set to the internal image data.pWidth: Pointer to a value that will be set to the width of the image data.pHeight: Pointer to a value that will be set to the height of the image data.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.pFormat: Pointer to a value that will be set to a format value (for future usage: currently images are ARGB format).
§Returns
FREResult::FRE_OKFREResult::FRE_INVALID_ARGUMENTIf any parameter is null.FREResult::FRE_INVALID_OBJECTIf theMediaBufferobject has an incorrect type.FREResult::FRE_WRONG_THREADIf called from the wrong thread; at some point this function will be updated to allow multi-thread calling.