From 7b03da634bdfa908cc4d6f30b6b9d902cb93fb36 Mon Sep 17 00:00:00 2001 From: Tong Wu Date: Mon, 31 Oct 2022 16:52:23 +0800 Subject: [PATCH] msdkenc: use GST_CAPS_FEATURE_MEMORY_VA to check the feature Add macros to protect sinkpad_is_va(), since it is not defined on Windows. Part-of: --- subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c index afc2ac7bee..1e265b3659 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c @@ -1435,16 +1435,18 @@ done: return ret; } +#ifndef _WIN32 static gboolean sinkpad_is_va (GstMsdkEnc * thiz) { - GstCapsFeatures *const features = + GstCapsFeatures *features = gst_caps_get_features (thiz->input_state->caps, 0); - if (gst_caps_features_contains (features, "memory:VAMemory")) + if (gst_caps_features_contains (features, GST_CAPS_FEATURE_MEMORY_VA)) return TRUE; return FALSE; } +#endif static gboolean gst_msdkenc_set_format (GstVideoEncoder * encoder, GstVideoCodecState * state)