mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-06 06:22:29 +00:00
va: Use macro rather than VAMemory feature string.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1061>
This commit is contained in:
parent
c50a35da2b
commit
01cfc1ee7e
3 changed files with 9 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue