00001
00002
00003
00004 #ifndef VIDEOOUT_DVDV_PRIVATE_H
00005 #define VIDEOOUT_DVDV_PRIVATE_H
00006
00007 extern "C" {
00008 typedef int CGSConnectionID;
00009 typedef int CGSSurfaceID;
00010 struct CGSObj { };
00011 struct CGSBoolean : public CGSObj { };
00012 struct CGSString : public CGSObj { };
00013
00014
00015 CGSConnectionID _CGSDefaultConnection();
00016
00017 CGSConnectionID CGSMainConnectionID();
00018 OSErr CGSGetWindowBounds( CGSConnectionID conn, int windowID, CGRect * rect );
00019
00020 void CGSAddSurface( CGSConnectionID conn, int windowID, CGSSurfaceID * surfaceID );
00021 void CGSOrderSurface( CGSConnectionID conn, int windowID, CGSSurfaceID surfaceID, int unk1, int unk2 );
00022 void CGSSetSurfaceBounds( CGSConnectionID conn, int windowID, CGSSurfaceID surfaceID, CGRect rect );
00023
00024 CGSBoolean * CGSCreateBoolean( bool val );
00025 CGSString * CGSUniqueCString( char * str );
00026 void CGSReleaseObj( CGSObj * obj );
00027
00028 void CGSSetWindowProperty( CGSConnectionID conn, int windowID, CGSString * key, CGSObj * value );
00029
00030
00031 struct DVDVideoContext
00032 {
00033 };
00034
00035 typedef UInt64 uint64;
00036 #ifndef _UINT32
00037 typedef UInt32 uint32;
00038 #endif
00039 typedef UInt16 uint16;
00040 typedef unsigned char uint8;
00041
00042 typedef SInt64 sint64;
00043 #ifndef _SINT32
00044 typedef SInt32 sint32;
00045 #endif
00046 typedef SInt16 sint16;
00047 typedef signed char sint8;
00048
00049
00050 #pragma pack(1)
00051 struct CompletionInfo;
00052
00053
00054
00055 struct MBInfo
00056 {
00057 int mv0;
00058 int mv1;
00059 int mv2;
00060 int mv3;
00061 uint8 fieldSelect[4];
00062
00063 uint8 mbType;
00064 uint8 interlacedDCT;
00065 uint8 n[6];
00066 };
00067
00068 struct DCTSpec
00069 {
00070 uint8 runSubOne;
00071 uint8 lowOfEltHereLastFrame;
00072 uint16 elt;
00073 };
00074
00075 struct DecodeParams
00076 {
00077 uint8 pictType;
00078 uint8 zero1;
00079 uint16 sevenSixEight;
00080
00081 uint8 alternateScan;
00082 uint8 zero2;
00083 uint8 dstBuf;
00084 uint8 srcBufL;
00085
00086 uint8 srcBufR;
00087 uint8 zero3[3];
00088
00089 MBInfo *mbInfo;
00090 DCTSpec *dctSpecs;
00091 uint8 *cbp;
00092 uint8 *p4;
00093 CompletionInfo *completionInfo;
00094
00095
00096 };
00097
00098 struct CompletionInfo
00099 {
00100 void * funcTable;
00101 uint8 *unk1;
00102 int frameNumberToDisplay;
00103 int zero1;
00104 uint8 *frameDataToDisplay;
00105 int unk2[3];
00106
00107 };
00108
00109 struct CallbackTuple
00110 {
00111 void (*func)( int ret, int arg2 );
00112 int arg2;
00113
00114 static const CallbackTuple * DONT_RETURN_RESULT() { return (CallbackTuple*)-1; }
00115
00116
00117 };
00118
00119 struct DeinterlaceParams1
00120 {
00121 uint8 buf1;
00122 uint8 buf2;
00123 uint8 zero1[2];
00124
00125 int w1;
00126 int w2;
00127 int w3;
00128 };
00129
00130 struct DeinterlaceParams2
00131 {
00132 int unk1;
00133 int usedValue;
00134 int unk2;
00135 int unk3;
00136 int maybe[2];
00137
00138
00139 };
00140
00141 struct ShowBufferParams
00142 {
00143 uint16 h1;
00144 uint16 zero1;
00145 int w;
00146 int zero2[4];
00147
00148 };
00149
00150 #pragma pack()
00151
00152 extern int DVDVideoOpenDevice(
00153 CGDirectDisplayID cgDisplayID, CGSConnectionID cgSConnectionID, int windowID, CGSSurfaceID surfaceID,
00154 const short * rectIn, void * othOut, DVDVideoContext ** ppContext );
00155
00156
00157
00158
00159 extern int DVDVideoCloseDevice( DVDVideoContext * pContext );
00160
00161
00162 extern int DVDVideoSetMVLevel( DVDVideoContext * pContext, int level );
00163
00164 extern int DVDVideoClearMP( DVDVideoContext * pContext );
00165
00166 extern int DVDVideoSetMPRects( DVDVideoContext * context, short * rect, CGSSurfaceID surfaceID1, CGSSurfaceID surfaceID2 );
00167
00168 extern int DVDVideoEnableMP( DVDVideoContext * pContext, bool enable );
00169
00170 extern int DVDVideoSetFeatureParam( DVDVideoContext * pContext, int feat, int val );
00171
00172
00173 extern int DVDVideoDecode( DVDVideoContext * pContext,
00174 DecodeParams * params, short * rect, int unknownZero=0 );
00175
00176 extern int DVDVideoDeinterlace( DVDVideoContext * pContext,
00177 DeinterlaceParams1 * params1, DeinterlaceParams2 * params2, CallbackTuple * callback );
00178
00179 extern int DVDVideoShowMPBuffer( DVDVideoContext * pContext,
00180 int whichBuf, ShowBufferParams * params, CallbackTuple * callback );
00181 }
00182
00183 #endif // VIDEOOUT_DVDV_PRIVATE_H