mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-04 22:56:11 -05:00
obs-ffmpeg: Direct setting of encryption & auth for SRT & RIST
Also modifies UI. This allows the direct use of passphrase (SRT & RIST) used for encryption, user + password (RIST) as well as streamid (SRT). Previously, these parameters had to be set in the URL in the form: URL?option1=value1&option2=value2. They still can but there is also the option to set them in the stream key and username/password fields. SRT: - the stream_id is set in the stream key (more info on it: [1]); - the encryption passphrase is set in the password auth field. RIST: - the encryption passphrase is set in the stream key; - the srp_username and srp_password are set in the user/password auth fields [2]. Additionally, some error logging has been added when there's a disconnect caused by a wrong password. Lastly, this solves a bug when auto-reconnect is set and a wrong passphrase is provided for srt; the output would keep trying to reconnect. With this commit, an OBS_OUTPUT_INVALID_STREAM signal is emitted and the stream is immediately stopped. [1] https://github.com/Haivision/srt/blob/master/docs/features/access-control.md [2] https://code.videolan.org/rist/librist/-/wikis/Authentication-and-the-ristsrppasswd-Utility Signed-off-by: pkv <pkv@obsproject.com>
This commit is contained in:
@@ -132,6 +132,29 @@ void OBSBasicSettings::LoadStream1Settings()
|
||||
ui->authUsername->setText(QT_UTF8(username));
|
||||
ui->authPw->setText(QT_UTF8(password));
|
||||
ui->useAuth->setChecked(use_auth);
|
||||
|
||||
/* add tooltips for stream key, user, password fields */
|
||||
QString file = !App()->IsThemeDark()
|
||||
? ":/res/images/help.svg"
|
||||
: ":/res/images/help_light.svg";
|
||||
QString lStr = "<html>%1 <img src='%2' style=' \
|
||||
vertical-align: bottom; \
|
||||
' /></html>";
|
||||
|
||||
ui->streamKeyLabel->setText(
|
||||
lStr.arg(ui->streamKeyLabel->text(), file));
|
||||
ui->streamKeyLabel->setToolTip(
|
||||
QTStr("Basic.AutoConfig.StreamPage.StreamKey.ToolTip"));
|
||||
|
||||
ui->authUsernameLabel->setText(
|
||||
lStr.arg(ui->authUsernameLabel->text(), file));
|
||||
ui->authUsernameLabel->setToolTip(
|
||||
QTStr("Basic.Settings.Stream.Custom.Username.ToolTip"));
|
||||
|
||||
ui->authPwLabel->setText(
|
||||
lStr.arg(ui->authPwLabel->text(), file));
|
||||
ui->authPwLabel->setToolTip(
|
||||
QTStr("Basic.Settings.Stream.Custom.Password.ToolTip"));
|
||||
} else {
|
||||
int idx = ui->service->findText(service);
|
||||
if (idx == -1) {
|
||||
@@ -305,7 +328,7 @@ void OBSBasicSettings::UpdateKeyLink()
|
||||
if (serviceName == "Dacast") {
|
||||
ui->streamKeyLabel->setText(
|
||||
QTStr("Basic.AutoConfig.StreamPage.EncoderKey"));
|
||||
} else {
|
||||
} else if (!IsCustomService()) {
|
||||
ui->streamKeyLabel->setText(
|
||||
QTStr("Basic.AutoConfig.StreamPage.StreamKey"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user