5 #include "cl_dyntexture.h"
7 // yields DYNAMIC_TEXTURE_PATH_PREFIX CLVIDEOPREFIX video name for a path
8 #define CLVIDEOPREFIX CLDYNTEXTUREPREFIX "video/"
9 #define CLTHRESHOLD 2.0
13 typedef enum clvideostate_e
20 CLVIDEO_RESETONWAKEUP,
24 #define CLVIDEO_MAX_SUBTITLES 512
26 extern cvar_t cl_video_subtitles;
27 extern cvar_t cl_video_subtitles_lines;
28 extern cvar_t cl_video_subtitles_textsize;
29 extern cvar_t cl_video_scale;
30 extern cvar_t cl_video_scale_vpos;
31 extern cvar_t cl_video_stipple;
32 extern cvar_t cl_video_brightness;
33 extern cvar_t cl_video_keepaspectratio;
35 typedef struct clvideo_s
51 // VorteX: subtitles array
53 char *subtitle_text[CLVIDEO_MAX_SUBTITLES];
54 float subtitle_start[CLVIDEO_MAX_SUBTITLES];
55 float subtitle_end[CLVIDEO_MAX_SUBTITLES];
57 // if a video is suspended, it is automatically paused (else we'd still have to process the frames)
59 // used to determine whether the video's resources should be freed or not
61 // when lasttime - realtime > THRESHOLD, all but the stream is freed
64 char filename[MAX_QPATH];
67 clvideo_t* CL_OpenVideo( const char *filename, const char *name, int owner, const char *subtitlesfile );
68 clvideo_t* CL_GetVideoByName( const char *name );
69 void CL_SetVideoState( clvideo_t *video, clvideostate_t state );
70 void CL_RestartVideo( clvideo_t *video );
72 void CL_CloseVideo( clvideo_t * video );
73 void CL_PurgeOwner( int owner );
75 void CL_Video_Frame( void ); // update all videos
76 void CL_Video_Init( void );
77 void CL_Video_Shutdown( void );
80 extern int cl_videoplaying;
82 void CL_DrawVideo( void );
83 void CL_VideoStart( char *filename, const char *subtitlesfile );
84 void CL_VideoStop( void );
86 // new function used for fullscreen videos
87 // TODO: Andreas Kirsch: move this subsystem somewhere else (preferably host) since the cl_video system shouldnt do such work like managing key events..
88 void CL_Video_KeyEvent( int key, int ascii, qboolean down );