Browse Source

UI: Show warning if using multiple separate QSV encoders

Warns users that two separate QSV encoders can't be active at the same
time.

This should be considered a temporary solution to two issues:
1.) Encoders need to be able to report these errors themselves
2.) If the QSV encoder is ever changed to allow more than one encoder at
    the same time this should be removed
jp9000 9 years ago
parent
commit
350855a2e7
2 changed files with 12 additions and 0 deletions
  1. 1 0
      obs/data/locale/en-US.ini
  2. 11 0
      obs/window-basic-settings.cpp

+ 1 - 0
obs/data/locale/en-US.ini

@@ -388,6 +388,7 @@ Basic.Settings.Output.Simple.Warn.Encoder="Warning: Recording with a software en
 Basic.Settings.Output.Simple.Warn.Lossless="Warning: Lossless quality generates tremendously large file sizes!  Lossless quality can use upward of 7 gigabytes of disk space per minute at high resolutions and framerates.  Lossless is not recommended for long recordings unless you have a very large amount of disk space available."
 Basic.Settings.Output.Simple.Warn.Lossless="Warning: Lossless quality generates tremendously large file sizes!  Lossless quality can use upward of 7 gigabytes of disk space per minute at high resolutions and framerates.  Lossless is not recommended for long recordings unless you have a very large amount of disk space available."
 Basic.Settings.Output.Simple.Warn.Lossless.Msg="Are you sure you want to use lossless quality?"
 Basic.Settings.Output.Simple.Warn.Lossless.Msg="Are you sure you want to use lossless quality?"
 Basic.Settings.Output.Simple.Warn.Lossless.Title="Lossless quality warning!"
 Basic.Settings.Output.Simple.Warn.Lossless.Title="Lossless quality warning!"
+Basic.Settings.Output.Simple.Warn.MultipleQSV="Warning: You cannot use multiple separate QSV encoders when streaming and recording at the same time.  If you want to stream and record at the same time, please change either the recording encoder or the stream encoder."
 Basic.Settings.Output.Simple.Encoder.Software="Software (x264)"
 Basic.Settings.Output.Simple.Encoder.Software="Software (x264)"
 Basic.Settings.Output.Simple.Encoder.Hardware.QSV="Hardware (QSV)"
 Basic.Settings.Output.Simple.Encoder.Hardware.QSV="Hardware (QSV)"
 Basic.Settings.Output.Simple.Encoder.Hardware.NVENC="Hardware (NVENC)"
 Basic.Settings.Output.Simple.Encoder.Hardware.NVENC="Hardware (NVENC)"

+ 11 - 0
obs/window-basic-settings.cpp

@@ -479,6 +479,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
 			this, SLOT(SimpleRecordingQualityLosslessWarning(int)));
 			this, SLOT(SimpleRecordingQualityLosslessWarning(int)));
 	connect(ui->simpleOutStrEncoder, SIGNAL(currentIndexChanged(int)),
 	connect(ui->simpleOutStrEncoder, SIGNAL(currentIndexChanged(int)),
 			this, SLOT(SimpleStreamingEncoderChanged()));
 			this, SLOT(SimpleStreamingEncoderChanged()));
+	connect(ui->simpleOutStrEncoder, SIGNAL(currentIndexChanged(int)),
+			this, SLOT(SimpleRecordingEncoderChanged()));
 	connect(ui->simpleOutRecEncoder, SIGNAL(currentIndexChanged(int)),
 	connect(ui->simpleOutRecEncoder, SIGNAL(currentIndexChanged(int)),
 			this, SLOT(SimpleRecordingEncoderChanged()));
 			this, SLOT(SimpleRecordingEncoderChanged()));
 	connect(ui->simpleOutputVBitrate, SIGNAL(valueChanged(int)),
 	connect(ui->simpleOutputVBitrate, SIGNAL(valueChanged(int)),
@@ -3267,12 +3269,21 @@ void OBSBasicSettings::SimpleRecordingEncoderChanged()
 
 
 	} else if (qual != "Stream") {
 	} else if (qual != "Stream") {
 		QString enc = ui->simpleOutRecEncoder->currentData().toString();
 		QString enc = ui->simpleOutRecEncoder->currentData().toString();
+		QString streamEnc =
+			ui->simpleOutStrEncoder->currentData().toString();
+
 		if (enc == SIMPLE_ENCODER_X264 ||
 		if (enc == SIMPLE_ENCODER_X264 ||
 		    enc == SIMPLE_ENCODER_X264_LOWCPU) {
 		    enc == SIMPLE_ENCODER_X264_LOWCPU) {
 			if (!warning.isEmpty())
 			if (!warning.isEmpty())
 				warning += "\n\n";
 				warning += "\n\n";
 			warning += SIMPLE_OUTPUT_WARNING("Encoder");
 			warning += SIMPLE_OUTPUT_WARNING("Encoder");
 		}
 		}
+
+		if (streamEnc == enc && enc == SIMPLE_ENCODER_QSV) {
+			if (!warning.isEmpty())
+				warning += "\n\n";
+			warning += SIMPLE_OUTPUT_WARNING("MultipleQSV");
+		}
 	}
 	}
 
 
 	if (warning.isEmpty())
 	if (warning.isEmpty())