mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Added Streaming Mode
This commit is contained in:
parent
cf7eea30cb
commit
1764bfe60f
@ -1536,6 +1536,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
unsigned count = 0;
|
||||
struct config_uint_setting *tmp = (struct config_uint_setting*)malloc((*size + 1) * sizeof(struct config_uint_setting));
|
||||
|
||||
SETTING_UINT("streaming_mode", &settings->uints.streaming_mode, true, STREAMING_MODE_TWITCH, false);
|
||||
SETTING_UINT("crt_switch_resolution", &settings->uints.crt_switch_resolution, true, crt_switch_resolution, false);
|
||||
SETTING_UINT("input_bind_timeout", &settings->uints.input_bind_timeout, true, input_bind_timeout, false);
|
||||
SETTING_UINT("input_bind_hold", &settings->uints.input_bind_hold, true, input_bind_hold, false);
|
||||
|
@ -432,6 +432,7 @@ typedef struct settings
|
||||
unsigned run_ahead_frames;
|
||||
|
||||
unsigned midi_volume;
|
||||
unsigned streaming_mode;
|
||||
} uints;
|
||||
|
||||
struct
|
||||
|
@ -3651,3 +3651,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -3435,3 +3435,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -3427,3 +3427,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -3537,3 +3537,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -3302,3 +3302,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -7557,3 +7557,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -3461,3 +3461,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -3521,3 +3521,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -3924,3 +3924,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -3422,3 +3422,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -1699,3 +1699,5 @@ MSG_HASH(MENU_ENUM_LABEL_TWITCH_STREAM_KEY,
|
||||
"twitch_stream_key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_YOUTUBE_STREAM_KEY,
|
||||
"youtube_stream_key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_STREAMING_MODE,
|
||||
"streaming_mode")
|
||||
|
@ -3296,3 +3296,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -3724,3 +3724,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -7540,3 +7540,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -3388,3 +3388,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -3591,3 +3591,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -7578,3 +7578,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -3459,3 +3459,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
"Streaming Mode")
|
||||
|
@ -7067,6 +7067,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
MENU_ENUM_LABEL_RECORD_PATH,
|
||||
PARSE_ONLY_STRING, false) == 0)
|
||||
count++;
|
||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_STREAMING_MODE,
|
||||
PARSE_ONLY_UINT, false) == 0)
|
||||
count++;
|
||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_RECORD_USE_OUTPUT_DIRECTORY,
|
||||
PARSE_ONLY_BOOL, false) == 0)
|
||||
|
@ -289,6 +289,28 @@ static int setting_action_ok_uint(rarch_setting_t *setting, bool wraparound)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_streaming_mode(
|
||||
rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
if (!setting)
|
||||
return;
|
||||
|
||||
/* TODO/FIXME - localize this */
|
||||
switch (*setting->value.target.unsigned_integer)
|
||||
{
|
||||
case STREAMING_MODE_TWITCH:
|
||||
strlcpy(s, "Twitch", len);
|
||||
break;
|
||||
case STREAMING_MODE_YOUTUBE:
|
||||
strlcpy(s, "YouTube", len);
|
||||
break;
|
||||
case STREAMING_MODE_UDP:
|
||||
strlcpy(s, "UDP", len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_video_stream_quality(
|
||||
rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
@ -6491,6 +6513,22 @@ static bool setting_append_list(
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_values(list, list_info, "cfg");
|
||||
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->uints.streaming_mode,
|
||||
MENU_ENUM_LABEL_STREAMING_MODE,
|
||||
MENU_ENUM_LABEL_VALUE_STREAMING_MODE,
|
||||
STREAMING_MODE_TWITCH,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||
(*list)[list_info->index - 1].get_string_representation =
|
||||
&setting_get_string_representation_streaming_mode;
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 2, 1, true, true);
|
||||
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->uints.video_stream_port,
|
||||
|
@ -415,6 +415,7 @@ enum msg_hash_enums
|
||||
MSG_RUNAHEAD_FAILED_TO_SAVE_STATE,
|
||||
MSG_RUNAHEAD_FAILED_TO_LOAD_STATE,
|
||||
MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE,
|
||||
MENU_LABEL(STREAMING_MODE),
|
||||
MENU_LABEL(VIDEO_RECORD_QUALITY),
|
||||
MENU_LABEL(VIDEO_STREAM_QUALITY),
|
||||
MENU_LABEL(STREAMING_URL),
|
||||
|
@ -31,6 +31,13 @@ enum ffemu_pix_format
|
||||
FFEMU_PIX_ARGB8888
|
||||
};
|
||||
|
||||
enum streaming_mode
|
||||
{
|
||||
STREAMING_MODE_TWITCH = 0,
|
||||
STREAMING_MODE_YOUTUBE,
|
||||
STREAMING_MODE_UDP
|
||||
};
|
||||
|
||||
enum record_config_type
|
||||
{
|
||||
RECORD_CONFIG_TYPE_RECORDING_CUSTOM = 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user