[c-host] app: add initial frame capture support

This commit is contained in:
Geoffrey McRae
2019-03-02 20:33:21 +11:00
parent 7285f9e9ad
commit 61108ba760
2 changed files with 142 additions and 29 deletions

View File

@@ -31,7 +31,27 @@ typedef enum CaptureResult
}
CaptureResult;
struct CaptureInterface
typedef enum CaptureFormat
{
CAPTURE_FMT_BGRA,
CAPTURE_FMT_RGBA,
CAPTURE_FMT_RGBA10,
CAPTURE_FMT_YUV420,
CAPTURE_FMT_MAX
}
CaptureFormat;
typedef struct CaptureFrame
{
unsigned int width;
unsigned int height;
unsigned int pitch;
CaptureFormat format;
void * data;
}
CaptureFrame;
typedef struct CaptureInterface
{
const char * (*getName )();
bool (*create )();
@@ -43,4 +63,7 @@ struct CaptureInterface
CaptureResult (*capture)(
bool * hasFrameUpdate,
bool * hasPointerUpdate);
};
bool (*getFrame)(CaptureFrame * frame);
}
CaptureInterface;