if(drawscreenstart)
{
drawscreendelta = Sys_DirtyTime() - drawscreenstart;
+#ifdef CONFIG_VIDEO_CAPTURE
if (cl_minfps.value > 0 && (cl_minfps_force.integer || !(cls.timedemo || (cls.capturevideo.active && !cls.capturevideo.realtime))) && drawscreendelta >= 0 && drawscreendelta < 60)
+#else
+ if (cl_minfps.value > 0 && (cl_minfps_force.integer || !cls.timedemo) && drawscreendelta >= 0 && drawscreendelta < 60)
+#endif
{
// quality adjustment according to render time
double actualframetime;
}
qw_downloadtype_t;
+#ifdef CONFIG_VIDEO_CAPTURE
typedef enum capturevideoformat_e
{
CAPTUREVIDEOFORMAT_AVI_I420,
void *formatspecific;
}
capturevideostate_t;
+#endif
#define CL_MAX_DOWNLOADACKS 4
// extra user info for the "connect" command
char connect_userinfo[MAX_USERINFO_STRING];
+#ifdef CONFIG_VIDEO_CAPTURE
// video capture stuff
capturevideostate_t capturevideo;
+#endif
// crypto channel
crypto_t crypto;
R_TimeReport("---");
Collision_Cache_NewFrame();
R_TimeReport("photoncache");
+#ifdef CONFIG_VIDEO_CAPTURE
// decide the simulation time
if (cls.capturevideo.active)
{
}
}
else if (vid_activewindow && cl_maxfps.value >= 1 && !cls.timedemo)
+
+#else
+ if (vid_activewindow && cl_maxfps.value >= 1 && !cls.timedemo)
+#endif
{
clframetime = cl.realframetime = max(cl_timer, 1.0 / cl_maxfps.value);
// when running slow, we need to sleep to keep input responsive
Cbuf_Execute(&cmd_client);
}
+#ifdef CONFIG_VIDEO_CAPTURE
// COMMANDLINEOPTION: Client: -capturedemo <demoname> captures a playdemo and quits
i = COM_CheckParm("-capturedemo");
if (i && i + 1 < sys.argc)
Cbuf_AddText(&cmd_client, va(vabuf, sizeof(vabuf), "playdemo %s\ncl_capturevideo 1\n", sys.argv[i + 1]));
Cbuf_Execute(&cmd_client);
}
+#endif
if (cls.state == ca_dedicated || COM_CheckParm("-listen"))
if (!sv.active && !cls.demoplayback && !cls.connect_trying)
qboolean simsound = false;
+#ifdef CONFIG_VIDEO_CAPTURE
static qboolean recording_sound = false;
+#endif
int snd_blocked = 0;
static int current_swapstereo = false;
extrasoundtime = 0;
snd_renderbuffer->startframe = soundtime;
snd_renderbuffer->endframe = soundtime;
+#ifdef CONFIG_VIDEO_CAPTURE
recording_sound = false;
+#endif
}
void S_Shutdown(void)
usesoundtimehack = 1;
newsoundtime = (unsigned int)((double)cl.mtime[0] * (double)snd_renderbuffer->format.speed);
}
+#ifdef CONFIG_VIDEO_CAPTURE
else if (cls.capturevideo.soundrate && !cls.capturevideo.realtime) // SUPER NASTY HACK to record non-realtime sound
{
usesoundtimehack = 2;
newsoundtime = (unsigned int)((double)cls.capturevideo.frame * (double)snd_renderbuffer->format.speed / (double)cls.capturevideo.framerate);
}
+#endif
else if (simsound)
{
usesoundtimehack = 3;
}
else
{
+#ifdef CONFIG_VIDEO_CAPTURE
snd_usethreadedmixing = snd_threaded && !cls.capturevideo.soundrate;
+#else
+ snd_usethreadedmixing = snd_threaded;
+#endif
usesoundtimehack = 0;
newsoundtime = SndSys_GetSoundTime();
}
newsoundtime += extrasoundtime;
if (newsoundtime < soundtime)
{
+#ifdef CONFIG_VIDEO_CAPTURE
if ((cls.capturevideo.soundrate != 0) != recording_sound)
{
unsigned int additionaltime;
extrasoundtime);
}
else if (!soundtimehack)
+#else
+ if (!soundtimehack)
+#endif
Con_Printf("S_PaintAndSubmit: WARNING: newsoundtime < soundtime (%u < %u)\n",
newsoundtime, soundtime);
}
soundtime = newsoundtime;
+#ifdef CONFIG_VIDEO_CAPTURE
recording_sound = (cls.capturevideo.soundrate != 0);
+#endif
// Lock submitbuffer
if (!simsound && !SndSys_LockRenderBuffer())