Ver código fonte

obs-qsv11: Set error message for QSV with P216/P416

If P216 or P416 color formats are selected with QSV, these color formats
were not explicitly handled, so the switch statements would end up in
the default case. If the user had also selected a Rec. 2100 color space,
this would result in the strange error message:
"OBS does not support 8-bit output of Rec. 2100."

This message is confusing and does not correctly reflect the chosen
settings. Let's explicitly handle the P216/P416 cases and provide a more
accurate error message.
Ryan Foster 2 anos atrás
pai
commit
c0adff2863

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

@@ -12,3 +12,4 @@ Latency.ToolTip="There is trade-off between latency and quality.\nIf your case p
 SubjectiveVideoEnhancements="Subjective Video Enhancements"
 8bitUnsupportedHdr="OBS does not support 8-bit output of Rec. 2100."
 10bitUnsupportedAvc="Cannot perform 10-bit encode on Intel QSV H.264 encoder."
+16bitUnsupported="Cannot perform 16-bit encode on this encoder."

+ 8 - 0
plugins/obs-qsv11/obs-qsv11.c

@@ -862,6 +862,14 @@ static void *obs_qsv_create(enum qsv_codec codec, obs_data_t *settings,
 		}
 		obsqsv->params.video_fmt_10bit = true;
 		break;
+	case VIDEO_FORMAT_P216:
+	case VIDEO_FORMAT_P416: {
+		const char *const text = obs_module_text("16bitUnsupported");
+		obs_encoder_set_last_error(encoder, text);
+		error("%s", text);
+		bfree(obsqsv);
+		return NULL;
+	}
 	default:
 		switch (voi->colorspace) {
 		case VIDEO_CS_2100_PQ: