Browse Source

UI: Replace FFmpeg encoder alias with long name

The alias is not really helpful and sometimes confusing, e.g. for HEVC
(without libx265) it ends up being "hevc_nvenc (hevc_amf)" since it just
contains the name of the default encoder. So instead of using the name
of the default encoder, show the full name of the encoder instead.
derrod 2 years ago
parent
commit
2f78bb7991
2 changed files with 5 additions and 6 deletions
  1. 0 3
      UI/ffmpeg-utils.hpp
  2. 5 3
      UI/window-basic-settings.cpp

+ 0 - 3
UI/ffmpeg-utils.hpp

@@ -95,9 +95,6 @@ struct FFmpegCodec {
 	const char *long_name;
 	int id;
 
-	bool alias;
-	const char *base_name;
-
 	FFmpegCodecType type;
 
 	FFmpegCodec() = default;

+ 5 - 3
UI/window-basic-settings.cpp

@@ -1136,9 +1136,11 @@ void OBSBasicSettings::LoadFormats()
 
 static void AddCodec(QComboBox *combo, const FFmpegCodec &codec)
 {
-	QString itemText(codec.name);
-	if (codec.alias)
-		itemText += QString(" (%1)").arg(codec.base_name);
+	QString itemText;
+	if (codec.long_name)
+		itemText = QString("%1 - %2").arg(codec.name, codec.long_name);
+	else
+		itemText = codec.name;
 
 	combo->addItem(itemText, QVariant::fromValue(codec));
 }