msdkenc: use GST_CAPS_FEATURE_MEMORY_VA to check the feature
authorTong Wu <tong1.wu@intel.com>
Mon, 31 Oct 2022 08:52:23 +0000 (16:52 +0800)
committertong1wu <tong1.wu@intel.com>
Wed, 2 Nov 2022 07:40:59 +0000 (07:40 +0000)
Add macros to protect sinkpad_is_va(), since it is not defined on
Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3301>

subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c

index afc2ac7..1e265b3 100644 (file)
@@ -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)