Beispiel #1
0
void Movie_FinishFrame(void) 
{
	char fname[128];
	if (!Movie_IsCapturing())
		return;

	#ifdef _WIN32
	if (!movie_is_avi) 
	{
		snprintf(fname, sizeof(fname), "%s/capture_%02d-%02d-%04d_%02d-%02d-%02d/shot-%06d.%s",
			movie_dir.string, movie_start_date.wDay, movie_start_date.wMonth, movie_start_date.wYear,
			movie_start_date.wHour,	movie_start_date.wMinute, movie_start_date.wSecond, movie_frame_count, image_ext);

		con_suppress = true;
	}
	else 
	{
		// Split up if we're over the time limit for each segment
		if (movie_vid_maxlen.value && cls.realtime >= movie_fragment_start_time + movie_vid_maxlen.value) 
		{
			double original_start_time = movie_start_time;

			// Close existing, and start again
			avi_restarting = true;
			Movie_Stop();
			Movie_Start_AVI_Capture(true);
			Movie_Start(movie_len);
			avi_restarting = false;

			// keep track of original start time so we know when to stop for good
			movie_start_time = original_start_time;
		}
	}
	#else
	snprintf(fname, sizeof(fname), "%s/capture_%02d-%02d-%04d_%02d-%02d-%02d/shot-%06d.%s",
		movie_dir.string, movie_start_date.tm_mday, movie_start_date.tm_mon, movie_start_date.tm_year,
		movie_start_date.tm_hour, movie_start_date.tm_min, movie_start_date.tm_sec, movie_frame_count, image_ext);

	con_suppress = true;
	#endif // _WIN32

	//SCR_Screenshot(fname);
	//movie_frame_count++;

	// Only capture a frame after all views have been drawn
	// in multiview mode. Otherwise always.
	if (cl_multiview.value && cls.mvdplayback) 
	{
		if (CURRVIEW == 1)
		{
			SCR_Movieshot(fname);
		}
	} 
	else
	{
		SCR_Movieshot(fname);
	}

#ifdef _WIN32
	if (!movie_is_avi)
#endif
	{
		con_suppress = false;
	}

	// Only count the frame when all the views have been drawn
	// in multiview mode. (Instead of counting one for each view that is drawn).
	if (cl_multiview.value && cls.mvdplayback) 
	{
		if (CURRVIEW == 1)
		{
			movie_frame_count++;
		}
	} 
	else
	{
		movie_frame_count++;
	}

	if (cls.realtime >= movie_start_time + movie_len)
		Movie_Stop();
}
Beispiel #2
0
void Movie_FinishFrame(void) 
{
	char fname[128];
	if (!Movie_IsCapturing())
		return;

	#ifdef _WIN32
	if (!movie_is_avi) 
	{
		snprintf(fname, sizeof(fname), "%s/capture_%02d-%02d-%04d_%02d-%02d-%02d/shot-%06d.%s",
			movie_dir.string, movie_start_date.wDay, movie_start_date.wMonth, movie_start_date.wYear,
			movie_start_date.wHour,	movie_start_date.wMinute, movie_start_date.wSecond, movie_frame_count, image_ext);

		con_suppress = true;
	}
	#else
	snprintf(fname, sizeof(fname), "%s/capture_%02d-%02d-%04d_%02d-%02d-%02d/shot-%06d.%s",
		movie_dir.string, movie_start_date.tm_mday, movie_start_date.tm_mon, movie_start_date.tm_year,
		movie_start_date.tm_hour, movie_start_date.tm_min, movie_start_date.tm_sec, movie_frame_count, image_ext);

	con_suppress = true;
	#endif // _WIN32

	//SCR_Screenshot(fname);
	//movie_frame_count++;

	// Only capture a frame after all views have been drawn
	// in multiview mode. Otherwise always.
	if (cl_multiview.value && cls.mvdplayback) 
	{
		if (CURRVIEW == 1)
		{
			SCR_Movieshot(fname);
		}
	} 
	else
	{
		SCR_Movieshot(fname);
	}

#ifdef _WIN32
	if (!movie_is_avi)
#endif
	{
		con_suppress = false;
	}

	// Only count the frame when all the views have been drawn
	// in multiview mode. (Instead of counting one for each view that is drawn).
	if (cl_multiview.value && cls.mvdplayback) 
	{
		if (CURRVIEW == 1)
		{
			movie_frame_count++;
		}
	} 
	else
	{
		movie_frame_count++;
	}

	if (cls.realtime >= movie_start_time + movie_len)
		Movie_Stop();
}