From bfb17d5a9e8a2e3f24e0a5038a20b70218e86a8a Mon Sep 17 00:00:00 2001 From: Chris Burgener Date: Fri, 24 Feb 2017 21:54:22 -0500 Subject: [PATCH] Add configurable video dump bitrate to INI --- Source/Core/VideoCommon/AVIDump.cpp | 2 +- Source/Core/VideoCommon/VideoConfig.cpp | 2 ++ Source/Core/VideoCommon/VideoConfig.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/AVIDump.cpp b/Source/Core/VideoCommon/AVIDump.cpp index d82de483fb..d9c2633e5a 100644 --- a/Source/Core/VideoCommon/AVIDump.cpp +++ b/Source/Core/VideoCommon/AVIDump.cpp @@ -136,7 +136,7 @@ bool AVIDump::CreateVideoFile() s_codec_context->codec_tag = MKTAG('X', 'V', 'I', 'D'); // Force XVID FourCC for better compatibility s_codec_context->codec_type = AVMEDIA_TYPE_VIDEO; - s_codec_context->bit_rate = 400000; + s_codec_context->bit_rate = g_Config.iBitrateKbps * 1000; s_codec_context->width = s_width; s_codec_context->height = s_height; s_codec_context->time_base.num = 1; diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index 5e09c9fe98..551c00bb2c 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -75,6 +75,7 @@ void VideoConfig::Load(const std::string& ini_file) settings->Get("DumpFramesAsImages", &bDumpFramesAsImages, false); settings->Get("FreeLook", &bFreeLook, false); settings->Get("UseFFV1", &bUseFFV1, false); + settings->Get("BitrateKbps", &iBitrateKbps, 2500); settings->Get("InternalResolutionFrameDumps", &bInternalResolutionFrameDumps, false); settings->Get("EnablePixelLighting", &bEnablePixelLighting, false); settings->Get("FastDepthCalc", &bFastDepthCalc, true); @@ -293,6 +294,7 @@ void VideoConfig::Save(const std::string& ini_file) settings->Set("DumpFramesAsImages", bDumpFramesAsImages); settings->Set("FreeLook", bFreeLook); settings->Set("UseFFV1", bUseFFV1); + settings->Set("BitrateKbps", iBitrateKbps); settings->Set("InternalResolutionFrameDumps", bInternalResolutionFrameDumps); settings->Set("EnablePixelLighting", bEnablePixelLighting); settings->Set("FastDepthCalc", bFastDepthCalc); diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h index 9e6b0180f3..ebed297ccb 100644 --- a/Source/Core/VideoCommon/VideoConfig.h +++ b/Source/Core/VideoCommon/VideoConfig.h @@ -104,6 +104,7 @@ struct VideoConfig final bool bInternalResolutionFrameDumps; bool bFreeLook; bool bBorderlessFullscreen; + int iBitrateKbps; // Hacks bool bEFBAccessEnable;