32#define LIBAVW_SCALER_BILINEAR 0
33#define LIBAVW_SCALER_BICUBIC 1
34#define LIBAVW_SCALER_X 2
35#define LIBAVW_SCALER_POINT 3
36#define LIBAVW_SCALER_AREA 4
37#define LIBAVW_SCALER_BICUBLIN 5
38#define LIBAVW_SCALER_GAUSS 6
39#define LIBAVW_SCALER_SINC 7
40#define LIBAVW_SCALER_LANCZOS 8
41#define LIBAVW_SCALER_SPLINE 9
43#define LIBAVW_PIXEL_FORMAT_BGR 0
44#define LIBAVW_PIXEL_FORMAT_BGRA 1
46#define LIBAVW_PRINT_WARNING 1
47#define LIBAVW_PRINT_ERROR 2
48#define LIBAVW_PRINT_FATAL 3
49#define LIBAVW_PRINT_PANIC 4
57const char *(*qLibAvW_ErrorString)(
int errorcode);
58const char *(*qLibAvW_AvcVersion)(
void);
104typedef struct libavwstream_s
122cvar_t cl_video_libavw_scaler = {
CF_ARCHIVE,
"cl_video_libavw_scaler",
"1",
"selects a scaler for libavcode played videos. Scalers are: 0 - bilinear, 1 - bicubic, 2 - x, 3 - point, 4 - area, 5 - bicublin, 6 - gauss, 7 - sinc, 8 - lanczos, 9 - spline."};
160static int libavw_decodeframe(
void *stream,
void *imagedata,
unsigned int Rmask,
unsigned int Gmask,
unsigned int Bmask,
unsigned int bytesperpixel,
int imagebytesperrow)
186 if (bytesperpixel == 4)
188 else if (bytesperpixel == 3)
240 return FS_Read((qfile_t *)opaque,
buf, buf_size);
244 return (uint64_t)
FS_Seek((qfile_t *)opaque, pos, whence);
268 *errorstring =
"unable to allocate memory for stream info structure";
289 *errorstring =
"unable to open videofile";
333 len =
strlen(filename) + 10;
int(* qLibAvW_PlayVideo)(void *stream, void *file, avwCallbackIoRead *IoRead, avwCallbackIoSeek *IoSeek, avwCallbackIoSeekSize *IoSeekSize)
double(* qLibAvW_StreamGetFramerate)(void *stream)
static void libavw_message(int level, const char *message)
int(* qLibAvW_CreateStream)(void **stream)
unsigned int libavw_getheight(void *stream)
unsigned int libavw_getwidth(void *stream)
#define LIBAVW_PIXEL_FORMAT_BGRA
int(* qLibAvW_StreamGetVideoWidth)(void *stream)
cvar_t cl_video_libavw_minwidth
int(* qLibAvW_StreamGetVideoHeight)(void *stream)
static dllfunction_t libavwfuncs[]
static int LibAvW_FS_Read(void *opaque, uint8_t *buf, int buf_size)
int(* qLibAvW_StreamGetError)(void *stream)
cvar_t cl_video_libavw_scaler
double libavw_getaspectratio(void *stream)
cvar_t cl_video_libavw_minheight
const char *(* qLibAvW_ErrorString)(int errorcode)
int(* qLibAvW_Init)(avwCallbackPrint *printfunction)
void(* qLibAvW_RemoveStream)(void *stream)
const char * dllnames_libavw[]
float(* qLibAvW_Version)(void)
void libavw_close(void *stream)
uint64_t avwCallbackIoSeek(void *, uint64_t, int)
static dllhandle_t libavw_dll
uint64_t avwCallbackIoSeekSize(void *)
const char *(* qLibAvW_AvcVersion)(void)
double libavw_getframerate(void *stream)
void * LibAvW_OpenVideo(clvideo_t *video, char *filename, const char **errorstring)
qbool LibAvW_OpenLibrary(void)
int avwCallbackIoRead(void *, uint8_t *, int)
#define LIBAVW_PIXEL_FORMAT_BGR
static int libavw_decodeframe(void *stream, void *imagedata, unsigned int Rmask, unsigned int Gmask, unsigned int Bmask, unsigned int bytesperpixel, int imagebytesperrow)
static uint64_t LibAvW_FS_SeekSize(void *opaque)
int(* qLibAvW_PlayGetFrameImage)(void *stream, int pixel_format, void *imagedata, int imagewidth, int imageheight, int scaler)
static uint64_t LibAvW_FS_Seek(void *opaque, uint64_t pos, int whence)
int(* qLibAvW_PlaySeekNextFrame)(void *stream)
const char * libavw_extensions[]
#define LIBAVW_PRINT_FATAL
void LibAvW_CloseLibrary(void)
void avwCallbackPrint(int, const char *)
#define LIBAVW_PRINT_WARNING
#define LIBAVW_PRINT_ERROR
#define CF_ARCHIVE
cvar should have its set value saved to config.cfg and persist across sessions
int dpsnprintf(char *buffer, size_t buffersize, const char *format,...)
Returns the number of printed characters, excluding the final '\0' or returns -1 if the buffer isn't ...
#define dp_strlcat(dst, src, dsize)
void Con_Printf(const char *fmt,...)
Prints to all appropriate console targets.
void Cvar_RegisterVariable(cvar_t *variable)
registers a cvar that already has the name, string, and optionally the archive elements set.
fs_offset_t FS_Read(qfile_t *file, void *buffer, size_t buffersize)
qfile_t * FS_OpenVirtualFile(const char *filepath, qbool quiet)
int FS_Seek(qfile_t *file, fs_offset_t offset, int whence)
static int(ZEXPORT *qz_inflate)(z_stream *strm
void FS_StripExtension(const char *in, char *out, size_t size_out)
fs_offset_t FS_FileSize(qfile_t *file)
int FS_Close(qfile_t *file)
GLenum GLuint GLenum GLsizei const GLchar * buf
#define MAX_OSPATH
max length of a filesystem pathname
int S_StartSound(int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation)
S_StartSound returns the channel index, or -1 if an error occurred.
void S_StopChannel(unsigned int channel_ind, qbool lockmutex, qbool freesfx)
sfx_t * S_PrecacheSound(const char *name, qbool complain, qbool levelsound)
void(* close)(void *stream)
double(* getframerate)(void *stream)
unsigned int(* getheight)(void *stream)
int(* decodeframe)(void *stream, void *imagedata, unsigned int Rmask, unsigned int Gmask, unsigned int Bmask, unsigned int bytesperpixel, int imagebytesperrow)
double(* getaspectratio)(void *stream)
unsigned int(* getwidth)(void *stream)
unsigned int info_imagewidth
unsigned int info_imageheight
qbool Sys_LoadDependency(const char **dllnames, dllhandle_t *handle, const dllfunction_t *fcts)
void Sys_FreeLibrary(dllhandle_t *handle)
int Sys_CheckParm(const char *parm)