5
#include "cl_dyntexture.h"
7
#define MAXCLVIDEOS 64 + 1 // 1 video is reserved for the cinematic mode
8
// yields DYNAMIC_TEXTURE_PATH_PREFIX CLVIDEOPREFIX video name for a path
9
#define CLVIDEOPREFIX CLDYNTEXTUREPREFIX "video/"
10
#define CLTHRESHOLD 2.0
14
typedef enum clvideostate_e
21
CLVIDEO_RESETONWAKEUP,
25
typedef struct clvideo_s
41
// if a video is suspended, it is automatically paused (else we'd still have to process the frames)
43
// used to determine whether the video's resources should be freed or not
45
// when lasttime - realtime > THRESHOLD, all but the stream is freed
48
char filename[MAX_QPATH];
51
clvideo_t* CL_OpenVideo( const char *filename, const char *name, int owner );
52
clvideo_t* CL_GetVideoByName( const char *name );
53
void CL_SetVideoState( clvideo_t *video, clvideostate_t state );
54
void CL_RestartVideo( clvideo_t *video );
56
void CL_CloseVideo( clvideo_t * video );
57
void CL_PurgeOwner( int owner );
59
void CL_Video_Frame( void ); // update all videos
60
void CL_Video_Init( void );
61
void CL_Video_Shutdown( void );
64
extern int cl_videoplaying;
66
void CL_DrawVideo( void );
67
void CL_VideoStart( char *filename );
68
void CL_VideoStop( void );
70
// new function used for fullscreen videos
71
// TODO: Andreas Kirsch: move this subsystem somewhere else (preferably host) since the cl_video system shouldnt do such work like managing key events..
72
void CL_Video_KeyEvent( int key, int ascii, qboolean down );