mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-03 15:54:39 +00:00
add apng
This commit is contained in:
parent
6a30a1f89a
commit
f164b4be3d
@ -2710,6 +2710,9 @@ static void setting_get_string_representation_video_record_quality(rarch_setting
|
||||
case RECORD_CONFIG_TYPE_RECORDING_GIF:
|
||||
strlcpy(s, "GIF", len);
|
||||
break;
|
||||
case RECORD_CONFIG_TYPE_RECORDING_APNG:
|
||||
strlcpy(s, "APNG", len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -10017,7 +10020,7 @@ static bool setting_append_list(
|
||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||
(*list)[list_info->index - 1].get_string_representation =
|
||||
&setting_get_string_representation_video_record_quality;
|
||||
menu_settings_list_current_add_range(list, list_info, RECORD_CONFIG_TYPE_RECORDING_CUSTOM, RECORD_CONFIG_TYPE_RECORDING_GIF, 1, true, true);
|
||||
menu_settings_list_current_add_range(list, list_info, RECORD_CONFIG_TYPE_RECORDING_CUSTOM, RECORD_CONFIG_TYPE_RECORDING_APNG, 1, true, true);
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_COMBOBOX;
|
||||
|
||||
CONFIG_PATH(
|
||||
|
@ -110,6 +110,10 @@ extern "C" {
|
||||
#define PIX_FMT_RGB565 AV_PIX_FMT_RGB565
|
||||
#endif
|
||||
|
||||
#ifndef PIX_FMT_RGBA
|
||||
#define PIX_FMT_RGBA AV_PIX_FMT_RGBA
|
||||
#endif
|
||||
|
||||
#ifndef PIX_FMT_NONE
|
||||
#define PIX_FMT_NONE AV_PIX_FMT_NONE
|
||||
#endif
|
||||
@ -665,6 +669,19 @@ static bool ffmpeg_init_config_common(struct ff_config_param *params, unsigned p
|
||||
av_dict_set(¶ms->video_opts, "framerate", "30", 0);
|
||||
av_dict_set(¶ms->audio_opts, "audio_global_quality", "0", 0);
|
||||
break;
|
||||
case RECORD_CONFIG_TYPE_RECORDING_APNG:
|
||||
params->threads = settings->uints.video_record_threads;
|
||||
params->frame_drop_ratio = 1;
|
||||
params->audio_enable = false;
|
||||
params->audio_global_quality = 0;
|
||||
params->out_pix_fmt = PIX_FMT_RGB24;
|
||||
|
||||
strlcpy(params->vcodec, "apng", sizeof(params->vcodec));
|
||||
strlcpy(params->acodec, "", sizeof(params->acodec));
|
||||
|
||||
av_dict_set(¶ms->video_opts, "pred", "avg", 0);
|
||||
av_dict_set(¶ms->audio_opts, "audio_global_quality", "0", 0);
|
||||
break;
|
||||
case RECORD_CONFIG_TYPE_STREAMING_NETPLAY:
|
||||
params->threads = settings->uints.video_record_threads;
|
||||
params->frame_drop_ratio = 1;
|
||||
@ -715,10 +732,19 @@ static bool ffmpeg_init_config_common(struct ff_config_param *params, unsigned p
|
||||
params->scale_factor = 1;
|
||||
strlcpy(params->format, "webm", sizeof(params->format));
|
||||
}
|
||||
else if (preset >= RECORD_CONFIG_TYPE_RECORDING_GIF && preset < RECORD_CONFIG_TYPE_RECORDING_APNG)
|
||||
{
|
||||
if (!settings->bools.video_gpu_record)
|
||||
params->scale_factor = settings->uints.video_record_scale_factor > 0 ?
|
||||
settings->uints.video_record_scale_factor : 1;
|
||||
else
|
||||
params->scale_factor = 1;
|
||||
strlcpy(params->format, "gif", sizeof(params->format));
|
||||
}
|
||||
else if (preset < RECORD_CONFIG_TYPE_STREAMING_LOW_QUALITY)
|
||||
{
|
||||
params->scale_factor = 1;
|
||||
strlcpy(params->format, "gif", sizeof(params->format));
|
||||
strlcpy(params->format, "apng", sizeof(params->format));
|
||||
}
|
||||
else if (preset <= RECORD_CONFIG_TYPE_STREAMING_HIGH_QUALITY)
|
||||
{
|
||||
|
@ -378,12 +378,18 @@ bool recording_init(void)
|
||||
"webm", sizeof(buf));
|
||||
fill_pathname_join(output, global->record.output_dir, buf, sizeof(output));
|
||||
}
|
||||
else
|
||||
else if (settings->uints.video_record_quality >= RECORD_CONFIG_TYPE_RECORDING_GIF && settings->uints.video_record_quality < RECORD_CONFIG_TYPE_RECORDING_APNG)
|
||||
{
|
||||
fill_str_dated_filename(buf, game_name,
|
||||
"gif", sizeof(buf));
|
||||
fill_pathname_join(output, global->record.output_dir, buf, sizeof(output));
|
||||
}
|
||||
else
|
||||
{
|
||||
fill_str_dated_filename(buf, game_name,
|
||||
"png", sizeof(buf));
|
||||
fill_pathname_join(output, global->record.output_dir, buf, sizeof(output));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,7 @@ enum record_config_type
|
||||
RECORD_CONFIG_TYPE_RECORDING_WEBM_FAST,
|
||||
RECORD_CONFIG_TYPE_RECORDING_WEBM_HIGH_QUALITY,
|
||||
RECORD_CONFIG_TYPE_RECORDING_GIF,
|
||||
RECORD_CONFIG_TYPE_RECORDING_APNG,
|
||||
RECORD_CONFIG_TYPE_STREAMING_CUSTOM,
|
||||
RECORD_CONFIG_TYPE_STREAMING_LOW_QUALITY,
|
||||
RECORD_CONFIG_TYPE_STREAMING_MED_QUALITY,
|
||||
|
Loading…
x
Reference in New Issue
Block a user