mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-19 04:34:04 -04:00
UI: Remove hardcoded stream codec list
This commit is contained in:
1 parent
44ca002d02
commit
8d6cacc35b
1 file changed
+1
-15
@@ -1447,27 +1447,13 @@ void OBSBasicSettings::ResetEncoders(bool streamOnly)
|
||||
if (obs_get_encoder_type(type) != OBS_ENCODER_VIDEO)
|
||||
continue;
|
||||
|
||||
const char *streaming_codecs[] = {
|
||||
"h264",
|
||||
#ifdef ENABLE_HEVC
|
||||
"hevc",
|
||||
#endif
|
||||
};
|
||||
|
||||
bool is_streaming_codec = false;
|
||||
for (const char *test_codec : streaming_codecs) {
|
||||
if (strcmp(codec, test_codec) == 0) {
|
||||
is_streaming_codec = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((caps & ENCODER_HIDE_FLAGS) != 0)
|
||||
continue;
|
||||
|
||||
QString qName = QT_UTF8(name);
|
||||
QString qType = QT_UTF8(type);
|
||||
|
||||
if (is_streaming_codec && service_supports_codec(codecs, codec))
|
||||
if (service_supports_codec(codecs, codec))
|
||||
ui->advOutEncoder->addItem(qName, qType);
|
||||
if (!streamOnly)
|
||||
ui->advOutRecEncoder->addItem(qName, qType);
|
||||
|
||||
Reference in new issue
Block a user