pspmpeg.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  * pspmpeg.h - Prototypes for the sceMpeg library
00007  *
00008  * Copyright (c) 2006 Sorin P. C. <magik@hypermagik.com>
00009  * Copyright (c) 2007 Alexander Berl <raphael@fx-world.org>
00010  *
00011  * $Id$
00012  */
00013 
00014 #ifndef __SCELIBMPEG_H__
00015 #define __SCELIBMPEG_H__
00016 
00017 #include <psptypes.h>
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022 
00024 typedef ScePVoid SceMpeg;
00025 
00027 typedef SceVoid  SceMpegStream;
00028 
00030 typedef SceInt32 (*sceMpegRingbufferCB)(ScePVoid pData, SceInt32 iNumPackets, ScePVoid pParam);
00031 
00032 typedef struct SceMpegRingbuffer
00033 {
00035         SceInt32                        iPackets;
00036 
00038         SceUInt32                       iUnk0;
00040         SceUInt32                       iUnk1;
00042         SceUInt32                       iUnk2;
00044         SceUInt32                       iUnk3;
00045 
00047         ScePVoid                        pData;
00048 
00050         sceMpegRingbufferCB     Callback;
00052         ScePVoid                        pCBparam;
00053 
00055         SceUInt32                       iUnk4;
00057         SceUInt32                       iUnk5;
00059         SceMpeg                         pSceMpeg;
00060 
00061 } SceMpegRingbuffer;
00062 
00063 typedef struct SceMpegAu
00064 {
00066         SceUInt32                       iPtsMSB;
00068         SceUInt32                       iPts;
00070         SceUInt32                       iDtsMSB;
00072         SceUInt32                       iDts;
00074         SceUInt32                       iEsBuffer;
00076         SceUInt32                       iAuSize;
00077 
00078 } SceMpegAu;
00079 
00080 #define SCE_MPEG_AVC_FORMAT_DEFAULT -1
00081 #define SCE_MPEG_AVC_FORMAT_5650 0
00082 #define SCE_MPEG_AVC_FORMAT_5551 1
00083 #define SCE_MPEG_AVC_FORMAT_4444 2
00084 #define SCE_MPEG_AVC_FORMAT_8888 3
00085 
00086 typedef struct SceMpegAvcMode
00087 {
00089         SceInt32                        iUnk0;
00091         SceInt32                        iPixelFormat;
00092 
00093 } SceMpegAvcMode;
00094 
00100 SceInt32 sceMpegInit();
00101 
00105 SceVoid sceMpegFinish();
00106 
00114 SceInt32 sceMpegRingbufferQueryMemSize(SceInt32 iPackets);
00115 
00128 SceInt32 sceMpegRingbufferConstruct(SceMpegRingbuffer* Ringbuffer, SceInt32 iPackets, ScePVoid pData, SceInt32 iSize, sceMpegRingbufferCB Callback, ScePVoid pCBparam);
00129 
00135 SceVoid sceMpegRingbufferDestruct(SceMpegRingbuffer* Ringbuffer);
00136 
00144 SceInt32 sceMpegRingbufferAvailableSize(SceMpegRingbuffer* Ringbuffer);
00145 
00155 SceInt32 sceMpegRingbufferPut(SceMpegRingbuffer* Ringbuffer, SceInt32 iNumPackets, SceInt32 iAvailable);
00156 
00164 SceInt32 sceMpegQueryMemSize(int iUnk);
00165 
00179 SceInt32 sceMpegCreate(SceMpeg* Mpeg, ScePVoid pData, SceInt32 iSize, SceMpegRingbuffer* Ringbuffer, SceInt32 iFrameWidth, SceInt32 iUnk1, SceInt32 iUnk2);
00180 
00186 SceVoid sceMpegDelete(SceMpeg* Mpeg);
00187 
00197 SceInt32 sceMpegQueryStreamOffset(SceMpeg* Mpeg, ScePVoid pBuffer, SceInt32* iOffset);
00198 
00207 SceInt32 sceMpegQueryStreamSize(ScePVoid pBuffer, SceInt32* iSize);
00208 
00218 SceMpegStream* sceMpegRegistStream(SceMpeg* Mpeg, SceInt32 iStreamID, SceInt32 iUnk);
00219 
00226 SceVoid sceMpegUnRegistStream(SceMpeg Mpeg, SceMpegStream* pStream);
00227 
00233 SceInt32 sceMpegFlushAllStream(SceMpeg* Mpeg);
00234 
00240 ScePVoid sceMpegMallocAvcEsBuf(SceMpeg* Mpeg);
00241 
00246 SceVoid sceMpegFreeAvcEsBuf(SceMpeg* Mpeg, ScePVoid pBuf);
00247 
00257 SceInt32 sceMpegQueryAtracEsSize(SceMpeg* Mpeg, SceInt32* iEsSize, SceInt32* iOutSize);
00258 
00268 SceInt32 sceMpegInitAu(SceMpeg* Mpeg, ScePVoid pEsBuffer, SceMpegAu* pAu);
00269 
00280 SceInt32 sceMpegGetAvcAu(SceMpeg* Mpeg, SceMpegStream* pStream, SceMpegAu* pAu, SceInt32* iUnk);
00281 
00289 SceInt32 sceMpegAvcDecodeMode(SceMpeg* Mpeg, SceMpegAvcMode* pMode);
00290 
00302 SceInt32 sceMpegAvcDecode(SceMpeg* Mpeg, SceMpegAu* pAu, SceInt32 iFrameWidth, ScePVoid pBuffer, SceInt32* iInit);
00303 
00314 SceInt32 sceMpegAvcDecodeStop(SceMpeg* Mpeg, SceInt32 iFrameWidth, ScePVoid pBuffer, SceInt32* iStatus);
00315 
00326 SceInt32 sceMpegGetAtracAu(SceMpeg* Mpeg, SceMpegStream* pStream, SceMpegAu* pAu, ScePVoid pUnk);
00327 
00338 SceInt32 sceMpegAtracDecode(SceMpeg* Mpeg, SceMpegAu* pAu, ScePVoid pBuffer, SceInt32 iInit);
00339 
00340 #ifdef __cplusplus
00341 }
00342 #endif
00343 
00344 #endif

Generated on Tue Jul 24 15:21:23 2007 for PSPSDK-Rev2272 by  doxygen 1.5.2