X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=cl_video.h;h=d3a4763aef20e943d9933abc4a64ca103778fb25;hb=e3451fce2f390ba1d8eaac1215709e114d50c663;hp=9e3c47c0dc1489283cb0082eb06c40d5f6491baa;hpb=406539417c894954ef88ecc2fc28c26ad01bbba6;p=xonotic%2Fdarkplaces.git diff --git a/cl_video.h b/cl_video.h index 9e3c47c0..d3a4763a 100644 --- a/cl_video.h +++ b/cl_video.h @@ -2,10 +2,7 @@ #ifndef CL_VIDEO_H #define CL_VIDEO_H -#include "cl_dyntexture.h" - -// yields DYNAMIC_TEXTURE_PATH_PREFIX CLVIDEOPREFIX video name for a path -#define CLVIDEOPREFIX CLDYNTEXTUREPREFIX "video/" +#define CLVIDEOPREFIX "video/" #define CLTHRESHOLD 2.0 #define MENUOWNER 1 @@ -27,7 +24,10 @@ extern cvar_t cl_video_subtitles; extern cvar_t cl_video_subtitles_lines; extern cvar_t cl_video_subtitles_textsize; extern cvar_t cl_video_scale; +extern cvar_t cl_video_scale_vpos; +extern cvar_t cl_video_stipple; extern cvar_t cl_video_brightness; +extern cvar_t cl_video_keepaspectratio; typedef struct clvideo_s { @@ -43,7 +43,11 @@ typedef struct clvideo_s void *imagedata; - cachepic_t cpif; + // cachepic holds the relevant texture_t and we simply update the texture as needed + cachepic_t *cachepic; + char name[MAX_QPATH]; // name of this video UI element (not the filename) + int width; + int height; // VorteX: subtitles array int subtitles; @@ -51,12 +55,19 @@ typedef struct clvideo_s float subtitle_start[CLVIDEO_MAX_SUBTITLES]; float subtitle_end[CLVIDEO_MAX_SUBTITLES]; - // if a video is suspended, it is automatically paused (else we'd still have to process the frames) + // this functions gets filled by video format module + void (*close) (void *stream); + unsigned int (*getwidth) (void *stream); + unsigned int (*getheight) (void *stream); + double (*getframerate) (void *stream); + double (*getaspectratio) (void *stream); + int (*decodeframe) (void *stream, void *imagedata, unsigned int Rmask, unsigned int Gmask, unsigned int Bmask, unsigned int bytesperpixel, int imagebytesperrow); + // if a video is suspended, it is automatically paused (else we'd still have to process the frames) // used to determine whether the video's resources should be freed or not double lasttime; // when lasttime - realtime > THRESHOLD, all but the stream is freed - qboolean suspended; + qbool suspended; char filename[MAX_QPATH]; } clvideo_t; @@ -82,6 +93,6 @@ void CL_VideoStop( void ); // new function used for fullscreen videos // TODO: Andreas Kirsch: move this subsystem somewhere else (preferably host) since the cl_video system shouldnt do such work like managing key events.. -void CL_Video_KeyEvent( int key, int ascii, qboolean down ); +void CL_Video_KeyEvent( int key, int ascii, qbool down ); #endif