#define MOBICLIP_MOVIE_MAJOR 3
#define MOBICLIP_MOVIE_MINOR 2
#define MOBICLIP_MOVIE_PATCH 0
#define MO_MAX_BUFFERED_FRAME 6
#define MO_MEMORY_NEEDED_VGA (4*1024*1024)
#define MO_MEMORY_NEEDED_QVGA (1*1024*1024)| MOBICLIP_MOVIE_MAJOR | Major version number of the library. Different number means the codebase is very different. |
|---|---|
| MOBICLIP_MOVIE_MINOR | Minor version number of the library. Different number means incompatibility. |
| MOBICLIP_MOVIE_PATCH | Patch version of the library. An application compiled with Path version N will work with any library >=N, but it must have the same major version. |
| MO_MAX_BUFFERED_FRAME | Size of the queues that hold decoded video/sound. You can call decode up to MO_MAX_BUFFERED_FRAME before blitting out audio/video frames. |
| MO_MEMORY_NEEDED_VGA | Gross estimate of memory needed by the Mobiclip API to perform single VGA video playback with a 48000Hz stereo audio track. |
| MO_MEMORY_NEEDED_QVGA | Gross estimate of memory needed by the Mobiclip API to perform single QVGA video playback with a 48000Hz stereo audio track. |
Shown constant values may differ from those of the current Mobiclip SDK, please refer to Mobiclip.h header file for their actual values.
typedef enum
{
MO_RESULT_OK = 0,
MO_RESULT_FATAL = -1,
MO_RESULT_NOT_OPENED = -2,
MO_RESULT_ALREADY_OPENED = -3,
MO_RESULT_OPEN_FAILED = -4,
MO_RESULT_OUT_OF_MEMORY = -5,
MO_RESULT_NULL = -6,
MO_RESULT_NOT_INITIALIZED = -7,
MO_RESULT_ALREADY_INITIALIZED = -8,
MO_RESULT_UNINIT_FAILED = -9,
MO_RESULT_NOT_CLOSED = -10,
MO_RESULT_NO_AUDIO_TRACK = -11,
MO_RESULT_NO_VALID_AUDIO_PACKET = -12,
MO_RESULT_NO_VALID_IMAGE = -13,
MO_RESULT_ALIGN_SIZE = 0x7fffffff
}MOResult;This enumerate is usually used to get the status of a function call.
| MO_RESULT_OK | Means success. |
|---|---|
| MO_RESULT_FATAL | Means an unknown error. |
| MO_RESULT_NOT_OPENED | Means the movie was not opened when a Mobiclip function was called. |
| MO_RESULT_ALREADY_OPENED | Means user tried to open a movie twice. |
| MO_RESULT_OPEN_FAILED | Means movie could no be opened when MOOpen function was called. |
| MO_RESULT_OUT_OF_MEMORY | Means not enough memory. |
| MO_RESULT_NULL | Means one of the parameters of the called Mobiclip function are NULL pointers. |
| MO_RESULT_NOT_INITIALIZED | Means MOInit function was not called before calling a Mobiclip function. |
| MO_RESULT_ALREADY_INITIALIZED | Means user tried to call MOInit function twice. |
| MO_RESULT_UNINIT_FAILED | Means all MOInstance objects had not been released yet when MOUninit was called. |
| MO_RESULT_NOT_CLOSED | Means MOInstance object had not been closed yet when MODestroyInstance was called. |
| MO_RESULT_NO_AUDIO_TRACK | Means no audio track is in the movie data. |
| MO_RESULT_NO_VALID_AUDIO_PACKET | Means there are no valid audio packets in the audio queue. |
| MO_RESULT_NO_VALID_IMAGE | Means there are no valid images in the image queue. |
typedef enum
{
MO_STATUS_NONE=0,
MO_STATUS_INITIALIZING,
MO_STATUS_READY,
MO_STATUS_NEED_DATA,
MO_STATUS_ERROR,
MO_STATUS_BUSY,
MO_STATUS_OUT_OF_MEMORY,
MO_STATUS_END
}MOStatus;This enumerate defines the current status of libMobiclip.
| MO_STATUS_INITIALIZING | Means the library is opening a connection or reading headers |
|---|---|
| MO_STATUS_READY | Means the library is ready to decode movie. |
| MO_STATUS_NEED_DATA | Means the library is waiting for more data to be able to proceed. |
| MO_STATUS_ERROR | Means the library encountered an error and cannot continue. |
| MO_STATUS_BUSY | Means the library is waiting for an event, for example a seek complete event. |
| MO_STATUS_OUT_OF_MEMORY | Means the library have not enough memory. |
| MO_STATUS_END | Means the library read all the movie. |
typedef enum
{
MO_VIDEO_FORMAT_YUV_TILED=1,
MO_VIDEO_FORMAT_RGB888_LINEAR=2,
MO_VIDEO_FORMAT_RGB888_TILED=3,
MO_VIDEO_FORMAT_RGB565_LINEAR=4,
MO_VIDEO_FORMAT_RGB565_TILED=5,
MO_VIDEO_FORMAT_YUYV_LINEAR=6,
MO_VIDEO_FORMAT_MAX=7
}MOVideoFrameFormat;This enumerate defines the output image format. The Tiled ones means they are already in the Wii Tiled texture format.
typedef enum
{
MO_MEDIUM_NONE=0,
MO_MEDIUM_CLOSED,
MO_MEDIUM_OPENING,
MO_MEDIUM_READY,
MO_MEDIUM_COMPLETE,
MO_MEDIUM_ERROR,
MO_MEDIUM_SEEKING
}MO_MEDIUM_STATE;
Description
This enumerate defines the status of a given source.
MO_MEDIUM_NONE
Forbidden value.
MO_MEDIUM_CLOSED
The medium is closed.
MO_MEDIUM_OPENING
The opening is ongoing. For example, that applies when an http connection has been started.
MO_MEDIUM_READY
The medium is ready, and the application can read from it.
MO_MEDIUM_COMPLETE
The medium has been completely read.
MO_MEDIUM_ERROR
The medium is in error state .
MO_MEDIUM_SEEKING
The medium is currently seeking. Eventually, it will switch to READY or ERROR state.
-----?>
MOAudioChannelOrdering
Definitions
typedef enum
{
MO_AUDIO_CHANNEL_ORDERING_RIGHT_FIRST = 0,
MO_AUDIO_CHANNEL_ORDERING_LEFT_FIRST = 1
}MOAudioChannelOrdering;
Description
This enumerate defines the various ways of interleaving left and right PCM audio channels in case of stereo.
MO_AUDIO_CHANNEL_ORDERING_RIGHT_FIRST
Right PCM sample first for AI direct use.
MO_AUDIO_CHANNEL_ORDERING_LEFT_FIRST
Left PCM sample first ordering.
MOQualityEnhancementLevel
Definitions
typedef enum
{
MO_QUALITY_ENHANCEMENT_NONE=0,
MO_QUALITY_ENHANCEMENT_MEDIUM=1,
MO_QUALITY_ENHANCEMENT_HIGH=2
}MOQualityEnhancementLevel;
Description
This enumerate defines the differents quality enhancment that can be applied. Using higher quality enhancements mean more CPU consumption.
-------------------------------------------------------------------------?>
Log and error functions
MoLogFunction
Definitions
typedef void (*MoLogFunction)(MOInstance *pInstance, void *pUserData,const char *pLogString);
Description
That typedef prototypes the function that will be invoked by libMobiclip to send logs.
pInstance
Instance of libMobiclip sending logs
pUserData
User data as set by MOSetUserData
pLogString
Log message.
MoErrorFunction
Definitions
typedef void (*MoErrorFunction)(MOInstance *pInstance, void *pUserData,const char *pLogString);
Description
That typedef prototypes the function that will be invoked by libMobiclip to fatal errors.
There is only a few cases where a fatal error is invoked. It should never happen in normal cases.
pInstance
Instance of libMobiclip sending logs
pUserData
User data as set by MOSetUserData
pLogString
Error message.
-------------------------------------------------------------------------?>
Structures
MOTexture
Definitions
typedef struct
{
u8 *textureData;
u32 width,height;
u32 stride;
}MOTexture;
Description
textureData
Pointer to where the texture data will be stored. The allocated area must be big enough to contain all the texture.
width
Width of the texture in pixels.
height
Height of the texture in pixels.
stride
Number of bytes from one pixel to reach the pixel just below.
Warning, in tiled mode, the stride is the stride between two tiles (it means width*2*4 for 565_TILED and width*4*4 for 888_TILED.
-----?>
MO_DEBUG_FUNCS
Definitions
typedef struct
{
void (*logFunction) (MOInstance *instance, const char *logString);
void (*errorFunction) (MOInstance *instance, const char *logString);
}MO_DEBUG_FUNCS;
Description
This structure is used as a parameter of MOCreateInstance. It is used to give callbacks to libMobiclip to retrieve logs and fatal errors.
Revision History
01/03/2011 Added MO_VIDEO_FORMAT_YUYV_LINEAR value in MOVideoFrameFormat enum.
02/24/2010 Added MO_RESULT_NO_AUDIO_TRACK, MO_RESULT_NO_VALID_AUDIO_PACKET and MO_RESULT_NO_VALID_IMAGE values in MOResult enum.
09/18/2009 Updated MO_DEBUG_FUNCS description layout to the way it is done in file Mobiclip.h.
03/26/2009 Parameter renaming done.
07/29/2008 Update for libMobiclip 3.0.
07/07/2008 CNT lib addition.
06/22/2008 Initial version.