PSP2SDK  dirty-f9e4f2d
The free SDK for PSP2
include/psp2/camera.h
Go to the documentation of this file.
00001 
00012 #ifndef _PSP2_CAMERA_H_
00013 #define _PSP2_CAMERA_H_
00014 
00015 #include <psp2/types.h>
00016 #include <stdint.h>
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00022 enum {
00023     SCE_CAMERA_ERROR_PARAM              = 0x802e0000,
00024     SCE_CAMERA_ERROR_ALREADY_INIT       = 0x802e0001,
00025     SCE_CAMERA_ERROR_NOT_INIT       = 0x802e0002,
00026     SCE_CAMERA_ERROR_ALREADY_OPEN       = 0x802e0003,
00027     SCE_CAMERA_ERROR_NOT_OPEN       = 0x802e0004,
00028     SCE_CAMERA_ERROR_ALREADY_START      = 0x802e0005,
00029     SCE_CAMERA_ERROR_NOT_START      = 0x802e0006,
00030     SCE_CAMERA_ERROR_FORMAT_UNKNOWN     = 0x802e0007,
00031     SCE_CAMERA_ERROR_RESOLUTION_UNKNOWN = 0x802e0008,
00032     SCE_CAMERA_ERROR_BAD_FRAMERATE      = 0x802e0009,
00033     SCE_CAMERA_ERROR_TIMEOUT        = 0x802e000a,
00034     SCE_CAMERA_ERROR_EXCLUSIVE      = 0x802e000b,
00035     SCE_CAMERA_ERROR_ATTRIBUTE_UNKNOWN  = 0x802e000c,
00036     SCE_CAMERA_ERROR_MAX_PROCESS        = 0x802e000d,
00037     SCE_CAMERA_ERROR_NOT_ACTIVE     = 0x802e000e,
00038     SCE_CAMERA_ERROR_FATAL          = 0x802e00ff
00039 };
00040 
00041 typedef struct SceCameraInfo {
00042     SceSize size;
00043     uint16_t priority;
00044     uint16_t format;
00045     uint16_t resolution;
00046     uint16_t framerate;
00047     uint16_t width;
00048     uint16_t height;
00049     uint16_t range;
00050     uint16_t pad;
00051     SceSize sizeIBase;
00052     SceSize sizeUBase;
00053     SceSize sizeVBase;
00054     void *pIBase;
00055     void *pUBase;
00056     void *pVBase;
00057     uint16_t pitch;
00058     uint16_t buffer;
00059 } SceCameraInfo;
00060 
00061 typedef struct SceCameraRead {
00062     SceSize size;
00063     int mode;
00064     int pad;
00065     int status;
00066     uint64_t frame;
00067     uint64_t timestamp;
00068     SceSize sizeIBase;
00069     SceSize sizeUBase;
00070     SceSize sizeVBase;
00071     void *pIBase;
00072     void *pUBase;
00073     void *pVBase;
00074 } SceCameraRead;
00075 
00076 int sceCameraOpen(int devnum, SceCameraInfo *pInfo);
00077 int sceCameraClose(int devnum);
00078 int sceCameraStart(int devnum);
00079 int sceCameraStop(int devnum);
00080 int sceCameraRead(int devnum, SceCameraRead *pRead);
00081 int sceCameraIsActive(int devnum);
00082 int sceCameraGetSaturation(int devnum, int *pLevel);
00083 int sceCameraSetSaturation(int devnum, int level);
00084 int sceCameraGetBrightness(int devnum, int *pLevel);
00085 int sceCameraSetBrightness(int devnum, int level);
00086 int sceCameraGetContrast(int devnum, int *pLevel);
00087 int sceCameraSetContrast(int devnum, int level);
00088 int sceCameraGetSharpness(int devnum, int *pLevel);
00089 int sceCameraSetSharpness(int devnum, int level);
00090 int sceCameraGetReverse(int devnum, int *pMode);
00091 int sceCameraSetReverse(int devnum, int mode);
00092 int sceCameraGetEffect(int devnum, int *pMode);
00093 int sceCameraSetEffect(int devnum, int mode);
00094 int sceCameraGetEV(int devnum, int *pLevel);
00095 int sceCameraSetEV(int devnum, int level);
00096 int sceCameraGetZoom(int devnum, int *pLevel);
00097 int sceCameraSetZoom(int devnum, int level);
00098 int sceCameraGetAntiFlicker(int devnum, int *pMode);
00099 int sceCameraSetAntiFlicker(int devnum, int mode);
00100 int sceCameraGetISO(int devnum, int *pMode);
00101 int sceCameraSetISO(int devnum, int mode);
00102 int sceCameraGetGain(int devnum, int *pMode);
00103 int sceCameraSetGain(int devnum, int mode);
00104 int sceCameraGetWhiteBalance(int devnum, int *pMode);
00105 int sceCameraSetWhiteBalance(int devnum, int mode);
00106 int sceCameraGetBacklight(int devnum, int *pMode);
00107 int sceCameraSetBacklight(int devnum, int mode);
00108 int sceCameraGetNightmode(int devnum, int *pMode);
00109 int sceCameraSetNightmode(int devnum, int mode);
00110 int sceCameraGetExposureCeiling(int devnum, int *pMode);
00111 int sceCameraSetExposureCeiling(int devnum, int mode);
00112 int sceCameraGetAutoControlHold(int devnum, int *pMode);
00113 int sceCameraSetAutoControlHold(int devnum, int mode);
00114 int sceCameraGetEV(int devnum, int *pMode);
00115 int sceCameraSetEV(int devnum, int mode);
00116 int sceCameraGetDeviceLocation(int devnum, SceFVector3 *pLocation);
00117 
00118 #ifdef __cplusplus
00119 }
00120 #endif
00121 
00122 #endif /* _PSP2_CAMERA_H_ */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines