From 904eb552fa522950b96cd29d301f6fcc48b5fb9e Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 7 Oct 2012 19:28:48 +0000 Subject: [PATCH] I suck. big time. Sorry gb. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4113 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- plugins/engine.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 plugins/engine.h diff --git a/plugins/engine.h b/plugins/engine.h new file mode 100644 index 000000000..fac72f2fc --- /dev/null +++ b/plugins/engine.h @@ -0,0 +1,24 @@ +typedef enum uploadfmt_e +{ + TF_INVALID, + TF_RGBA32, + TF_BGRA32, + TF_RGBX32, + TF_BGRX32 +} uploadfmt_t; + +typedef struct +{ + void *(*createdecoder)(char *name); //needed + void *(*decodeframe)(void *ctx, qboolean nosound, enum uploadfmt_e *fmt, int *width, int *height); //needed + void (*doneframe)(void *ctx, void *img); //basically a free() + void (*shutdown)(void *ctx); //probably needed... + void (*rewind)(void *ctx); + + //these are any interactivity functions you might want... + void (*cursormove) (void *ctx, float posx, float posy); //pos is 0-1 + void (*key) (void *ctx, int code, int unicode, int event); //key event! event=1=down + qboolean (*setsize) (void *ctx, int width, int height); //updates the desired screen-space size + void (*getsize) (void *ctx, int *width, int *height); //retrieves the screen-space size + void (*changestream) (void *ctx, char *streamname); //can be used to accept commands from qc +} media_decoder_funcs_t;