From 2f78bb79912351d5cd897032da95029422d35a17 Mon Sep 17 00:00:00 2001 From: derrod Date: Tue, 1 Aug 2023 10:47:05 +0200 Subject: [PATCH] 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. --- UI/ffmpeg-utils.hpp | 3 --- UI/window-basic-settings.cpp | 8 +++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/UI/ffmpeg-utils.hpp b/UI/ffmpeg-utils.hpp index f55c1f47d..6fb2add9d 100644 --- a/UI/ffmpeg-utils.hpp +++ b/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; diff --git a/UI/window-basic-settings.cpp b/UI/window-basic-settings.cpp index 6efce6a32..59b494e5c 100644 --- a/UI/window-basic-settings.cpp +++ b/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)); }