Arbitrary dump formats.
This commit is contained in:
parent
1723645c99
commit
86a8382376
|
@ -98,7 +98,7 @@ bool AVIDump::CreateVideoFile()
|
|||
{
|
||||
AVCodec* codec = nullptr;
|
||||
|
||||
const char s_format[] = "avi";
|
||||
const std::string& s_format = g_Config.sDumpFormat;
|
||||
|
||||
std::stringstream file_ss;
|
||||
file_ss << File::GetUserPath(D_DUMPFRAMES_IDX)
|
||||
|
@ -122,8 +122,12 @@ bool AVIDump::CreateVideoFile()
|
|||
}
|
||||
}
|
||||
|
||||
AVOutputFormat* output_format = av_guess_format(s_format, filename.c_str(), nullptr);
|
||||
if (!output_format) return false;
|
||||
AVOutputFormat* output_format = av_guess_format(s_format.c_str(), filename.c_str(), nullptr);
|
||||
if (!output_format)
|
||||
{
|
||||
WARN_LOG(VIDEO, "Invalid format %s", s_format.c_str());
|
||||
return false;
|
||||
}
|
||||
avformat_alloc_output_context2(&s_format_context, output_format, nullptr, filename.c_str());
|
||||
|
||||
AVCodecID codec_id =
|
||||
|
|
|
@ -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("DumpFormat", &sDumpFormat, "avi");
|
||||
settings->Get("BitrateKbps", &iBitrateKbps, 2500);
|
||||
settings->Get("InternalResolutionFrameDumps", &bInternalResolutionFrameDumps, false);
|
||||
settings->Get("EnablePixelLighting", &bEnablePixelLighting, false);
|
||||
|
|
|
@ -102,6 +102,7 @@ struct VideoConfig final
|
|||
bool bDumpEFBTarget;
|
||||
bool bDumpFramesAsImages;
|
||||
bool bUseFFV1;
|
||||
std::string sDumpFormat;
|
||||
bool bInternalResolutionFrameDumps;
|
||||
bool bFreeLook;
|
||||
bool bBorderlessFullscreen;
|
||||
|
|
Loading…
Reference in New Issue