Name
ReadVideoPixels -- get raw pixels from video bitmap (V6.0, optional)
Synopsis
APTR rgb = ReadVideoPixels(APTR handle, struct hwTagList *tags);
Function
This function must return the raw pixels of the specified video bitmap. This is often very slow because it has to read from GPU memory. That's why Hollywood calls this function only under very special circumstances. This function has to return a pixel buffer that is exactly of the size width * height * bytes_per_pixel. No line padding may be involved.

Additionally, your implementation has to handle the following taglist:

HWRVPTAG_BLEND:
The pData member of this tag item will be set to a pointer to an int. Your implementation has to set this pointer to either True or False, depending on whether the returned video pixels contain alpha channel transparency information or not.

HWRVPTAG_PIXELFORMAT:
The pData member of this tag item will be set to a pointer to an int. Your implementation has to set this pointer to the pixel format the returned data is in. See Pixel formats for details.

When Hollywood is done with the data returned by this function, it will call FreeVideoPixels() on it.

ReadVideoPixels() is an optional API and must only be implemented if HWSDAFLAGS_VIDEOBITMAPADAPTER has been passed to hw_SetDisplayAdapter(). See hw_SetDisplayAdapter for details.

Inputs
handle
handle to a bitmap allocated by AllocVideoBitMap().
tags
taglist containing additional parameters (see above)
Results
rgb
array containing raw pixel data or NULL in case of an error

Show TOC