MOGetRGBImage

C Specification

#include <mo/Mobiclip.h>

MOResult MOGetRGBImage(MOInstance* pInstance, MOTexture* pTexture, s32 x, s32 y);

Arguments

pInstance Instance of the concerned movie.
pTexture Texture were the decode image will be put.
x,y Coordinates of the decoded image inside the texture given as parameter.

Return Values

MO_RESULT_OK Success.
MO_RESULT_NULL MOInstance pointer is NULL.
MO_RESULT_NOT_OPENED A successfull call to MOOpen function have not been done before, or open process not complete yet.
MO_RESULT_NO_VALID_IMAGE There are no images available in the image queue.

Description

That function will pop one image from the library decoded image queue, convert it to the format selected by MOSetVideoFormat and put it on top of the texture given as parameter.
The decoded image and texture may only partially overlap.

Please note that if the VideoFormat is changed, it is taken into account at the next call to MOGetRGBImage.
You should call MOSetVideoFormat inside the same thread that is calling MOGetRGBImage.

MOGetRGBImage is using a fast approximation of YUV->RGB color conversion and, as a consequence, is not perfectly accurate.
Also, as MOGetRGBImage is using the CPU for the conversion, it is slower than MOGetYUYVImage or MOGetYUVImage functions.
This function is mainly useful for blitting a video in an RGBA texture that will be used in-game.
If you plan to display simple video cut-scenes, you should use the more accurate and faster MOGetYUYVImage or MOGetYUVImage functions.

See Also

MOSetVideoFormat

MOGetVideoFormat

MOGetYUVImage

MOGetYUYVImage

MOSkipImage

Revision History

01/03/2011 Updated description about MOGetRGBImage typical usage, added description about MOGetYUYVImage usage.

02/24/2010 Description about MO_RESULT_NO_VALID_IMAGE return value added. RGB texture now called RGBA texture.

03/26/2009 Parameter renaming done.

01/19/2009 Added description about MOGetRGBImage and MOGetYUVImage typical usage.

07/29/2008 Initial version.