Add configurable video dump bitrate to INI

This commit is contained in:
Chris Burgener 2017-02-24 21:54:22 -05:00
parent 51136681df
commit bfb17d5a9e
3 changed files with 4 additions and 1 deletions

View File

@ -136,7 +136,7 @@ bool AVIDump::CreateVideoFile()
s_codec_context->codec_tag = s_codec_context->codec_tag =
MKTAG('X', 'V', 'I', 'D'); // Force XVID FourCC for better compatibility MKTAG('X', 'V', 'I', 'D'); // Force XVID FourCC for better compatibility
s_codec_context->codec_type = AVMEDIA_TYPE_VIDEO; 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->width = s_width;
s_codec_context->height = s_height; s_codec_context->height = s_height;
s_codec_context->time_base.num = 1; s_codec_context->time_base.num = 1;

View File

@ -75,6 +75,7 @@ void VideoConfig::Load(const std::string& ini_file)
settings->Get("DumpFramesAsImages", &bDumpFramesAsImages, false); settings->Get("DumpFramesAsImages", &bDumpFramesAsImages, false);
settings->Get("FreeLook", &bFreeLook, false); settings->Get("FreeLook", &bFreeLook, false);
settings->Get("UseFFV1", &bUseFFV1, false); settings->Get("UseFFV1", &bUseFFV1, false);
settings->Get("BitrateKbps", &iBitrateKbps, 2500);
settings->Get("InternalResolutionFrameDumps", &bInternalResolutionFrameDumps, false); settings->Get("InternalResolutionFrameDumps", &bInternalResolutionFrameDumps, false);
settings->Get("EnablePixelLighting", &bEnablePixelLighting, false); settings->Get("EnablePixelLighting", &bEnablePixelLighting, false);
settings->Get("FastDepthCalc", &bFastDepthCalc, true); settings->Get("FastDepthCalc", &bFastDepthCalc, true);
@ -293,6 +294,7 @@ void VideoConfig::Save(const std::string& ini_file)
settings->Set("DumpFramesAsImages", bDumpFramesAsImages); settings->Set("DumpFramesAsImages", bDumpFramesAsImages);
settings->Set("FreeLook", bFreeLook); settings->Set("FreeLook", bFreeLook);
settings->Set("UseFFV1", bUseFFV1); settings->Set("UseFFV1", bUseFFV1);
settings->Set("BitrateKbps", iBitrateKbps);
settings->Set("InternalResolutionFrameDumps", bInternalResolutionFrameDumps); settings->Set("InternalResolutionFrameDumps", bInternalResolutionFrameDumps);
settings->Set("EnablePixelLighting", bEnablePixelLighting); settings->Set("EnablePixelLighting", bEnablePixelLighting);
settings->Set("FastDepthCalc", bFastDepthCalc); settings->Set("FastDepthCalc", bFastDepthCalc);

View File

@ -104,6 +104,7 @@ struct VideoConfig final
bool bInternalResolutionFrameDumps; bool bInternalResolutionFrameDumps;
bool bFreeLook; bool bFreeLook;
bool bBorderlessFullscreen; bool bBorderlessFullscreen;
int iBitrateKbps;
// Hacks // Hacks
bool bEFBAccessEnable; bool bEFBAccessEnable;