mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-25 13:21:36 +00:00
27a59a0cbc
vulkan, wasapi, quake injector features added. irc, avplug, cef plugins/drivers reworked/updated/added openal reverb, doppler effects added. 'dir' console command now attempts to view clicked files. lots of warning fixes, should now only be deprecation warnings for most targets (depending on compiler version anyway...). SendEntity finally reworked to use flags properly. effectinfo improved, other smc-targetted fixes. mapcluster stuff now has support for linux. .basebone+.baseframe now exist in ssqc. qcc: -Fqccx supports qccx syntax, including qccx hacks. don't expect these to work in fteqw nor dp though. qcc: rewrote function call handling to use refs rather than defs. this makes struct passing more efficient and makes the __out keyword usable with fields etc. qccgui: can cope a little better with non-unicode files. can now represent most quake chars. qcc: suppressed warnings from *extensions.qc git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5000 fc73d0e0-1445-4013-8a0c-d673dee63da5
46 lines
1.7 KiB
C
46 lines
1.7 KiB
C
#ifndef FTEPLUGIN
|
|
#ifndef VARGS
|
|
#define VARGS QDECL
|
|
#endif
|
|
typedef enum uploadfmt_e
|
|
{
|
|
TF_INVALID,
|
|
TF_RGBA32,
|
|
TF_BGRA32,
|
|
TF_RGBX32,
|
|
TF_BGRX32,
|
|
TF_RGB24,
|
|
TF_BGR24
|
|
} uploadfmt_t;
|
|
|
|
typedef struct
|
|
{
|
|
size_t structsize;
|
|
const char *drivername;
|
|
void *(VARGS *createdecoder)(const char *name);
|
|
qboolean (VARGS *decodeframe)(void *ctx, qboolean nosound, qboolean forcevideo, double mediatime, void (QDECL *uploadtexture)(void *ectx, uploadfmt_t fmt, int width, int height, void *data, void *palette), void *ectx);
|
|
void (VARGS *shutdown)(void *ctx);
|
|
void (VARGS *rewind)(void *ctx);
|
|
|
|
//these are any interactivity functions you might want...
|
|
void (VARGS *cursormove) (void *ctx, float posx, float posy); //pos is 0-1
|
|
void (VARGS *key) (void *ctx, int code, int unicode, int event);
|
|
qboolean (VARGS *setsize) (void *ctx, int width, int height);
|
|
void (VARGS *getsize) (void *ctx, int *width, int *height);
|
|
void (VARGS *changestream) (void *ctx, const char *streamname);
|
|
|
|
size_t (VARGS *gettext) (void *ctx, const char *field, char *out, size_t outlen); //if out is null, returns required buffer size. returns 0 on failure / buffer too small
|
|
} media_decoder_funcs_t;
|
|
typedef struct
|
|
{
|
|
size_t structsize;
|
|
const char *drivername;
|
|
const char *description;
|
|
const char *defaultextension;
|
|
void *(VARGS *capture_begin) (char *streamname, int videorate, int width, int height, int *sndkhz, int *sndchannels, int *sndbits);
|
|
void (VARGS *capture_video) (void *ctx, void *data, int frame, int width, int height, enum uploadfmt fmt);
|
|
void (VARGS *capture_audio) (void *ctx, void *data, int bytes);
|
|
void (VARGS *capture_end) (void *ctx);
|
|
} media_encoder_funcs_t;
|
|
#endif
|
|
|