From: Víctor Manuel Jáquez Leal Date: Fri, 17 Sep 2021 11:02:38 +0000 (+0200) Subject: va: Use macro rather than VAMemory feature string. X-Git-Tag: 1.19.3~340 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01cfc1ee7eb5eb0df4bd4ec7b4982b976985c2dd;p=platform%2Fupstream%2Fgstreamer.git va: Use macro rather than VAMemory feature string. Part-of: --- diff --git a/subprojects/gst-plugins-bad/sys/va/gstvadeinterlace.c b/subprojects/gst-plugins-bad/sys/va/gstvadeinterlace.c index a936830..454551c 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvadeinterlace.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvadeinterlace.c @@ -115,10 +115,11 @@ struct CData }; /* *INDENT-OFF* */ -static const gchar *caps_str = GST_VIDEO_CAPS_MAKE_WITH_FEATURES ("memory:VAMemory", - "{ NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE, ARGB, ABGR }") " ;" - GST_VIDEO_CAPS_MAKE ("{ VUYA, GRAY8, NV12, NV21, YUY2, UYVY, YV12, " - "I420, P010_10LE, RGBA, BGRA, ARGB, ABGR }"); +static const gchar *caps_str = + GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_VA, + "{ NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE, ARGB, ABGR }") " ;" + GST_VIDEO_CAPS_MAKE ("{ VUYA, GRAY8, NV12, NV21, YUY2, UYVY, YV12, " + "I420, P010_10LE, RGBA, BGRA, ARGB, ABGR }"); /* *INDENT-ON* */ static void diff --git a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c index c092f65..596b9c7 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c @@ -743,7 +743,7 @@ gst_va_vpp_complete_caps_features (GstCaps * caps, GstCaps * tmpl_caps) has_dma = TRUE; valid = TRUE; } - if (gst_caps_features_contains (features, "memory:VAMemory")) { + if (gst_caps_features_contains (features, GST_CAPS_FEATURE_MEMORY_VA)) { has_va = TRUE; valid = TRUE; } @@ -774,7 +774,8 @@ gst_va_vpp_complete_caps_features (GstCaps * caps, GstCaps * tmpl_caps) structure = gst_caps_get_structure (tmpl_caps, i); features = gst_caps_get_features (tmpl_caps, i); - if (gst_caps_features_contains (features, "memory:VAMemory") && !has_va) + if (gst_caps_features_contains (features, + GST_CAPS_FEATURE_MEMORY_VA) && !has_va) gst_caps_append_structure_full (full_caps, gst_structure_copy (structure), gst_caps_features_copy (features)); diff --git a/subprojects/gst-plugins-bad/tests/examples/va/main.c b/subprojects/gst-plugins-bad/tests/examples/va/main.c index 2ed42c0..e226939 100644 --- a/subprojects/gst-plugins-bad/tests/examples/va/main.c +++ b/subprojects/gst-plugins-bad/tests/examples/va/main.c @@ -229,7 +229,7 @@ build_pipeline (struct _app *app) gst_object_unref (src); sink = gst_bin_get_by_name (GST_BIN (app->pipeline), "sink"); - caps = gst_caps_from_string ("video/x-raw(memory:VAMemory)"); + caps = gst_caps_from_string ("video/x-raw(" GST_CAPS_FEATURE_MEMORY_VA ")"); g_object_set (sink, "caps", caps, NULL); gst_caps_unref (caps); gst_app_sink_set_callbacks (GST_APP_SINK (sink), &callbacks, app, NULL);