psl1ght
A free SDK for Sony's PS3 console
Loading...
Searching...
No Matches
camera.h File Reference
#include <ppu-types.h>
#include <sys/memory.h>

Go to the source code of this file.

Data Structures

struct  _camera_info
 
struct  _camera_info_ex
 
struct  _camera_read_info
 

Macros

#define CAMERA_ERRO_DOUBLE_INIT   0x80140801
 
#define CAMERA_ERRO_NEED_INIT   0x80140803
 
#define CAMERA_ERRO_BAD_PARAM   0x80140804
 
#define CAMERA_ERRO_DOUBLE_OPEN   0x80140805
 
#define CAMERA_ERRO_NEED_OPEN   0x80140806
 
#define CAMERA_ERRO_NO_DEVICE_FOUND   0x80140807
 
#define CAMERA_ERRO_DEVICE_DEACTIVATED   0x80140808
 
#define CAMERA_ERRO_NEED_START   0x80140809
 
#define CAMERA_ERRO_UNKNOWN_FORMAT   0x8014080a
 
#define CAMERA_ERRO_UNKNOWN_RESOLUTION   0x8014080b
 
#define CAMERA_ERRO_BAD_FRAMERATE   0x8014080c
 
#define CAMERA_ERRO_TIMEOUT   0x8014080d
 
#define CAMERA_ERRO_BUSY   0x8014080e
 
#define CAMERA_ERRO_FATAL   0x8014080f
 
#define CAMERA_ERRO_MUTEX   0x80140810
 

Typedefs

typedef enum _camera_attrib cameraAttrib
 
typedef enum _camera_type cameraType
 
typedef enum _camera_format cameraFormat
 
typedef enum _camera_resolution cameraResolution
 
typedef struct _camera_info cameraInfo
 
typedef struct _camera_info_ex cameraInfoEx
 
typedef struct _camera_read_info cameraReadInfo
 

Enumerations

enum  _camera_attrib {
  CAM_ATTR_GAIN , CAM_ATTR_RED_BLUE_GAIN , CAM_ATTR_SATURATION , CAM_ATTR_EXPOSURE ,
  CAM_ATTR_BRIGHTNESS , CAM_ATTR_AUTO_EXPOSURE , CAM_ATTR_AUTO_GAIN_CONTROL , CAM_ATTR_AUTO_WHITE_BALANCE ,
  CAM_ATTR_AUTO_BRIGHTNESS , CAM_ATTR_LED , CAM_ATTR_AUDIO_GAIN , CAM_ATTR_QS ,
  CAM_ATTR_NONZERO_COEFFS , CAM_ATTR_YUV_FLAG , CAM_ATTR_JPEG_FLAG , CAM_ATTR_BACKLIGHT_COMPENSATION ,
  CAM_ATTR_MIRROR_FLAG , CAM_ATTR_MEASURED_QS , CAM_ATTR_422_FLAG , CAM_ATTR_USBLOAD ,
  CAM_ATTR_GAMMA , CAM_ATTR_GREEN_GAIN , CAM_ATTR_AUTO_GAIN_CONTROL_LIMIT , CAM_ATTR_DENOISE ,
  CAM_ATTR_FRAMERATE_ADJUST , CAM_ATTR_PIXEL_OUTLIER_FILTER , CAM_ATTR_AUTO_GAIN_CONTROL_LOW , CAM_ATTR_AUTO_GAIN_CONTROL_HIGH ,
  CAM_ATTR_FORMAT_CAP =100 , CAM_ATTR_FORMAT_INDEX , CAM_ATTR_FRAME_NUM , CAM_ATTR_FRAME_INDEX ,
  CAM_ATTR_FRAME_SIZE , CAM_ATTR_INTERVAL_TYPE , CAM_ATTR_INTERVAL_INDEX , CAM_ATTR_INTERVAL_VALUE ,
  CAM_ATTR_COLOR_MATCHING , CAM_ATTR_PL_FREQ , CAM_ATTR_DEV_ID , CAM_ATTR_DEV_CAP ,
  CAM_ATTR_DEV_SPEED , CAM_ATTR_USBVIDCLASS_REQUEST_CODE , CAM_ATTR_USBVIDCLASS_REQUEST_DATA , CAM_ATTR_DEVICE_ID ,
  CAM_ATTR_READ_MODE =300 , CAM_ATTR_GAME_PID , CAM_ATTR_PBUFFER , CAM_ATTR_READ_FINISH ,
  CAM_ATTR_UNKNOWN =500
}
 
enum  _camera_type { CAM_TYPE_UNKNOWN , CAM_TYPE_EYETOY , CAM_TYPE_PLAYSTATION_EYE , CAM_TYPE_USBVIDEO_CLASS }
 
enum  _camera_format {
  CAM_FORM_UNKNOWN , CAM_FORM_JPG , CAM_FORM_RAW8 , CAM_FORM_YUV422 ,
  CAM_FORM_RAW10 , CAM_FORM_RGBA , CAM_FORM_YUV420
}
 
enum  _camera_resolution {
  CAM_RESO_UNKNOWN , CAM_RESO_VGA , CAM_RESO_QVGA , CAM_RESO_WGA ,
  CAM_RESO_SPECIFIED
}
 

Functions

s32 cameraInit ()
 
s32 cameraEnd ()
 
s32 cameraStart (s32 num)
 
s32 cameraStop (s32 num)
 
s32 cameraOpenEx (s32 num, cameraInfoEx *info)
 
s32 cameraClose (s32 num)
 
s32 cameraRead (s32 num, u32 *frame, u32 *readcount)
 
s32 cameraReadEx (s32 num, cameraReadInfo *info)
 
s32 cameraGetBufferInfoEx (s32 num, cameraInfoEx *info)
 
s32 cameraReset (s32 num)
 
s32 cameraGetAttribute (s32 num, cameraAttrib attribute, u32 *arg0, u32 *arg1)
 
s32 cameraSetAttribute (s32 num, cameraAttrib attribute, u32 arg0, u32 arg1)
 
s32 cameraGetType (s32 num, cameraType *type)
 
s32 cameraGetDeviceGUID (s32 num, u32 *guid)
 
s32 cameraGetBufferSize (s32 num, cameraInfoEx *info)
 
s32 cameraIsStarted (s32 num)
 
s32 cameraIsOpen (s32 num)
 
s32 cameraIsAvailable (s32 num)
 
s32 cameraIsAttached (s32 num)
 
s32 cameraSetNotifyEventQueue (u64 key)
 
s32 cameraSetNotifyEventQueue2 (u64 key, u64 source, u64 flag)
 
s32 cameraRemoveNotifyEventQueue (u64 key)
 
s32 cameraRemoveNotifyEventQueue2 (u64 key)
 
s32 cameraReadComplete (s32 num, u32 buf, u32 arg)
 
s32 cameraPrepExtensionUnit (s32 num, u8 *guidExtCode)
 
s32 cameraCtrlExtensionUnit (s32 num, u8 req, u16 wval, u16 wlen, u8 *data)
 
s32 cameraGetExtensionUnit (s32 num, u16 wval, u16 wlen, u8 *data)
 
s32 cameraSetExtensionUnit (s32 num, u16 wval, u16 wlen, u8 *data)
 

Macro Definition Documentation

◆ CAMERA_ERRO_BAD_FRAMERATE

#define CAMERA_ERRO_BAD_FRAMERATE   0x8014080c

Definition at line 17 of file camera.h.

◆ CAMERA_ERRO_BAD_PARAM

#define CAMERA_ERRO_BAD_PARAM   0x80140804

Definition at line 9 of file camera.h.

◆ CAMERA_ERRO_BUSY

#define CAMERA_ERRO_BUSY   0x8014080e

Definition at line 19 of file camera.h.

◆ CAMERA_ERRO_DEVICE_DEACTIVATED

#define CAMERA_ERRO_DEVICE_DEACTIVATED   0x80140808

Definition at line 13 of file camera.h.

◆ CAMERA_ERRO_DOUBLE_INIT

#define CAMERA_ERRO_DOUBLE_INIT   0x80140801

Definition at line 7 of file camera.h.

◆ CAMERA_ERRO_DOUBLE_OPEN

#define CAMERA_ERRO_DOUBLE_OPEN   0x80140805

Definition at line 10 of file camera.h.

◆ CAMERA_ERRO_FATAL

#define CAMERA_ERRO_FATAL   0x8014080f

Definition at line 20 of file camera.h.

◆ CAMERA_ERRO_MUTEX

#define CAMERA_ERRO_MUTEX   0x80140810

Definition at line 21 of file camera.h.

◆ CAMERA_ERRO_NEED_INIT

#define CAMERA_ERRO_NEED_INIT   0x80140803

Definition at line 8 of file camera.h.

◆ CAMERA_ERRO_NEED_OPEN

#define CAMERA_ERRO_NEED_OPEN   0x80140806

Definition at line 11 of file camera.h.

◆ CAMERA_ERRO_NEED_START

#define CAMERA_ERRO_NEED_START   0x80140809

Definition at line 14 of file camera.h.

◆ CAMERA_ERRO_NO_DEVICE_FOUND

#define CAMERA_ERRO_NO_DEVICE_FOUND   0x80140807

Definition at line 12 of file camera.h.

◆ CAMERA_ERRO_TIMEOUT

#define CAMERA_ERRO_TIMEOUT   0x8014080d

Definition at line 18 of file camera.h.

◆ CAMERA_ERRO_UNKNOWN_FORMAT

#define CAMERA_ERRO_UNKNOWN_FORMAT   0x8014080a

Definition at line 15 of file camera.h.

◆ CAMERA_ERRO_UNKNOWN_RESOLUTION

#define CAMERA_ERRO_UNKNOWN_RESOLUTION   0x8014080b

Definition at line 16 of file camera.h.

Typedef Documentation

◆ cameraAttrib

◆ cameraFormat

◆ cameraInfo

typedef struct _camera_info cameraInfo

◆ cameraInfoEx

typedef struct _camera_info_ex cameraInfoEx

◆ cameraReadInfo

◆ cameraResolution

◆ cameraType

typedef enum _camera_type cameraType

Enumeration Type Documentation

◆ _camera_attrib

Enumerator
CAM_ATTR_GAIN 
CAM_ATTR_RED_BLUE_GAIN 
CAM_ATTR_SATURATION 
CAM_ATTR_EXPOSURE 
CAM_ATTR_BRIGHTNESS 
CAM_ATTR_AUTO_EXPOSURE 
CAM_ATTR_AUTO_GAIN_CONTROL 
CAM_ATTR_AUTO_WHITE_BALANCE 
CAM_ATTR_AUTO_BRIGHTNESS 
CAM_ATTR_LED 
CAM_ATTR_AUDIO_GAIN 
CAM_ATTR_QS 
CAM_ATTR_NONZERO_COEFFS 
CAM_ATTR_YUV_FLAG 
CAM_ATTR_JPEG_FLAG 
CAM_ATTR_BACKLIGHT_COMPENSATION 
CAM_ATTR_MIRROR_FLAG 
CAM_ATTR_MEASURED_QS 
CAM_ATTR_422_FLAG 
CAM_ATTR_USBLOAD 
CAM_ATTR_GAMMA 
CAM_ATTR_GREEN_GAIN 
CAM_ATTR_AUTO_GAIN_CONTROL_LIMIT 
CAM_ATTR_DENOISE 
CAM_ATTR_FRAMERATE_ADJUST 
CAM_ATTR_PIXEL_OUTLIER_FILTER 
CAM_ATTR_AUTO_GAIN_CONTROL_LOW 
CAM_ATTR_AUTO_GAIN_CONTROL_HIGH 
CAM_ATTR_FORMAT_CAP 
CAM_ATTR_FORMAT_INDEX 
CAM_ATTR_FRAME_NUM 
CAM_ATTR_FRAME_INDEX 
CAM_ATTR_FRAME_SIZE 
CAM_ATTR_INTERVAL_TYPE 
CAM_ATTR_INTERVAL_INDEX 
CAM_ATTR_INTERVAL_VALUE 
CAM_ATTR_COLOR_MATCHING 
CAM_ATTR_PL_FREQ 
CAM_ATTR_DEV_ID 
CAM_ATTR_DEV_CAP 
CAM_ATTR_DEV_SPEED 
CAM_ATTR_USBVIDCLASS_REQUEST_CODE 
CAM_ATTR_USBVIDCLASS_REQUEST_DATA 
CAM_ATTR_DEVICE_ID 
CAM_ATTR_READ_MODE 
CAM_ATTR_GAME_PID 
CAM_ATTR_PBUFFER 
CAM_ATTR_READ_FINISH 
CAM_ATTR_UNKNOWN 

Definition at line 27 of file camera.h.

◆ _camera_format

Enumerator
CAM_FORM_UNKNOWN 
CAM_FORM_JPG 
CAM_FORM_RAW8 
CAM_FORM_YUV422 
CAM_FORM_RAW10 
CAM_FORM_RGBA 
CAM_FORM_YUV420 

Definition at line 91 of file camera.h.

◆ _camera_resolution

Enumerator
CAM_RESO_UNKNOWN 
CAM_RESO_VGA 
CAM_RESO_QVGA 
CAM_RESO_WGA 
CAM_RESO_SPECIFIED 

Definition at line 102 of file camera.h.

◆ _camera_type

Enumerator
CAM_TYPE_UNKNOWN 
CAM_TYPE_EYETOY 
CAM_TYPE_PLAYSTATION_EYE 
CAM_TYPE_USBVIDEO_CLASS 

Definition at line 83 of file camera.h.

Function Documentation

◆ cameraClose()

s32 cameraClose ( s32  num)

◆ cameraCtrlExtensionUnit()

s32 cameraCtrlExtensionUnit ( s32  num,
u8  req,
u16  wval,
u16  wlen,
u8 *  data 
)

◆ cameraEnd()

s32 cameraEnd ( )

◆ cameraGetAttribute()

s32 cameraGetAttribute ( s32  num,
cameraAttrib  attribute,
u32 *  arg0,
u32 *  arg1 
)

◆ cameraGetBufferInfoEx()

s32 cameraGetBufferInfoEx ( s32  num,
cameraInfoEx info 
)

◆ cameraGetBufferSize()

s32 cameraGetBufferSize ( s32  num,
cameraInfoEx info 
)

◆ cameraGetDeviceGUID()

s32 cameraGetDeviceGUID ( s32  num,
u32 *  guid 
)

◆ cameraGetExtensionUnit()

s32 cameraGetExtensionUnit ( s32  num,
u16  wval,
u16  wlen,
u8 *  data 
)

◆ cameraGetType()

s32 cameraGetType ( s32  num,
cameraType type 
)

◆ cameraInit()

s32 cameraInit ( )

◆ cameraIsAttached()

s32 cameraIsAttached ( s32  num)

◆ cameraIsAvailable()

s32 cameraIsAvailable ( s32  num)

◆ cameraIsOpen()

s32 cameraIsOpen ( s32  num)

◆ cameraIsStarted()

s32 cameraIsStarted ( s32  num)

◆ cameraOpenEx()

s32 cameraOpenEx ( s32  num,
cameraInfoEx info 
)

◆ cameraPrepExtensionUnit()

s32 cameraPrepExtensionUnit ( s32  num,
u8 *  guidExtCode 
)

◆ cameraRead()

s32 cameraRead ( s32  num,
u32 *  frame,
u32 *  readcount 
)

◆ cameraReadComplete()

s32 cameraReadComplete ( s32  num,
u32  buf,
u32  arg 
)

◆ cameraReadEx()

s32 cameraReadEx ( s32  num,
cameraReadInfo info 
)

◆ cameraRemoveNotifyEventQueue()

s32 cameraRemoveNotifyEventQueue ( u64  key)

◆ cameraRemoveNotifyEventQueue2()

s32 cameraRemoveNotifyEventQueue2 ( u64  key)

◆ cameraReset()

s32 cameraReset ( s32  num)

◆ cameraSetAttribute()

s32 cameraSetAttribute ( s32  num,
cameraAttrib  attribute,
u32  arg0,
u32  arg1 
)

◆ cameraSetExtensionUnit()

s32 cameraSetExtensionUnit ( s32  num,
u16  wval,
u16  wlen,
u8 *  data 
)

◆ cameraSetNotifyEventQueue()

s32 cameraSetNotifyEventQueue ( u64  key)

◆ cameraSetNotifyEventQueue2()

s32 cameraSetNotifyEventQueue2 ( u64  key,
u64  source,
u64  flag 
)

◆ cameraStart()

s32 cameraStart ( s32  num)

◆ cameraStop()

s32 cameraStop ( s32  num)