コード例 #1
0
ファイル: aviout.cpp プロジェクト: magicalyu/DeSmuME-Vita
void DRV_AviVideoUpdate()
{
	if(!avi_file || !avi_file->valid)
		return;

	const NDSDisplayInfo& dispInfo = GPU->GetDisplayInfo();
	const u16* buffer = (const u16 *)dispInfo.masterCustomBuffer;

	//dont do anything if prescale has changed, it's just going to be garbage
	if(video.prescaleHD != avi_file->prescaleLevel)
		return;

	do_video_conversion(avi_file, buffer);

    if(FAILED(AVIStreamWrite(avi_file->compressed_streams[VIDEO_STREAM],
                                 avi_file->video_frames, 1, avi_file->convert_buffer,
                                 avi_file->bitmap_format.biSizeImage, AVIIF_KEYFRAME,
                                 NULL, &avi_file->ByteBuffer)))
	{
		avi_file->valid = 0;
		return;
	}

	avi_file->video_frames++;
	avi_file->tBytes += avi_file->ByteBuffer;

	// segment / split AVI when it's almost 2 GB (2000MB, to be precise)
	if(!(avi_file->video_frames % 60) && avi_file->tBytes > 2097152000)
		AviNextSegment();
}
コード例 #2
0
ファイル: aviout.cpp プロジェクト: snowasnow/DeSmuME
void DRV_AviVideoUpdate(const u16* buffer)
{
	if(!avi_file || !avi_file->valid)
		return;

	do_video_conversion(buffer);

    if(FAILED(AVIStreamWrite(avi_file->compressed_streams[VIDEO_STREAM],
                                 avi_file->video_frames, 1, avi_file->convert_buffer,
                                 avi_file->bitmap_format.biSizeImage, AVIIF_KEYFRAME,
                                 NULL, &avi_file->ByteBuffer)))
	{
		avi_file->valid = 0;
		return;
	}

	avi_file->video_frames++;
	avi_file->tBytes += avi_file->ByteBuffer;

	// segment / split AVI when it's almost 2 GB (2000MB, to be precise)
	if(!(avi_file->video_frames % 60) && avi_file->tBytes > 2097152000)
		AviNextSegment();
}