fixed #2437: Allow animated gif recording using normal screen recording hotkey

This commit is contained in:
Jaex 2017-04-18 11:36:49 +03:00
parent 6cd580f627
commit 5cf2c821f6

View file

@ -73,21 +73,22 @@ private static void StopRecording()
private static void StartRecording(ScreenRecordOutput outputType, TaskSettings taskSettings, ScreenRecordStartMethod startMethod = ScreenRecordStartMethod.Region)
{
string debugText;
if (outputType == ScreenRecordOutput.FFmpeg && taskSettings.CaptureSettings.FFmpegOptions.VideoCodec == FFmpegVideoCodec.gif)
{
outputType = ScreenRecordOutput.GIF;
}
if (outputType == ScreenRecordOutput.FFmpeg)
{
debugText = string.Format("Starting FFmpeg recording. Video encoder: \"{0}\", Audio encoder: \"{1}\", FPS: {2}",
DebugHelper.WriteLine("Starting screen recording. Video encoder: \"{0}\", Audio encoder: \"{1}\", FPS: {2}",
taskSettings.CaptureSettings.FFmpegOptions.VideoCodec.GetDescription(), taskSettings.CaptureSettings.FFmpegOptions.AudioCodec.GetDescription(),
taskSettings.CaptureSettings.ScreenRecordFPS);
}
else
{
debugText = string.Format("Starting Animated GIF recording. FPS: {0}", taskSettings.CaptureSettings.GIFFPS);
DebugHelper.WriteLine("Starting screen recording. FPS: {0}", taskSettings.CaptureSettings.GIFFPS);
}
DebugHelper.WriteLine(debugText);
if (taskSettings.CaptureSettings.RunScreencastCLI)
{
if (!Program.Settings.VideoEncoders.IsValidIndex(taskSettings.CaptureSettings.VideoEncoderSelected))