15 #define CAMERA_WIDTH 640
16 #define CAMERA_PITCH 768
17 #define CAMERA_HEIGHT 480
19 #define CAMERA_Y_BUFFER_SIZE (CAMERA_PITCH * CAMERA_HEIGHT)
20 #define CAMERA_UV_BUFFER_SIZE (CAMERA_PITCH * CAMERA_HEIGHT / 2)
21 #define CAMERA_YUV_BUFFER_SIZE (CAMERA_Y_BUFFER_SIZE + CAMERA_UV_BUFFER_SIZE)
23 #define CAMERA_YUV_BUFFER_ALIGNMENT 256
95 WUT_CHECK_OFFSET(
CAMEventData, 0x04, decode.surfaceBuffer);
112 WUT_CHECK_OFFSET(
CAMMode, 0x00, forceDrc);
113 WUT_CHECK_OFFSET(
CAMMode, 0x04, fps);
153 WUT_PADDING_BYTES(0x10);
181 WUT_CHECK_OFFSET(
CAMSurface, 0x00, surfaceSize);
182 WUT_CHECK_OFFSET(
CAMSurface, 0x04, surfaceBuffer);
186 WUT_CHECK_OFFSET(
CAMSurface, 0x14, alignment);
188 WUT_CHECK_OFFSET(
CAMSurface, 0x1C, pixelFormat);
void CAMExit(CAMHandle handle)
Deinitialize and clean up.
CAMEventHandler eventHandler
Event handler.
uint32_t width
Stream width.
BOOL forceDrc
If TRUE, the GamePad will display the camera output regardless of what is being rendered.
CamEventType eventType
Event type.
int32_t width
Surface width.
CAMWorkMem workMem
Memory used by library to record and decode frames.
CAMError CAMCheckMemSegmentation(void *pMem, uint32_t size)
Checks whether memory is segmented correctly to be used with the camera library.
CAMStreamInfo streamInfo
Stream info.
uint32_t threadAffinity
See OS_THREAD_ATTRIB.
CAMError CAMClose(CAMHandle handle)
Stops recording and decoding.
CamFps fps
Framerate setting.
CAMHandle CAMInit(int instance, CAMSetupInfo *setupInfo, CAMError *err)
Initialize the camera.
int32_t surfaceSize
Number of bytes allocated to surface buffer.
int32_t height
Surface height.
uint32_t height
Stream height.
int32_t alignment
Surface alignment.
int32_t tileMode
Tile mode, should be zero.
int32_t pitch
Surface pitch.
int32_t pixelFormat
Pixel format, Should be zero.
CAMError CAMOpen(CAMHandle handle)
Start recording and decoding frames.
void(* CAMEventHandler)(CAMEventData *camEventData)
void * surfaceBuffer
Pointer to the buffer of the decoded image.
uint32_t size
Size of the work memory.
int32_t CAMGetMemReq(CAMStreamInfo *streamInfo)
Get the number of bytes requied by the work memory.
BOOL connected
Will be FALSE.
CamStreamType type
Stream type, only CAMERA_STREAM_TYPE_1 is valid.
CAMHandle handle
Handle of instance.
void * pMem
Pointer to the work memory.
CAMError CAMSubmitTargetSurface(CAMHandle handle, CAMSurface *surface)
Submit 1 surface to the working queue.
BOOL failed
TRUE if decode failed.
@ CAMERA_ERROR_INVALID_ARG
@ CAMERA_ERROR_TOO_MANY_SURFACES
@ CAMERA_ERROR_UVD_SESSION
@ CAMERA_ERROR_INVALID_HANDLE
@ CAMERA_ERROR_UVD_CONTEXT
@ CAMERA_ERROR_DEVICE_IN_USE
@ CAMERA_ERROR_UNINITIALIZED
@ CAMERA_ERROR_INSUFFICIENT_MEMORY
@ CAMERA_ERROR_SEGMENT_VIOLATION