00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __PSPUSBCAM_H__
00013 #define __PSPUSBCAM_H__
00014
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018
00019 #define PSP_USBCAM_PID (0x282)
00020 #define PSP_USBCAM_DRIVERNAME "USBCamDriver"
00021 #define PSP_USBCAMMIC_DRIVERNAME "USBCamMicDriver"
00022
00026 enum PspUsbCamResolution
00027 {
00028 PSP_USBCAM_RESOLUTION_160_120 = 0,
00029 PSP_USBCAM_RESOLUTION_176_144 = 1,
00030 PSP_USBCAM_RESOLUTION_320_240 = 2,
00031 PSP_USBCAM_RESOLUTION_352_288 = 3,
00032 PSP_USBCAM_RESOLUTION_640_480 = 4,
00033 PSP_USBCAM_RESOLUTION_1024_768 = 5,
00034 PSP_USBCAM_RESOLUTION_1280_960 = 6,
00035 PSP_USBCAM_RESOLUTION_480_272 = 7,
00036 PSP_USBCAM_RESOLUTION_360_272 = 8,
00037 };
00038
00042 enum PspUsbCamResolutionEx
00043 {
00044 PSP_USBCAM_RESOLUTION_EX_160_120 = 0,
00045 PSP_USBCAM_RESOLUTION_EX_176_144 = 1,
00046 PSP_USBCAM_RESOLUTION_EX_320_240 = 2,
00047 PSP_USBCAM_RESOLUTION_EX_352_288 = 3,
00048 PSP_USBCAM_RESOLUTION_EX_360_272 = 4,
00049 PSP_USBCAM_RESOLUTION_EX_480_272 = 5,
00050 PSP_USBCAM_RESOLUTION_EX_640_480 = 6,
00051 PSP_USBCAM_RESOLUTION_EX_1024_768 = 7,
00052 PSP_USBCAM_RESOLUTION_EX_1280_960 = 8,
00053 };
00054
00056 enum PspUsbCamReverseFlags
00057 {
00058 PSP_USBCAM_FLIP = 1,
00059 PSP_USBCAM_MIRROR = 0x100,
00060 };
00061
00063 enum PspUsbCamDelay
00064 {
00065 PSP_USBCAM_NODELAY = 0,
00066 PSP_USBCAM_DELAY_10SEC = 1,
00067 PSP_USBCAM_DELAY_20SEC = 2,
00068 PSP_USBCAM_DELAY_30SEC = 3,
00069 };
00070
00072 enum PspUsbCamFrameRate
00073 {
00074 PSP_USBCAM_FRAMERATE_3_75_FPS = 0,
00075 PSP_USBCAM_FRAMERATE_5_FPS = 1,
00076 PSP_USBCAM_FRAMERATE_7_5_FPS = 2,
00077 PSP_USBCAM_FRAMERATE_10_FPS = 3,
00078 PSP_USBCAM_FRAMERATE_15_FPS = 4,
00079 PSP_USBCAM_FRAMERATE_20_FPS = 5,
00080 PSP_USBCAM_FRAMERATE_30_FPS = 6,
00081 PSP_USBCAM_FRAMERATE_60_FPS = 7,
00082 };
00083
00085 enum PspUsbCamWB
00086 {
00087 PSP_USBCAM_WB_AUTO = 0,
00088 PSP_USBCAM_WB_DAYLIGHT = 1,
00089 PSP_USBCAM_WB_FLUORESCENT = 2,
00090 PSP_USBCAM_WB_INCADESCENT = 3,
00091 };
00092
00094 enum PspUsbCamEffectMode
00095 {
00096 PSP_USBCAM_EFFECTMODE_NORMAL = 0,
00097 PSP_USBCAM_EFFECTMODE_NEGATIVE = 1,
00098 PSP_USBCAM_EFFECTMODE_BLACKWHITE = 2,
00099 PSP_USBCAM_EFFECTMODE_SEPIA = 3,
00100 PSP_USBCAM_EFFECTMODE_BLUE = 4,
00101 PSP_USBCAM_EFFECTMODE_RED = 5,
00102 PSP_USBCAM_EFFECTMODE_GREEN = 6,
00103 };
00104
00106 enum PspUsbCamEVLevel
00107 {
00108 PSP_USBCAM_EVLEVEL_2_0_POSITIVE = 0,
00109 PSP_USBCAM_EVLEVEL_1_7_POSITIVE = 1,
00110 PSP_USBCAM_EVLEVEL_1_5_POSITIVE = 2,
00111 PSP_USBCAM_EVLEVEL_1_3_POSITIVE = 3,
00112 PSP_USBCAM_EVLEVEL_1_0_POSITIVE = 4,
00113 PSP_USBCAM_EVLEVEL_0_7_POSITIVE = 5,
00114 PSP_USBCAM_EVLEVEL_0_5_POSITIVE = 6,
00115 PSP_USBCAM_EVLEVEL_0_3_POSITIVE = 7,
00116 PSP_USBCAM_EVLEVEL_0_0 = 8,
00117 PSP_USBCAM_EVLEVEL_0_3_NEGATIVE = 9,
00118 PSP_USBCAM_EVLEVEL_0_5_NEGATIVE = 10,
00119 PSP_USBCAM_EVLEVEL_0_7_NEGATIVE = 11,
00120 PSP_USBCAM_EVLEVEL_1_0_NEGATIVE = 12,
00121 PSP_USBCAM_EVLEVEL_1_3_NEGATIVE = 13,
00122 PSP_USBCAM_EVLEVEL_1_5_NEGATIVE = 14,
00123 PSP_USBCAM_EVLEVEL_1_7_NEGATIVE = 15,
00124 PSP_USBCAM_EVLEVEL_2_0_NEGATIVE = 16,
00125 };
00126
00127
00128
00130 typedef struct PspUsbCamSetupStillParam {
00132 int size;
00134 int resolution;
00136 int jpegsize;
00138 int reverseflags;
00140 int delay;
00143 int complevel;
00144 } PspUsbCamSetupStillParam;
00145
00147 typedef struct PspUsbCamSetupStillExParam {
00149 int size;
00151 u32 unk;
00153 int resolution;
00155 int jpegsize;
00158 int complevel;
00160 u32 unk2;
00162 u32 unk3;
00164 int flip;
00166 int mirror;
00168 int delay;
00170 u32 unk4[5];
00171 } PspUsbCamSetupStillExParam;
00172
00173 typedef struct PspUsbCamSetupVideoParam {
00175 int size;
00177 int resolution;
00179 int framerate;
00181 int wb;
00183 int saturation;
00185 int brightness;
00187 int contrast;
00189 int sharpness;
00191 int effectmode;
00193 int framesize;
00195 u32 unk;
00197 int evlevel;
00198 } PspUsbCamSetupVideoParam;
00199
00200 typedef struct PspUsbCamSetupVideoExParam {
00202 int size;
00203
00204 u32 unk;
00206 int resolution;
00208 int framerate;
00210 u32 unk2;
00212 u32 unk3;
00214 int wb;
00216 int saturation;
00218 int brightness;
00220 int contrast;
00222 int sharpness;
00224 u32 unk4;
00226 u32 unk5;
00228 u32 unk6[3];
00230 int effectmode;
00232 u32 unk7;
00234 u32 unk8;
00236 u32 unk9;
00238 u32 unk10;
00240 u32 unk11;
00242 int framesize;
00244 u32 unk12;
00246 int evlevel;
00247 } PspUsbCamSetupVideoExParam;
00248
00256 int sceUsbCamSetupStill(PspUsbCamSetupStillParam *param);
00257
00265 int sceUsbCamSetupStillEx(PspUsbCamSetupStillExParam *param);
00266
00276 int sceUsbCamStillInputBlocking(u8 *buf, SceSize size);
00277
00288 int sceUsbCamStillInput(u8 *buf, SceSize size);
00289
00295 int sceUsbCamStillWaitInputEnd(void);
00296
00303 int sceUsbCamStillPollInputEnd(void);
00304
00310 int sceUsbCamStillCancelInput(void);
00311
00317 int sceUsbCamStillGetInputLength(void);
00318
00328 int sceUsbCamSetupVideo(PspUsbCamSetupVideoParam *param, void *workarea, int wasize);
00329
00339 int sceUsbCamSetupVideoEx(PspUsbCamSetupVideoExParam *param, void *workarea, int wasize);
00340
00346 int sceUsbCamStartVideo(void);
00347
00353 int sceUsbCamStopVideo(void);
00354
00364 int sceUsbCamReadVideoFrameBlocking(u8 *buf, SceSize size);
00365
00376 int sceUsbCamReadVideoFrame(u8 *buf, SceSize size);
00377
00383 int sceUsbCamWaitReadVideoFrameEnd(void);
00384
00391 int sceUsbCamPollReadVideoFrameEnd(void);
00392
00398 int sceUsbCamGetReadVideoFrameSize(void);
00399
00407 int sceUsbCamSetSaturation(int saturation);
00408
00416 int sceUsbCamSetBrightness(int brightness);
00417
00425 int sceUsbCamSetContrast(int contrast);
00426
00434 int sceUsbCamSetSharpness(int sharpness);
00435
00443 int sceUsbCamSetImageEffectMode(int effectmode);
00444
00452 int sceUsbCamSetEvLevel(int ev);
00453
00461 int sceUsbCamSetReverseMode(int reverseflags);
00462
00470 int sceUsbCamSetZoom(int zoom);
00471
00479 int sceUsbCamGetSaturation(int *saturation);
00480
00488 int sceUsbCamGetBrightness(int *brightness);
00489
00497 int sceUsbCamGetContrast(int *contrast);
00498
00506 int sceUsbCamGetSharpness(int *sharpness);
00507
00515 int sceUsbCamGetImageEffectMode(int *effectmode);
00516
00524 int sceUsbCamGetEvLevel(int *ev);
00525
00533 int sceUsbCamGetReverseMode(int *reverseflags);
00534
00542 int sceUsbCamGetZoom(int *zoom);
00543
00552 int sceUsbCamAutoImageReverseSW(int on);
00553
00559 int sceUsbCamGetAutoImageReverseState(void);
00560
00567 int sceUsbCamGetLensDirection(void);
00568
00569 #ifdef __cplusplus
00570 }
00571 #endif
00572
00573 #endif
00574
00575
00576