UI: Add IPv4 / IPv6 selection setting
This commit adds a field in Settings -> Advanced called 'IP Address Family' that allows users to select IPv4 and IPv6, IPv4 Only, or IPv6 Only.
This commit is contained in:
parent
cca1cbf11b
commit
488a96bc4b
6 changed files with 48 additions and 5 deletions
|
|
@ -1198,6 +1198,8 @@ bool SimpleOutput::StartStreaming(obs_service_t *service)
|
|||
config_get_bool(main->Config(), "Output", "DelayPreserve");
|
||||
const char *bindIP =
|
||||
config_get_string(main->Config(), "Output", "BindIP");
|
||||
const char *ipFamily =
|
||||
config_get_string(main->Config(), "Output", "IPFamily");
|
||||
#ifdef _WIN32
|
||||
bool enableNewSocketLoop = config_get_bool(main->Config(), "Output",
|
||||
"NewSocketLoopEnable");
|
||||
|
|
@ -1209,6 +1211,7 @@ bool SimpleOutput::StartStreaming(obs_service_t *service)
|
|||
|
||||
OBSDataAutoRelease settings = obs_data_create();
|
||||
obs_data_set_string(settings, "bind_ip", bindIP);
|
||||
obs_data_set_string(settings, "ip_family", ipFamily);
|
||||
#ifdef _WIN32
|
||||
obs_data_set_bool(settings, "new_socket_loop_enabled",
|
||||
enableNewSocketLoop);
|
||||
|
|
@ -2150,6 +2153,8 @@ bool AdvancedOutput::StartStreaming(obs_service_t *service)
|
|||
config_get_bool(main->Config(), "Output", "DelayPreserve");
|
||||
const char *bindIP =
|
||||
config_get_string(main->Config(), "Output", "BindIP");
|
||||
const char *ipFamily =
|
||||
config_get_string(main->Config(), "Output", "IPFamily");
|
||||
#ifdef _WIN32
|
||||
bool enableNewSocketLoop = config_get_bool(main->Config(), "Output",
|
||||
"NewSocketLoopEnable");
|
||||
|
|
@ -2161,6 +2166,7 @@ bool AdvancedOutput::StartStreaming(obs_service_t *service)
|
|||
|
||||
OBSDataAutoRelease settings = obs_data_create();
|
||||
obs_data_set_string(settings, "bind_ip", bindIP);
|
||||
obs_data_set_string(settings, "ip_family", ipFamily);
|
||||
#ifdef _WIN32
|
||||
obs_data_set_bool(settings, "new_socket_loop_enabled",
|
||||
enableNewSocketLoop);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue