From 3f281fef230b3265dc7261b7253d145026b04f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20S=C3=A4dtler?= Date: Wed, 30 Oct 2024 09:25:15 +0100 Subject: [PATCH] obs-qsv11: Migrate to obs_encoder_video_tex_active() --- plugins/obs-qsv11/obs-qsv11.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/obs-qsv11/obs-qsv11.c b/plugins/obs-qsv11/obs-qsv11.c index 9c1be2d55..b1da7f5fe 100644 --- a/plugins/obs-qsv11/obs-qsv11.c +++ b/plugins/obs-qsv11/obs-qsv11.c @@ -510,7 +510,7 @@ static void update_params(struct obs_qsv *obsqsv, obs_data_t *settings) codec = "HEVC"; if (astrcmpi(profile, "main") == 0) { 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"); 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); } - 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) - 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) { blog(LOG_INFO, ">>> gpu tex not active, fall back to old qsv encoder");