mirror of
https://github.com/libretro/RetroArch
synced 2025-02-19 03:40:59 +00:00
[record] add recording threads setting
This commit is contained in:
parent
f9c12866bf
commit
665be01b6b
@ -125,6 +125,10 @@ static const unsigned window_height = 720;
|
|||||||
static const unsigned fullscreen_x = 0;
|
static const unsigned fullscreen_x = 0;
|
||||||
static const unsigned fullscreen_y = 0;
|
static const unsigned fullscreen_y = 0;
|
||||||
|
|
||||||
|
/* Number of threads to use for video recording */
|
||||||
|
|
||||||
|
static const unsigned video_record_threads = 2;
|
||||||
|
|
||||||
/* Amount of transparency to use for the main window.
|
/* Amount of transparency to use for the main window.
|
||||||
* 1 is the most transparent while 100 is opaque.
|
* 1 is the most transparent while 100 is opaque.
|
||||||
*/
|
*/
|
||||||
|
@ -1676,6 +1676,8 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
|||||||
SETTING_UINT("video_windowed_position_width", &settings->uints.window_position_width, true, window_width, false);
|
SETTING_UINT("video_windowed_position_width", &settings->uints.window_position_width, true, window_width, false);
|
||||||
SETTING_UINT("video_windowed_position_height", &settings->uints.window_position_height, true, window_height, false);
|
SETTING_UINT("video_windowed_position_height", &settings->uints.window_position_height, true, window_height, false);
|
||||||
|
|
||||||
|
SETTING_UINT("video_record_threads", &settings->uints.video_record_threads, true, video_record_threads, false);
|
||||||
|
|
||||||
*size = count;
|
*size = count;
|
||||||
|
|
||||||
return tmp;
|
return tmp;
|
||||||
|
@ -443,6 +443,8 @@ typedef struct settings
|
|||||||
unsigned window_position_y;
|
unsigned window_position_y;
|
||||||
unsigned window_position_width;
|
unsigned window_position_width;
|
||||||
unsigned window_position_height;
|
unsigned window_position_height;
|
||||||
|
|
||||||
|
unsigned video_record_threads;
|
||||||
} uints;
|
} uints;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
|
@ -3206,6 +3206,10 @@ MSG_HASH(
|
|||||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE,
|
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE,
|
||||||
"Windowed Scale"
|
"Windowed Scale"
|
||||||
)
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS,
|
||||||
|
"Recording Threads"
|
||||||
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER,
|
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER,
|
||||||
"Integer Scale"
|
"Integer Scale"
|
||||||
|
@ -7316,6 +7316,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
|||||||
MENU_ENUM_LABEL_STREAMING_MODE,
|
MENU_ENUM_LABEL_STREAMING_MODE,
|
||||||
PARSE_ONLY_UINT, false) == 0)
|
PARSE_ONLY_UINT, false) == 0)
|
||||||
count++;
|
count++;
|
||||||
|
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||||
|
MENU_ENUM_LABEL_VIDEO_RECORD_THREADS,
|
||||||
|
PARSE_ONLY_UINT, true) == 0)
|
||||||
|
count++;
|
||||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||||
MENU_ENUM_LABEL_STREAMING_TITLE,
|
MENU_ENUM_LABEL_STREAMING_TITLE,
|
||||||
PARSE_ONLY_STRING, false) == 0)
|
PARSE_ONLY_STRING, false) == 0)
|
||||||
|
@ -336,16 +336,16 @@ static void setting_get_string_representation_video_stream_quality(
|
|||||||
/* TODO/FIXME - localize this */
|
/* TODO/FIXME - localize this */
|
||||||
switch (*setting->value.target.unsigned_integer)
|
switch (*setting->value.target.unsigned_integer)
|
||||||
{
|
{
|
||||||
case 5:
|
case 8:
|
||||||
strlcpy(s, "Custom", len);
|
strlcpy(s, "Custom", len);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 9:
|
||||||
strlcpy(s, "Low", len);
|
strlcpy(s, "Low", len);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 10:
|
||||||
strlcpy(s, "Medium", len);
|
strlcpy(s, "Medium", len);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 11:
|
||||||
strlcpy(s, "High", len);
|
strlcpy(s, "High", len);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -6759,7 +6759,7 @@ static bool setting_append_list(
|
|||||||
(*list)[list_info->index - 1].offset_by = 1;
|
(*list)[list_info->index - 1].offset_by = 1;
|
||||||
menu_settings_list_current_add_range(list, list_info, 1, 65536, 1, true, true);
|
menu_settings_list_current_add_range(list, list_info, 1, 65536, 1, true, true);
|
||||||
|
|
||||||
CONFIG_UINT(
|
CONFIG_UINT(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
&settings->uints.video_stream_quality,
|
&settings->uints.video_stream_quality,
|
||||||
MENU_ENUM_LABEL_VIDEO_STREAM_QUALITY,
|
MENU_ENUM_LABEL_VIDEO_STREAM_QUALITY,
|
||||||
@ -6773,7 +6773,6 @@ static bool setting_append_list(
|
|||||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||||
(*list)[list_info->index - 1].get_string_representation =
|
(*list)[list_info->index - 1].get_string_representation =
|
||||||
&setting_get_string_representation_video_stream_quality;
|
&setting_get_string_representation_video_stream_quality;
|
||||||
(*list)[list_info->index - 1].offset_by = 5;
|
|
||||||
menu_settings_list_current_add_range(list, list_info, RECORD_CONFIG_TYPE_STREAMING_CUSTOM, RECORD_CONFIG_TYPE_STREAMING_HIGH_QUALITY, 1, true, true);
|
menu_settings_list_current_add_range(list, list_info, RECORD_CONFIG_TYPE_STREAMING_CUSTOM, RECORD_CONFIG_TYPE_STREAMING_HIGH_QUALITY, 1, true, true);
|
||||||
|
|
||||||
CONFIG_PATH(
|
CONFIG_PATH(
|
||||||
@ -6804,6 +6803,22 @@ static bool setting_append_list(
|
|||||||
general_read_handler);
|
general_read_handler);
|
||||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
||||||
|
|
||||||
|
|
||||||
|
CONFIG_UINT(
|
||||||
|
list, list_info,
|
||||||
|
&settings->uints.video_record_threads,
|
||||||
|
MENU_ENUM_LABEL_VIDEO_RECORD_THREADS,
|
||||||
|
MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS,
|
||||||
|
video_record_threads,
|
||||||
|
&group_info,
|
||||||
|
&subgroup_info,
|
||||||
|
parent_group,
|
||||||
|
general_write_handler,
|
||||||
|
general_read_handler);
|
||||||
|
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint_special;
|
||||||
|
menu_settings_list_current_add_range(list, list_info, 1, 8, 1, true, true);
|
||||||
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||||
|
|
||||||
CONFIG_DIR(
|
CONFIG_DIR(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
global->record.output_dir,
|
global->record.output_dir,
|
||||||
|
@ -758,6 +758,7 @@ enum msg_hash_enums
|
|||||||
MENU_LABEL(VIDEO_FORCE_SRGB_DISABLE),
|
MENU_LABEL(VIDEO_FORCE_SRGB_DISABLE),
|
||||||
MENU_LABEL(VIDEO_ROTATION),
|
MENU_LABEL(VIDEO_ROTATION),
|
||||||
MENU_LABEL(VIDEO_SCALE),
|
MENU_LABEL(VIDEO_SCALE),
|
||||||
|
MENU_LABEL(VIDEO_RECORD_THREADS),
|
||||||
MENU_LABEL(VIDEO_SMOOTH),
|
MENU_LABEL(VIDEO_SMOOTH),
|
||||||
|
|
||||||
MENU_LABEL(VIDEO_CROP_OVERSCAN),
|
MENU_LABEL(VIDEO_CROP_OVERSCAN),
|
||||||
|
@ -564,7 +564,7 @@ static bool ffmpeg_init_config_common(struct ff_config_param *params, unsigned p
|
|||||||
{
|
{
|
||||||
case RECORD_CONFIG_TYPE_RECORDING_LOW_QUALITY:
|
case RECORD_CONFIG_TYPE_RECORDING_LOW_QUALITY:
|
||||||
case RECORD_CONFIG_TYPE_STREAMING_LOW_QUALITY:
|
case RECORD_CONFIG_TYPE_STREAMING_LOW_QUALITY:
|
||||||
params->threads = 2;
|
params->threads = settings->uints.video_record_threads;
|
||||||
params->frame_drop_ratio = 1;
|
params->frame_drop_ratio = 1;
|
||||||
params->audio_enable = true;
|
params->audio_enable = true;
|
||||||
params->audio_global_quality = 75;
|
params->audio_global_quality = 75;
|
||||||
@ -580,7 +580,7 @@ static bool ffmpeg_init_config_common(struct ff_config_param *params, unsigned p
|
|||||||
break;
|
break;
|
||||||
case RECORD_CONFIG_TYPE_RECORDING_MED_QUALITY:
|
case RECORD_CONFIG_TYPE_RECORDING_MED_QUALITY:
|
||||||
case RECORD_CONFIG_TYPE_STREAMING_MED_QUALITY:
|
case RECORD_CONFIG_TYPE_STREAMING_MED_QUALITY:
|
||||||
params->threads = 2;
|
params->threads = settings->uints.video_record_threads;
|
||||||
params->frame_drop_ratio = 1;
|
params->frame_drop_ratio = 1;
|
||||||
params->audio_enable = true;
|
params->audio_enable = true;
|
||||||
params->audio_global_quality = 75;
|
params->audio_global_quality = 75;
|
||||||
@ -596,7 +596,7 @@ static bool ffmpeg_init_config_common(struct ff_config_param *params, unsigned p
|
|||||||
break;
|
break;
|
||||||
case RECORD_CONFIG_TYPE_RECORDING_HIGH_QUALITY:
|
case RECORD_CONFIG_TYPE_RECORDING_HIGH_QUALITY:
|
||||||
case RECORD_CONFIG_TYPE_STREAMING_HIGH_QUALITY:
|
case RECORD_CONFIG_TYPE_STREAMING_HIGH_QUALITY:
|
||||||
params->threads = 2;
|
params->threads = settings->uints.video_record_threads;
|
||||||
params->frame_drop_ratio = 1;
|
params->frame_drop_ratio = 1;
|
||||||
params->audio_enable = true;
|
params->audio_enable = true;
|
||||||
params->audio_global_quality = 100;
|
params->audio_global_quality = 100;
|
||||||
@ -611,7 +611,7 @@ static bool ffmpeg_init_config_common(struct ff_config_param *params, unsigned p
|
|||||||
av_dict_set(¶ms->audio_opts, "audio_global_quality", "100", 0);
|
av_dict_set(¶ms->audio_opts, "audio_global_quality", "100", 0);
|
||||||
break;
|
break;
|
||||||
case RECORD_CONFIG_TYPE_RECORDING_LOSSLESS_QUALITY:
|
case RECORD_CONFIG_TYPE_RECORDING_LOSSLESS_QUALITY:
|
||||||
params->threads = 2;
|
params->threads = settings->uints.video_record_threads;
|
||||||
params->frame_drop_ratio = 1;
|
params->frame_drop_ratio = 1;
|
||||||
params->audio_enable = true;
|
params->audio_enable = true;
|
||||||
params->audio_global_quality = 80;
|
params->audio_global_quality = 80;
|
||||||
@ -626,7 +626,7 @@ static bool ffmpeg_init_config_common(struct ff_config_param *params, unsigned p
|
|||||||
av_dict_set(¶ms->audio_opts, "audio_global_quality", "80", 0);
|
av_dict_set(¶ms->audio_opts, "audio_global_quality", "80", 0);
|
||||||
break;
|
break;
|
||||||
case RECORD_CONFIG_TYPE_RECORDING_WEBM_FAST:
|
case RECORD_CONFIG_TYPE_RECORDING_WEBM_FAST:
|
||||||
params->threads = 2;
|
params->threads = settings->uints.video_record_threads;
|
||||||
params->frame_drop_ratio = 1;
|
params->frame_drop_ratio = 1;
|
||||||
params->audio_enable = true;
|
params->audio_enable = true;
|
||||||
params->audio_global_quality = 50;
|
params->audio_global_quality = 50;
|
||||||
@ -640,7 +640,7 @@ static bool ffmpeg_init_config_common(struct ff_config_param *params, unsigned p
|
|||||||
av_dict_set(¶ms->audio_opts, "audio_global_quality", "50", 0);
|
av_dict_set(¶ms->audio_opts, "audio_global_quality", "50", 0);
|
||||||
break;
|
break;
|
||||||
case RECORD_CONFIG_TYPE_RECORDING_WEBM_HIGH_QUALITY:
|
case RECORD_CONFIG_TYPE_RECORDING_WEBM_HIGH_QUALITY:
|
||||||
params->threads = 2;
|
params->threads = settings->uints.video_record_threads;
|
||||||
params->frame_drop_ratio = 1;
|
params->frame_drop_ratio = 1;
|
||||||
params->audio_enable = true;
|
params->audio_enable = true;
|
||||||
params->audio_global_quality = 75;
|
params->audio_global_quality = 75;
|
||||||
@ -654,7 +654,7 @@ static bool ffmpeg_init_config_common(struct ff_config_param *params, unsigned p
|
|||||||
av_dict_set(¶ms->audio_opts, "audio_global_quality", "75", 0);
|
av_dict_set(¶ms->audio_opts, "audio_global_quality", "75", 0);
|
||||||
break;
|
break;
|
||||||
case RECORD_CONFIG_TYPE_RECORDING_GIF:
|
case RECORD_CONFIG_TYPE_RECORDING_GIF:
|
||||||
params->threads = 2;
|
params->threads = settings->uints.video_record_threads;
|
||||||
params->frame_drop_ratio = 1;
|
params->frame_drop_ratio = 1;
|
||||||
params->audio_enable = false;
|
params->audio_enable = false;
|
||||||
params->audio_global_quality = 0;
|
params->audio_global_quality = 0;
|
||||||
@ -667,7 +667,7 @@ static bool ffmpeg_init_config_common(struct ff_config_param *params, unsigned p
|
|||||||
av_dict_set(¶ms->audio_opts, "audio_global_quality", "0", 0);
|
av_dict_set(¶ms->audio_opts, "audio_global_quality", "0", 0);
|
||||||
break;
|
break;
|
||||||
case RECORD_CONFIG_TYPE_STREAMING_NETPLAY:
|
case RECORD_CONFIG_TYPE_STREAMING_NETPLAY:
|
||||||
params->threads = 2;
|
params->threads = settings->uints.video_record_threads;
|
||||||
params->frame_drop_ratio = 1;
|
params->frame_drop_ratio = 1;
|
||||||
params->audio_enable = true;
|
params->audio_enable = true;
|
||||||
params->audio_global_quality = 50;
|
params->audio_global_quality = 50;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user