New upstream version 21.0.2+dfsg1

This commit is contained in:
Sebastian Ramacher 2018-02-19 20:54:37 +01:00
parent 1f1bbb3518
commit baafb6325b
706 changed files with 49633 additions and 5044 deletions

View file

@ -324,10 +324,8 @@ bool AutoConfigStreamPage::validatePage()
if (!wiz->customServer) {
if (wiz->serviceName == "Twitch")
wiz->service = AutoConfig::Service::Twitch;
else if (wiz->serviceName == "hitbox.tv")
wiz->service = AutoConfig::Service::Hitbox;
else if (wiz->serviceName == "beam.pro")
wiz->service = AutoConfig::Service::Beam;
else if (wiz->serviceName == "Smashcast")
wiz->service = AutoConfig::Service::Smashcast;
else
wiz->service = AutoConfig::Service::Other;
} else {
@ -368,11 +366,14 @@ void AutoConfigStreamPage::ServiceChanged()
std::string service = QT_TO_UTF8(ui->service->currentText());
bool regionBased = service == "Twitch" ||
service == "hitbox.tv" ||
service == "beam.pro";
service == "Smashcast";
bool testBandwidth = ui->doBandwidthTest->isChecked();
bool custom = ui->streamType->currentIndex() == 1;
/* Test three closest servers if "Auto" is available for Twitch */
if (service == "Twitch" && wiz->twitchAuto)
regionBased = false;
ui->service->setVisible(!custom);
ui->serviceLabel->setVisible(!custom);
@ -415,6 +416,7 @@ void AutoConfigStreamPage::UpdateKeyLink()
{
bool custom = ui->streamType->currentIndex() == 1;
QString serviceName = ui->service->currentText();
bool isYoutube = false;
if (custom)
serviceName = "";
@ -432,6 +434,15 @@ void AutoConfigStreamPage::UpdateKeyLink()
text += "\">";
text += QTStr("Basic.AutoConfig.StreamPage.StreamKey.LinkToSite");
text += "</a>";
isYoutube = true;
}
if (isYoutube) {
ui->doBandwidthTest->setChecked(false);
ui->doBandwidthTest->setEnabled(false);
} else {
ui->doBandwidthTest->setEnabled(true);
}
ui->streamKeyLabel->setText(text);
@ -544,6 +555,13 @@ void AutoConfigStreamPage::UpdateCompleted()
AutoConfig::AutoConfig(QWidget *parent)
: QWizard(parent)
{
calldata_t cd = {0};
calldata_set_int(&cd, "seconds", 5);
proc_handler_t *ph = obs_get_proc_handler();
proc_handler_call(ph, "twitch_ingests_refresh", &cd);
calldata_free(&cd);
OBSBasic *main = reinterpret_cast<OBSBasic*>(parent);
main->EnableOutputs(false);
@ -568,6 +586,23 @@ AutoConfig::AutoConfig(QWidget *parent)
baseResolutionCX = ovi.base_width;
baseResolutionCY = ovi.base_height;
/* ----------------------------------------- */
/* check to see if Twitch's "auto" available */
OBSData twitchSettings = obs_data_create();
obs_data_release(twitchSettings);
obs_data_set_string(twitchSettings, "service", "Twitch");
obs_properties_t *props = obs_get_service_properties("rtmp_common");
obs_properties_apply_settings(props, twitchSettings);
obs_property_t *p = obs_properties_get(props, "server");
const char *first = obs_property_list_item_string(p, 0);
twitchAuto = strcmp(first, "auto") == 0;
obs_properties_destroy(props);
/* ----------------------------------------- */
/* load service/servers */
@ -674,7 +709,7 @@ bool AutoConfig::CanTestServer(const char *server)
} else if (regionOther) {
return true;
}
} else if (service == Service::Hitbox) {
} else if (service == Service::Smashcast) {
if (strcmp(server, "Default") == 0) {
return true;
} else if (astrcmp_n(server, "US-West:", 8) == 0 ||
@ -689,17 +724,6 @@ bool AutoConfig::CanTestServer(const char *server)
} else if (regionOther) {
return true;
}
} else if (service == Service::Beam) {
if (astrcmp_n(server, "US:", 3) == 0) {
return regionUS;
} else if (astrcmp_n(server, "EU:", 3) == 0) {
return regionEU;
} else if (astrcmp_n(server, "South Korea:", 12) == 0 ||
astrcmp_n(server, "Asia:", 5) == 0) {
return regionAsia;
} else if (regionOther) {
return true;
}
} else {
return true;
}