rtmp-services: Only update Twitch ingests when necessary
(This commit also modifies UI) Instead of pinging Twitch every time the program starts up, only pings for new servers when the ingests are actually being used, and when the UI uses the auto-configuration dialog. If ingests have not been cached when using the "Auto" server, it will wait for 3 seconds max to query the Twitch ingest API. If it takes longer than 3 seconds or fails, it will defer to SF. If ingests were already cached, then it will use the existing cache immediately.
This commit is contained in:
parent
3dc96fbe43
commit
d768717b8c
4 changed files with 108 additions and 22 deletions
|
|
@ -545,6 +545,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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue