浏览代码

obs-qsv11: Migrate to obs_encoder_video_tex_active()

Dennis Sädtler 11 月之前
父节点
当前提交
3f281fef23
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      plugins/obs-qsv11/obs-qsv11.c

+ 3 - 3
plugins/obs-qsv11/obs-qsv11.c

@@ -510,7 +510,7 @@ static void update_params(struct obs_qsv *obsqsv, obs_data_t *settings)
 		codec = "HEVC";
 		codec = "HEVC";
 		if (astrcmpi(profile, "main") == 0) {
 		if (astrcmpi(profile, "main") == 0) {
 			obsqsv->params.nCodecProfile = MFX_PROFILE_HEVC_MAIN;
 			obsqsv->params.nCodecProfile = MFX_PROFILE_HEVC_MAIN;
-			if (obs_p010_tex_active()) {
+			if (obs_encoder_video_tex_active(obsqsv->encoder, VIDEO_FORMAT_P010)) {
 				blog(LOG_WARNING, "[qsv encoder] Forcing main10 for P010");
 				blog(LOG_WARNING, "[qsv encoder] Forcing main10 for P010");
 				obsqsv->params.nCodecProfile = MFX_PROFILE_HEVC_MAIN10;
 				obsqsv->params.nCodecProfile = MFX_PROFILE_HEVC_MAIN10;
 			}
 			}
@@ -862,10 +862,10 @@ static void *obs_qsv_create_tex(enum qsv_codec codec, obs_data_t *settings, obs_
 		return obs_encoder_create_rerouted(encoder, (const char *)fallback_id);
 		return obs_encoder_create_rerouted(encoder, (const char *)fallback_id);
 	}
 	}
 
 
-	bool gpu_texture_active = obs_nv12_tex_active();
+	bool gpu_texture_active = obs_encoder_video_tex_active(encoder, VIDEO_FORMAT_NV12);
 
 
 	if (codec != QSV_CODEC_AVC)
 	if (codec != QSV_CODEC_AVC)
-		gpu_texture_active = gpu_texture_active || obs_p010_tex_active();
+		gpu_texture_active = gpu_texture_active || obs_encoder_video_tex_active(encoder, VIDEO_FORMAT_P010);
 
 
 	if (!gpu_texture_active) {
 	if (!gpu_texture_active) {
 		blog(LOG_INFO, ">>> gpu tex not active, fall back to old qsv encoder");
 		blog(LOG_INFO, ">>> gpu tex not active, fall back to old qsv encoder");