/*---------------------------------------------------------------------------* Project: THP demo File: THPPlayerStreamAX.h Copyright (C)2002-2006 Nintendo All Rights Reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Log: THPPlayerStrmAX.h,v $ Revision 1.2 2006/10/11 02:52:29 aka Revised HOLLYWOOD_REV. Revision 1.1 2006/02/03 10:00:34 aka Imported from Dolphin tree. 2 03/09/16 15:35 Suzuki removed DECODE_BUFFER_NUM definition. added DECODE_VIDEO_BUFFER_NUM and DECODE_AUDIO_BUFFER_NUM definition. 1 02/05/14 9:41a Suzuki Initial checkin. $NoKeywords: $ *---------------------------------------------------------------------------*/ #ifndef __THPPLAYER_STREAM_AX_H__ #define __THPPLAYER_STREAM_AX_H__ #include #include #include #include "THPPlayerCommon.h" #ifdef __cplusplus extern "C" { #endif #define NTSC_RATE (5994) #define PAL_RATE (5000) #define READ_THREAD_PRIORITY 8 #define AUDIO_THREAD_PRIORITY 12 #define VIDEO_THREAD_PRIORITY 20 #define READ_BUFFER_NUM 10 #define DECODE_VIDEO_BUFFER_NUM 3 #define DECODE_AUDIO_BUFFER_NUM 6 typedef enum { THP_PLAYER_STOP = 0x0, THP_PLAYER_PREPARE, THP_PLAYER_PLAY, THP_PLAYER_PLAYED, THP_PLAYER_PAUSE, THP_PLAYER_ERROR } THPPlayerState; typedef struct { DVDFileInfo fileInfo; THPHeader header; THPFrameCompInfo compInfo; THPVideoInfo videoInfo; THPAudioInfo audioInfo; void *thpWork; BOOL open; u8 state; u8 internalState; u8 playFlag; u8 audioExist; s32 dvdError; s32 videoError; BOOL onMemory; u8 *movieData; s32 initOffset; s32 initReadSize; s32 initReadFrame; s64 retraceCount; s32 prevCount; s32 curCount; s32 videoDecodeCount; s32 curAudioTrack; s32 curVideoNumber; s32 curAudioNumber; THPTextureSet *dispTextureSet; THPAudioBuffer *playAudioBuffer; THPReadBuffer readBuffer[READ_BUFFER_NUM]; THPTextureSet textureSet[DECODE_VIDEO_BUFFER_NUM]; THPAudioBuffer audioBuffer[DECODE_AUDIO_BUFFER_NUM]; } THPPlayer; extern BOOL THPPlayerInit(void); extern void THPPlayerQuit(void); extern BOOL THPPlayerOpen(char *fileName, BOOL onMemory); extern BOOL THPPlayerClose(void); extern u32 THPPlayerCalcNeedMemory(void); extern BOOL THPPlayerSetBuffer(u8 *buffer); extern BOOL THPPlayerPrepare(s32 frameNum, s32 playFlag, s32 audioTrack); extern BOOL THPPlayerPlay(void); extern void THPPlayerStop(void); extern BOOL THPPlayerPause(void); extern BOOL THPPlayerSkip(void); extern s32 THPPlayerDrawCurrentFrame(GXRenderModeObj *rmode, u32 x, u32 y, u32 polygonW, u32 polygonH); extern BOOL THPPlayerGetVideoInfo(THPVideoInfo *videoInfo); extern BOOL THPPlayerGetAudioInfo(THPAudioInfo *audioInfo); extern f32 THPPlayerGetFrameRate(void); extern u32 THPPlayerGetTotalFrame(void); extern s32 THPPlayerGetState(void); extern void THPPlayerDrawDone(void); extern void THPPlayerStreamUpdate(void); extern void THPPlayerGetStreamAXPB(AXVPB **left, AXVPB **right); #ifdef __cplusplus } #endif #endif // __THPPLAYER_STREAM_AX_H__