wut
v1.7.0
Wii U Toolchain
|
Data Structures | |
struct | CAMEventData |
struct | CAMMode |
struct | CAMWorkMem |
struct | CAMStreamInfo |
struct | CAMSetupInfo |
struct | CAMSurface |
union | CAMEventData.__unnamed1__ |
struct | CAMEventData.__unnamed1__.decode |
struct | CAMEventData.__unnamed1__.detach |
Macros | |
#define | CAMERA_WIDTH 640 |
#define | CAMERA_PITCH 768 |
#define | CAMERA_HEIGHT 480 |
#define | CAMERA_Y_BUFFER_SIZE (CAMERA_PITCH * CAMERA_HEIGHT) |
#define | CAMERA_UV_BUFFER_SIZE (CAMERA_PITCH * CAMERA_HEIGHT / 2) |
#define | CAMERA_YUV_BUFFER_SIZE (CAMERA_Y_BUFFER_SIZE + CAMERA_UV_BUFFER_SIZE) |
#define | CAMERA_YUV_BUFFER_ALIGNMENT 256 |
Typedefs | |
typedef int | CAMHandle |
typedef int | CAMError |
typedef struct CAMEventData | CAMEventData |
typedef struct CAMMode | CAMMode |
typedef struct CAMWorkMem | CAMWorkMem |
typedef struct CAMStreamInfo | CAMStreamInfo |
typedef struct CAMSetupInfo | CAMSetupInfo |
typedef struct CAMSurface | CAMSurface |
typedef enum CamError | CamError |
typedef enum CamFps | CamFps |
typedef enum CamStreamType | CamStreamType |
typedef enum CamEventType | CamEventType |
typedef void(* | CAMEventHandler) (CAMEventData *camEventData) |
Enumerations | |
enum | CamError { CAMERA_ERROR_OK = 0 , CAMERA_ERROR_INVALID_ARG = -1 , CAMERA_ERROR_INVALID_HANDLE = -2 , CAMERA_ERROR_TOO_MANY_SURFACES = -4 , CAMERA_ERROR_INSUFFICIENT_MEMORY = -5 , CAMERA_ERROR_NOT_READY = -6 , CAMERA_ERROR_UNINITIALIZED = -8 , CAMERA_ERROR_UVC = -9 , CAMERA_ERROR_UVD_CONTEXT = -10 , CAMERA_ERROR_DEVICE_IN_USE = -12 , CAMERA_ERROR_UVD_SESSION = -13 , CAMERA_ERROR_SEGMENT_VIOLATION = -15 } |
enum | CamFps { CAMERA_FPS_15 = 0 , CAMERA_FPS_30 = 1 } |
enum | CamStreamType { CAMERA_STREAM_TYPE_1 = 0 } |
enum | CamEventType { CAMERA_DECODE_DONE = 0 , CAMERA_DRC_DETACH = 1 } |
Functions | |
CAMHandle | CAMInit (int instance, CAMSetupInfo *setupInfo, CAMError *err) |
Initialize the camera. More... | |
void | CAMExit (CAMHandle handle) |
Deinitialize and clean up. More... | |
CAMError | CAMOpen (CAMHandle handle) |
Start recording and decoding frames. More... | |
CAMError | CAMClose (CAMHandle handle) |
Stops recording and decoding. More... | |
int32_t | CAMGetMemReq (CAMStreamInfo *streamInfo) |
Get the number of bytes requied by the work memory. More... | |
CAMError | CAMSubmitTargetSurface (CAMHandle handle, CAMSurface *surface) |
Submit 1 surface to the working queue. More... | |
CAMError | CAMCheckMemSegmentation (void *pMem, uint32_t size) |
Checks whether memory is segmented correctly to be used with the camera library. More... | |
Variables | |
CamEventType | eventType |
Event type. More... | |
void * | surfaceBuffer |
Pointer to the buffer of the decoded image. More... | |
CAMHandle | handle |
Handle of instance. More... | |
BOOL | failed |
TRUE if decode failed. More... | |
struct { | |
void * | surfaceBuffer |
Pointer to the buffer of the decoded image. More... | |
CAMHandle | handle |
Handle of instance. More... | |
BOOL | failed |
TRUE if decode failed. More... | |
} | decode |
BOOL | connected |
Will be FALSE. More... | |
CAMHandle | handle |
Handle of instance. More... | |
struct { | |
BOOL | connected |
Will be FALSE. More... | |
CAMHandle | handle |
Handle of instance. More... | |
} | detach |
uint32_t | args [3] |
Event args. More... | |
union { | |
struct { | |
void * | surfaceBuffer |
Pointer to the buffer of the decoded image. More... | |
CAMHandle | handle |
Handle of instance. More... | |
BOOL | failed |
TRUE if decode failed. More... | |
} | decode |
struct { | |
BOOL | connected |
Will be FALSE. More... | |
CAMHandle | handle |
Handle of instance. More... | |
} | detach |
uint32_t | args [3] |
Event args. More... | |
}; | |
BOOL | forceDrc |
If TRUE, the GamePad will display the camera output regardless of what is being rendered. More... | |
CamFps | fps |
Framerate setting. More... | |
uint32_t | size |
Size of the work memory. More... | |
void * | pMem |
Pointer to the work memory. More... | |
CamStreamType | type |
Stream type, only CAMERA_STREAM_TYPE_1 is valid. More... | |
uint32_t | height |
Stream height. More... | |
uint32_t | width |
Stream width. More... | |
CAMStreamInfo | streamInfo |
Stream info. More... | |
CAMWorkMem | workMem |
Memory used by library to record and decode frames. More... | |
CAMEventHandler | eventHandler |
Event handler. More... | |
CAMMode | mode |
Camera mode. More... | |
uint32_t | threadAffinity |
See OS_THREAD_ATTRIB. More... | |
int32_t | surfaceSize |
Number of bytes allocated to surface buffer. More... | |
void * | surfaceBuffer |
Surface buffer data. More... | |
int32_t | height |
Surface height. More... | |
int32_t | width |
Surface width. More... | |
int32_t | pitch |
Surface pitch. More... | |
int32_t | alignment |
Surface alignment. More... | |
int32_t | tileMode |
Tile mode, should be zero. More... | |
int32_t | pixelFormat |
Pixel format, Should be zero. More... | |
struct CAMEventData |
Data Fields | ||
---|---|---|
CamEventType | eventType | Event type. |
union CAMEventData | __unnamed__ |
struct CAMMode |
struct CAMWorkMem |
struct CAMStreamInfo |
Data Fields | ||
---|---|---|
CamStreamType | type | Stream type, only CAMERA_STREAM_TYPE_1 is valid. |
uint32_t | height | Stream height. |
uint32_t | width | Stream width. |
struct CAMSetupInfo |
Data Fields | ||
---|---|---|
CAMStreamInfo | streamInfo | Stream info. |
CAMWorkMem | workMem | Memory used by library to record and decode frames. |
CAMEventHandler | eventHandler | Event handler. |
CAMMode | mode | Camera mode. |
uint32_t | threadAffinity | See OS_THREAD_ATTRIB. |
struct CAMSurface |
union CAMEventData.__unnamed1__ |
Data Fields | ||
---|---|---|
__unnamed1__ | decode | |
__unnamed1__ | detach | |
uint32_t | args[3] | Event args. |
struct CAMEventData.__unnamed1__.decode |
struct CAMEventData.__unnamed1__.detach |
#define CAMERA_Y_BUFFER_SIZE (CAMERA_PITCH * CAMERA_HEIGHT) |
#define CAMERA_UV_BUFFER_SIZE (CAMERA_PITCH * CAMERA_HEIGHT / 2) |
#define CAMERA_YUV_BUFFER_SIZE (CAMERA_Y_BUFFER_SIZE + CAMERA_UV_BUFFER_SIZE) |
typedef struct CAMEventData CAMEventData |
typedef struct CAMWorkMem CAMWorkMem |
typedef struct CAMStreamInfo CAMStreamInfo |
typedef struct CAMSetupInfo CAMSetupInfo |
typedef struct CAMSurface CAMSurface |
typedef enum CamStreamType CamStreamType |
typedef enum CamEventType CamEventType |
typedef void(* CAMEventHandler) (CAMEventData *camEventData) |
enum CamError |
enum CamStreamType |
enum CamEventType |
CAMHandle CAMInit | ( | int | instance, |
CAMSetupInfo * | setupInfo, | ||
CAMError * | err | ||
) |
Initialize the camera.
void CAMExit | ( | CAMHandle | handle | ) |
Deinitialize and clean up.
Stops recording and decoding.
Automatically called when the process is moved to background
int32_t CAMGetMemReq | ( | CAMStreamInfo * | streamInfo | ) |
Get the number of bytes requied by the work memory.
CAMError CAMSubmitTargetSurface | ( | CAMHandle | handle, |
CAMSurface * | surface | ||
) |
Submit 1 surface to the working queue.
Once the frame is captured and decoded, the event handler set in CAMInit will fire, and the frame will be dequeued. Up to 20 surfaces may be queued. Surface data is returned in the NV12 format
CAMError CAMCheckMemSegmentation | ( | void * | pMem, |
uint32_t | size | ||
) |
Checks whether memory is segmented correctly to be used with the camera library.
CamEventType eventType |
void* surfaceBuffer |
struct { ... } decode |
struct { ... } detach |
union { ... } |
BOOL forceDrc |
CamStreamType type |
CAMStreamInfo streamInfo |
CAMWorkMem workMem |
CAMEventHandler eventHandler |
uint32_t threadAffinity |
See OS_THREAD_ATTRIB.
int32_t surfaceSize |