From: divverent Date: Fri, 20 Feb 2009 13:20:14 +0000 (+0000) Subject: made cl_capturevideo_ogg 1 by default and saved. X-Git-Tag: xonotic-v0.1.0preview~1848 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=958172c2092a6aed9147fa25f4b14e38e26ac785;p=xonotic%2Fdarkplaces.git made cl_capturevideo_ogg 1 by default and saved. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8747 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_screen.c b/cl_screen.c index d301ca65..3517e82e 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -32,13 +32,13 @@ cvar_t scr_screenshot_jpeg_quality = {CVAR_SAVE, "scr_screenshot_jpeg_quality"," cvar_t scr_screenshot_gammaboost = {CVAR_SAVE, "scr_screenshot_gammaboost","1", "gamma correction on saved screenshots and videos, 1.0 saves unmodified images"}; // scr_screenshot_name is defined in fs.c cvar_t cl_capturevideo = {0, "cl_capturevideo", "0", "enables saving of video to a .avi file using uncompressed I420 colorspace and PCM audio, note that scr_screenshot_gammaboost affects the brightness of the output)"}; -cvar_t cl_capturevideo_printfps = {0, "cl_capturevideo_printfps", "1", "prints the frames per second captured in capturevideo (is only written to the log file, not to the console, as that would be visible on the video)"}; -cvar_t cl_capturevideo_width = {0, "cl_capturevideo_width", "0", "scales all frames to this resolution before saving the video"}; -cvar_t cl_capturevideo_height = {0, "cl_capturevideo_height", "0", "scales all frames to this resolution before saving the video"}; +cvar_t cl_capturevideo_printfps = {CVAR_SAVE, "cl_capturevideo_printfps", "1", "prints the frames per second captured in capturevideo (is only written to the log file, not to the console, as that would be visible on the video)"}; +cvar_t cl_capturevideo_width = {CVAR_SAVE, "cl_capturevideo_width", "0", "scales all frames to this resolution before saving the video"}; +cvar_t cl_capturevideo_height = {CVAR_SAVE, "cl_capturevideo_height", "0", "scales all frames to this resolution before saving the video"}; cvar_t cl_capturevideo_realtime = {0, "cl_capturevideo_realtime", "0", "causes video saving to operate in realtime (mostly useful while playing, not while capturing demos), this can produce a much lower quality video due to poor sound/video sync and will abort saving if your machine stalls for over a minute"}; -cvar_t cl_capturevideo_fps = {0, "cl_capturevideo_fps", "30", "how many frames per second to save (29.97 for NTSC, 30 for typical PC video, 15 can be useful)"}; +cvar_t cl_capturevideo_fps = {CVAR_SAVE, "cl_capturevideo_fps", "30", "how many frames per second to save (29.97 for NTSC, 30 for typical PC video, 15 can be useful)"}; cvar_t cl_capturevideo_number = {CVAR_SAVE, "cl_capturevideo_number", "1", "number to append to video filename, incremented each time a capture begins"}; -cvar_t cl_capturevideo_ogg = {0, "cl_capturevideo_ogg", "0", "save captured video data as Ogg/Vorbis/Theora streams"}; +cvar_t cl_capturevideo_ogg = {CVAR_SAVE, "cl_capturevideo_ogg", "1", "save captured video data as Ogg/Vorbis/Theora streams"}; cvar_t r_letterbox = {0, "r_letterbox", "0", "reduces vertical height of view to simulate a letterboxed movie effect (can be used by mods for cutscenes)"}; cvar_t r_stereo_separation = {0, "r_stereo_separation", "4", "separation distance of eyes in the world (negative values are only useful for cross-eyed viewing)"}; cvar_t r_stereo_sidebyside = {0, "r_stereo_sidebyside", "0", "side by side views for those who can't afford glasses but can afford eye strain (note: use a negative r_stereo_separation if you want cross-eyed viewing)"}; @@ -1019,14 +1019,18 @@ Cr = R * .500 + G * -.419 + B * -.0813 + 128.; cls.capturevideo.yuvnormalizetable[2][i] = 16 + i * (240-16) / 256; } - if (cl_capturevideo_ogg.integer && SCR_CaptureVideo_Ogg_Available()) + if (cl_capturevideo_ogg.integer) { - SCR_CaptureVideo_Ogg_BeginVideo(); - } - else - { - SCR_CaptureVideo_Avi_BeginVideo(); + if(SCR_CaptureVideo_Ogg_Available()) + { + SCR_CaptureVideo_Ogg_BeginVideo(); + return; + } + else + Con_Print("cl_capturevideo_ogg: libraries not available. Capturing in AVI instead.\n"); } + + SCR_CaptureVideo_Avi_BeginVideo(); } void SCR_CaptureVideo_EndVideo(void)