From b7b24573cec3011301126ffbe7c571d16bfb9d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 3 Sep 2024 12:16:19 +0300 Subject: [PATCH] common: Use more efficient versions of GstCapsFeatures API where possible Part-of: --- subprojects/gst-libav/ext/libav/gstavviddec.c | 4 ++- .../ext/nvcomp/gstnvcompvideodec.cpp | 6 ++-- .../gst-plugins-bad/ext/ttml/gstttmlparse.c | 3 +- .../gst-plugins-bad/ext/vulkan/vkdownload.c | 2 +- .../gst-plugins-bad/ext/vulkan/vkh264dec.c | 3 +- .../gst-plugins-bad/ext/vulkan/vkh265dec.c | 3 +- .../gst-plugins-bad/ext/vulkan/vkupload.c | 2 +- .../gst-libs/gst/vulkan/gstvkswapper.c | 3 +- .../gst/interlace/gstinterlace.c | 4 ++- .../sys/amfcodec/gstamfav1enc.cpp | 3 +- .../sys/amfcodec/gstamfh264enc.cpp | 3 +- .../sys/amfcodec/gstamfh265enc.cpp | 3 +- .../sys/androidmedia/gstamcvideodec.c | 6 ++-- .../sys/applemedia/avfvideosrc.m | 2 +- .../sys/d3d11/gstd3d11convert.cpp | 9 ++++-- .../sys/d3d11/gstd3d11decoder.cpp | 3 +- .../sys/d3d11/gstd3d11deinterlace.cpp | 9 ++++-- .../sys/d3d11/gstd3d11download.cpp | 2 +- .../sys/d3d11/gstd3d11h265dec.cpp | 9 ++++-- .../sys/d3d11/gstd3d11ipcsink.cpp | 3 +- .../sys/d3d11/gstd3d11screencapturesrc.cpp | 4 +-- .../sys/d3d11/gstd3d11upload.cpp | 2 +- .../sys/d3d11/gstd3d11vp9dec.cpp | 3 +- .../sys/d3d12/gstd3d12convert.cpp | 3 +- .../sys/d3d12/gstd3d12decoder.cpp | 12 ++++--- .../sys/d3d12/gstd3d12download.cpp | 2 +- .../sys/d3d12/gstd3d12h264enc.cpp | 3 +- .../sys/d3d12/gstd3d12ipcsink.cpp | 3 +- .../sys/d3d12/gstd3d12memorycopy.cpp | 2 +- .../sys/d3d12/gstd3d12screencapturesrc.cpp | 4 +-- .../sys/d3d12/gstd3d12upload.cpp | 2 +- .../sys/mediafoundation/gstmfvideoencoder.cpp | 3 +- .../gst-plugins-bad/sys/msdk/gstmsdkcaps.c | 2 +- .../gst-plugins-bad/sys/msdk/gstmsdkdec.c | 9 ++++-- .../gst-plugins-bad/sys/msdk/gstmsdkenc.c | 6 ++-- .../gst-plugins-bad/sys/msdk/gstmsdkvpp.c | 5 +-- .../gst-plugins-bad/sys/msdk/gstmsdkvpputil.c | 8 +++-- .../sys/nvcodec/gstcudaconvertscale.c | 9 ++++-- .../sys/nvcodec/gstcudaipcsink.cpp | 3 +- .../sys/nvcodec/gstcudamemorycopy.c | 2 +- .../sys/nvcodec/gstnvav1encoder.cpp | 22 ++++++++----- .../gst-plugins-bad/sys/nvcodec/gstnvdec.c | 10 +++--- .../sys/nvcodec/gstnvdecoder.cpp | 28 ++++++++++------ .../sys/nvcodec/gstnvh264encoder.cpp | 22 ++++++++----- .../sys/nvcodec/gstnvh265encoder.cpp | 22 ++++++++----- .../gst-plugins-bad/sys/qsv/gstqsvav1enc.cpp | 8 +++-- .../gst-plugins-bad/sys/qsv/gstqsvdecoder.cpp | 3 +- .../gst-plugins-bad/sys/qsv/gstqsvh264dec.cpp | 3 +- .../gst-plugins-bad/sys/qsv/gstqsvh264enc.cpp | 8 +++-- .../gst-plugins-bad/sys/qsv/gstqsvh265dec.cpp | 3 +- .../gst-plugins-bad/sys/qsv/gstqsvh265enc.cpp | 8 +++-- .../gst-plugins-bad/sys/qsv/gstqsvjpegdec.cpp | 3 +- .../gst-plugins-bad/sys/qsv/gstqsvjpegenc.cpp | 8 +++-- .../gst-plugins-bad/sys/qsv/gstqsvvp9dec.cpp | 3 +- .../gst-plugins-bad/sys/qsv/gstqsvvp9enc.cpp | 8 +++-- .../sys/v4l2codecs/gstv4l2decoder.c | 6 ++-- .../gst-plugins-bad/sys/va/gstvaav1dec.c | 2 +- .../gst-plugins-bad/sys/va/gstvabase.c | 2 +- .../gst-plugins-bad/sys/va/gstvabasedec.c | 2 +- .../gst-plugins-bad/sys/va/gstvacaps.c | 5 +-- .../gst-plugins-bad/sys/va/gstvacompositor.c | 7 ++-- .../gst-plugins-bad/sys/va/gstvaencoder.c | 2 +- .../gst-plugins-bad/sys/va/gstvafilter.c | 3 +- subprojects/gst-plugins-bad/sys/va/gstvavpp.c | 2 +- .../tests/check/libs/vkimagebufferpool.c | 3 +- .../tests/check/libs/vkvideodecode.c | 3 +- .../tests/check/libs/vkvideoencodeh264.c | 6 ++-- .../tests/check/libs/vkvideoencodeh265.c | 6 ++-- .../tests/examples/d3d11/d3d11converter.cpp | 2 +- .../tests/examples/nvcodec/nvcodec.c | 2 +- .../ext/gl/gstgldownloadelement.c | 2 +- .../gst-plugins-base/ext/gl/gstglimagesink.c | 7 ++-- .../gst-plugins-base/ext/gl/gstglstereomix.c | 6 ++-- .../ext/gl/gstglviewconvert.c | 6 ++-- .../gst-libs/gst/gl/gstglupload.c | 32 ++++++++++++------- .../gst-libs/gst/video/video-info-dma.c | 2 +- .../gst-libs/gst/video/video-info.c | 4 ++- .../videoconvertscale/gstvideoconvertscale.c | 3 +- .../tests/check/libs/gstglcolorconvert.c | 10 +++--- .../tests/check/libs/gstglupload.c | 4 +-- .../ext/qt6/gstqml6glmixer.cc | 4 ++- .../gst-plugins-good/ext/qt6/qt6glwindow.cc | 3 +- .../gst/deinterlace/gstdeinterlace.c | 4 ++- .../gst-plugins-good/sys/v4l2/gstv4l2object.c | 10 ++++-- .../tests/check/elements/videocrop.c | 2 +- .../gst/vaapi/gstvaapidecode.c | 5 +-- .../gst/vaapi/gstvaapipluginutil.c | 6 ++-- .../gstreamer-vaapi/gst/vaapi/gstvaapisink.c | 2 +- .../gstreamer/tests/check/gst/gstcaps.c | 11 ++++--- .../tests/check/gst/gstcapsfeatures.c | 2 +- .../gstreamer/tests/check/gst/gstvalue.c | 2 +- 91 files changed, 320 insertions(+), 188 deletions(-) diff --git a/subprojects/gst-libav/ext/libav/gstavviddec.c b/subprojects/gst-libav/ext/libav/gstavviddec.c index d31c127cbe..c0899c058c 100644 --- a/subprojects/gst-libav/ext/libav/gstavviddec.c +++ b/subprojects/gst-libav/ext/libav/gstavviddec.c @@ -228,7 +228,9 @@ dup_caps_with_alternate (GstCaps * caps) GstCapsFeatures *features; with_alternate = gst_caps_copy (caps); - features = gst_caps_features_new (GST_CAPS_FEATURE_FORMAT_INTERLACED, NULL); + features = + gst_caps_features_new_static_str (GST_CAPS_FEATURE_FORMAT_INTERLACED, + NULL); gst_caps_set_features_simple (with_alternate, features); gst_caps_set_simple (with_alternate, "interlace-mode", G_TYPE_STRING, diff --git a/subprojects/gst-plugins-bad/ext/nvcomp/gstnvcompvideodec.cpp b/subprojects/gst-plugins-bad/ext/nvcomp/gstnvcompvideodec.cpp index 08a0c647b7..3345d64935 100644 --- a/subprojects/gst-plugins-bad/ext/nvcomp/gstnvcompvideodec.cpp +++ b/subprojects/gst-plugins-bad/ext/nvcomp/gstnvcompvideodec.cpp @@ -1029,12 +1029,14 @@ gst_nv_comp_video_dec_negotiate (GstVideoDecoder * decoder) auto format = GST_VIDEO_INFO_FORMAT (&priv->info); if (is_cuda && is_supported_cuda_format (format)) { gst_caps_set_features_simple (state->caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, + nullptr)); } #ifdef HAVE_GST_GL else if (is_gl && is_supported_gl_format (format)) { gst_caps_set_features_simple (state->caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + nullptr)); priv->gl_interop = TRUE; } #endif diff --git a/subprojects/gst-plugins-bad/ext/ttml/gstttmlparse.c b/subprojects/gst-plugins-bad/ext/ttml/gstttmlparse.c index 649a041699..f89481227b 100644 --- a/subprojects/gst-plugins-bad/ext/ttml/gstttmlparse.c +++ b/subprojects/gst-plugins-bad/ext/ttml/gstttmlparse.c @@ -387,7 +387,8 @@ static GstCaps * gst_ttml_parse_get_src_caps (GstTtmlParse * self) { GstCaps *caps; - GstCapsFeatures *features = gst_caps_features_new ("meta:GstSubtitleMeta", + GstCapsFeatures *features = + gst_caps_features_new_static_str ("meta:GstSubtitleMeta", NULL); caps = gst_caps_new_empty_simple ("text/x-raw"); diff --git a/subprojects/gst-plugins-bad/ext/vulkan/vkdownload.c b/subprojects/gst-plugins-bad/ext/vulkan/vkdownload.c index eec8497c87..057fc85567 100644 --- a/subprojects/gst-plugins-bad/ext/vulkan/vkdownload.c +++ b/subprojects/gst-plugins-bad/ext/vulkan/vkdownload.c @@ -51,7 +51,7 @@ _set_caps_features_with_passthrough (const GstCaps * caps, GstCapsFeatures *features, *orig_features; orig_features = gst_caps_get_features (caps, i); - features = gst_caps_features_new (feature_name, NULL); + features = gst_caps_features_new_static_str (feature_name, NULL); m = gst_caps_features_get_size (orig_features); for (j = 0; j < m; j++) { diff --git a/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c b/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c index 940a9a2adb..c2e0052cb2 100644 --- a/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c +++ b/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c @@ -291,7 +291,8 @@ gst_vulkan_h264_decoder_negotiate (GstVideoDecoder * decoder) self->output_state->caps = gst_video_info_to_caps (&self->output_state->info); gst_caps_set_features_simple (self->output_state->caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE, + NULL)); GST_INFO_OBJECT (self, "Negotiated caps %" GST_PTR_FORMAT, self->output_state->caps); diff --git a/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c b/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c index b9872a84ce..90f37399fd 100644 --- a/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c +++ b/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c @@ -286,7 +286,8 @@ gst_vulkan_h265_decoder_negotiate (GstVideoDecoder * decoder) self->output_state->caps = gst_video_info_to_caps (&self->output_state->info); gst_caps_set_features_simple (self->output_state->caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE, + NULL)); GST_INFO_OBJECT (self, "Negotiated caps %" GST_PTR_FORMAT, self->output_state->caps); diff --git a/subprojects/gst-plugins-bad/ext/vulkan/vkupload.c b/subprojects/gst-plugins-bad/ext/vulkan/vkupload.c index a9c0d307b9..b21832d9b4 100644 --- a/subprojects/gst-plugins-bad/ext/vulkan/vkupload.c +++ b/subprojects/gst-plugins-bad/ext/vulkan/vkupload.c @@ -50,7 +50,7 @@ _set_caps_features_with_passthrough (const GstCaps * caps, GstCapsFeatures *features, *orig_features; orig_features = gst_caps_get_features (caps, i); - features = gst_caps_features_new (feature_name, NULL); + features = gst_caps_features_new_static_str (feature_name, NULL); m = gst_caps_features_get_size (orig_features); for (j = 0; j < m; j++) { diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkswapper.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkswapper.c index e7d794ab8a..ac641d1b5a 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkswapper.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkswapper.c @@ -670,7 +670,8 @@ gst_vulkan_swapper_get_supported_caps (GstVulkanSwapper * swapper, caps = gst_caps_new_empty_simple ("video/x-raw"); gst_caps_set_features (caps, 0, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE)); s = gst_caps_get_structure (caps, 0); { diff --git a/subprojects/gst-plugins-bad/gst/interlace/gstinterlace.c b/subprojects/gst-plugins-bad/gst/interlace/gstinterlace.c index 22f53abe7c..ea15ed449a 100644 --- a/subprojects/gst-plugins-bad/gst/interlace/gstinterlace.c +++ b/subprojects/gst-plugins-bad/gst/interlace/gstinterlace.c @@ -460,7 +460,9 @@ dup_caps_with_alternate (GstCaps * caps) GstCapsFeatures *features; with_alternate = gst_caps_copy (caps); - features = gst_caps_features_new (GST_CAPS_FEATURE_FORMAT_INTERLACED, NULL); + features = + gst_caps_features_new_static_str (GST_CAPS_FEATURE_FORMAT_INTERLACED, + NULL); gst_caps_set_features_simple (with_alternate, features); gst_caps_set_simple (with_alternate, "interlace-mode", G_TYPE_STRING, diff --git a/subprojects/gst-plugins-bad/sys/amfcodec/gstamfav1enc.cpp b/subprojects/gst-plugins-bad/sys/amfcodec/gstamfav1enc.cpp index 448c3da09c..6280cc05e7 100644 --- a/subprojects/gst-plugins-bad/sys/amfcodec/gstamfav1enc.cpp +++ b/subprojects/gst-plugins-bad/sys/amfcodec/gstamfav1enc.cpp @@ -1742,7 +1742,8 @@ gst_amf_av1_enc_create_class_data (GstD3D11Device * device, AMFComponent * comp) system_caps = gst_caps_from_string (sink_caps_str.c_str ()); sink_caps = gst_caps_copy (system_caps); gst_caps_set_features (sink_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr)); gst_caps_append (sink_caps, system_caps); cdata = g_new0 (GstAmfAv1EncClassData, 1); diff --git a/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh264enc.cpp b/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh264enc.cpp index 1fdf8a3bcd..212f61fdcc 100644 --- a/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh264enc.cpp +++ b/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh264enc.cpp @@ -2261,7 +2261,8 @@ gst_amf_h264_enc_create_class_data (GstD3D11Device * device, system_caps = gst_caps_from_string (sink_caps_str.c_str ()); sink_caps = gst_caps_copy (system_caps); gst_caps_set_features (sink_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr)); gst_caps_append (sink_caps, system_caps); cdata = g_new0 (GstAmfH264EncClassData, 1); diff --git a/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh265enc.cpp b/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh265enc.cpp index de4fda0c10..66ddd58f48 100644 --- a/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh265enc.cpp +++ b/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh265enc.cpp @@ -1954,7 +1954,8 @@ gst_amf_h265_enc_create_class_data (GstD3D11Device * device, system_caps = gst_caps_from_string (sink_caps_str.c_str ()); sink_caps = gst_caps_copy (system_caps); gst_caps_set_features (sink_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr)); gst_caps_append (sink_caps, system_caps); cdata = g_new0 (GstAmfH265EncClassData, 1); diff --git a/subprojects/gst-plugins-bad/sys/androidmedia/gstamcvideodec.c b/subprojects/gst-plugins-bad/sys/androidmedia/gstamcvideodec.c index e9230fb386..c7f5cb174c 100644 --- a/subprojects/gst-plugins-bad/sys/androidmedia/gstamcvideodec.c +++ b/subprojects/gst-plugins-bad/sys/androidmedia/gstamcvideodec.c @@ -809,7 +809,8 @@ gst_amc_video_dec_set_src_caps (GstAmcVideoDec * self, GstAmcFormat * format) gst_caps_unref (output_state->caps); output_state->caps = gst_video_info_to_caps (&output_state->info); gst_caps_set_features (output_state->caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + NULL)); gst_caps_set_simple (output_state->caps, "texture-target", G_TYPE_STRING, "external-oes", NULL); GST_DEBUG_OBJECT (self, "Configuring for Surface output"); @@ -1954,7 +1955,8 @@ gst_amc_video_dec_set_format (GstVideoDecoder * decoder, output_state->caps = gst_video_info_to_caps (&output_state->info); gst_caps_set_features (output_state->caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + NULL)); /* gst_amc_video_dec_decide_allocation will update * self->downstream_supports_gl */ diff --git a/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m b/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m index b356e78310..ec6e3d4470 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m +++ b/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m @@ -1593,7 +1593,7 @@ gst_av_capture_device_get_caps (AVCaptureDevice *device, AVCaptureVideoDataOutpu gst_caps_append (result_caps, gst_caps_copy (caps)); /* Set GLMemory features on caps */ gst_caps_set_features (caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, NULL)); gst_caps_set_simple (caps, "texture-target", G_TYPE_STRING, diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11convert.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11convert.cpp index 882f2c42d3..fc5c53a451 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11convert.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11convert.cpp @@ -185,7 +185,8 @@ gst_d3d11_base_convert_caps_remove_format_info (GstCaps * caps) gint i, n; GstCaps *res; GstCapsFeatures *feature = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY); res = gst_caps_new_empty (); @@ -222,7 +223,8 @@ gst_d3d11_base_convert_caps_rangify_size_info (GstCaps * caps) gint i, n; GstCaps *res; GstCapsFeatures *feature = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY); res = gst_caps_new_empty (); @@ -265,7 +267,8 @@ gst_d3d11_base_convert_caps_remove_format_and_rangify_size_info (GstCaps * caps) gint i, n; GstCaps *res; GstCapsFeatures *feature = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY); res = gst_caps_new_empty (); diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11decoder.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11decoder.cpp index b179f2a83a..fd94455a40 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11decoder.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11decoder.cpp @@ -1769,7 +1769,8 @@ gst_d3d11_decoder_negotiate (GstD3D11Decoder * decoder, if (d3d11_supported) { gst_caps_set_features (state->caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + NULL)); } decoder->downstream_supports_d3d11 = d3d11_supported; diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11deinterlace.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11deinterlace.cpp index 59a5edd155..4d4c17a94e 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11deinterlace.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11deinterlace.cpp @@ -745,7 +745,8 @@ gst_d3d11_deinterlace_remove_interlace_info (GstCaps * caps, gint i, n; GstCaps *res; GstCapsFeatures *feature = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY); res = gst_caps_new_empty (); @@ -2411,11 +2412,13 @@ gst_d3d11_deinterlace_register (GstPlugin * plugin, GstD3D11Device * device, /* TODO: Add alternating deinterlace */ src_caps = gst_caps_copy (caps); - caps_features = gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + caps_features = + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, NULL); gst_caps_set_features_simple (src_caps, caps_features); - caps_features = gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + caps_features = + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, NULL); gst_caps_set_features_simple (caps, caps_features); gst_caps_append (src_caps, caps); diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11download.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11download.cpp index aa604927b5..72d7a7619a 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11download.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11download.cpp @@ -142,7 +142,7 @@ _set_caps_features (const GstCaps * caps, const gchar * feature_name) for (i = 0; i < n; i++) gst_caps_set_features (tmp, i, - gst_caps_features_from_string (feature_name)); + gst_caps_features_new_single_static_str (feature_name)); return tmp; } diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11h265dec.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11h265dec.cpp index bb73bdae5e..aabc7e1cf5 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11h265dec.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11h265dec.cpp @@ -419,7 +419,8 @@ gst_d3d11_h265_dec_register (GstPlugin * plugin, GstD3D11Device * device, /* System memory with alternate interlace-mode */ tmp = gst_caps_copy (src_caps_copy); - caps_features = gst_caps_features_new (GST_CAPS_FEATURE_FORMAT_INTERLACED, + caps_features = + gst_caps_features_new_static_str (GST_CAPS_FEATURE_FORMAT_INTERLACED, nullptr); gst_caps_set_features_simple (tmp, caps_features); gst_caps_set_simple (tmp, "interlace-mode", G_TYPE_STRING, "alternate", @@ -428,7 +429,8 @@ gst_d3d11_h265_dec_register (GstPlugin * plugin, GstD3D11Device * device, /* D3D11 memory feature */ tmp = gst_caps_copy (src_caps_copy); - caps_features = gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + caps_features = + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr); gst_caps_set_features_simple (tmp, caps_features); gst_caps_append (src_caps, tmp); @@ -438,7 +440,8 @@ gst_d3d11_h265_dec_register (GstPlugin * plugin, GstD3D11Device * device, #if 0 /* D3D11 memory with alternate interlace-mode */ tmp = gst_caps_copy (src_caps_copy); - caps_features = gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + caps_features = + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, GST_CAPS_FEATURE_FORMAT_INTERLACED, nullptr); gst_caps_set_features_simple (tmp, caps_features); gst_caps_set_simple (tmp, "interlace-mode", G_TYPE_STRING, "alternate", diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11ipcsink.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11ipcsink.cpp index 3934a37ca9..23f7e5ffb6 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11ipcsink.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11ipcsink.cpp @@ -448,7 +448,8 @@ gst_d3d11_ipc_sink_set_caps (GstBaseSink * sink, GstCaps * caps) } gst_caps_set_features_simple (new_caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr)); gst_clear_caps (&priv->caps); priv->caps = new_caps; diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11screencapturesrc.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11screencapturesrc.cpp index d4c0267170..5dd72781da 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11screencapturesrc.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11screencapturesrc.cpp @@ -685,8 +685,8 @@ gst_d3d11_screen_capture_src_fixate (GstBaseSrc * bsrc, GstCaps * caps) gst_caps_append_structure (d3d11_caps, gst_structure_copy (s)); gst_caps_set_features (d3d11_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, - nullptr)); + gst_caps_features_new_static_str + (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); break; } diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11upload.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11upload.cpp index f0a2195257..c629b57793 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11upload.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11upload.cpp @@ -145,7 +145,7 @@ _set_caps_features (const GstCaps * caps, const gchar * feature_name) GstStructure *s = gst_caps_get_structure (caps, i); orig_features = gst_caps_get_features (caps, i); - features = gst_caps_features_new (feature_name, NULL); + features = gst_caps_features_new_static_str (feature_name, NULL); if (gst_caps_features_is_any (orig_features)) { gst_caps_append_structure_full (tmp, gst_structure_copy (s), diff --git a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11vp9dec.cpp b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11vp9dec.cpp index 2e25eee2c9..8d3249335f 100644 --- a/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11vp9dec.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d11/gstd3d11vp9dec.cpp @@ -417,7 +417,8 @@ gst_d3d11_vp9_dec_register (GstPlugin * plugin, GstD3D11Device * device, d3d11_caps = gst_caps_copy (src_caps); gst_caps_set_features_simple (d3d11_caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr)); src_caps = gst_caps_merge (d3d11_caps, src_caps); /* To cover both landscape and portrait, select max value */ diff --git a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12convert.cpp b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12convert.cpp index c3ae065cd5..9b69c90eb4 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12convert.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12convert.cpp @@ -529,7 +529,8 @@ gst_d3d12_base_convert_caps_remove_format_and_rangify_size_info (GstCaps * caps) gint i, n; GstCaps *res; GstCapsFeatures *feature = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY); res = gst_caps_new_empty (); diff --git a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12decoder.cpp b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12decoder.cpp index 72ad8053a5..51b2fe8b20 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12decoder.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12decoder.cpp @@ -1909,12 +1909,14 @@ gst_d3d12_decoder_negotiate (GstD3D12Decoder * decoder, switch (priv->session->output_type) { case GST_D3D12_DECODER_OUTPUT_D3D12: gst_caps_set_features (state->caps, 0, - gst_caps_features_new_single (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY)); break; #ifdef HAVE_GST_D3D11 case GST_D3D12_DECODER_OUTPUT_D3D11: gst_caps_set_features (state->caps, 0, - gst_caps_features_new_single (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)); break; #endif default: @@ -2356,11 +2358,13 @@ gst_d3d12_decoder_check_feature_support (GstD3D12Device * device, auto raw_caps = gst_caps_from_string (src_caps_string.c_str ()); auto src_caps = gst_caps_copy (raw_caps); gst_caps_set_features_simple (src_caps, - gst_caps_features_new_single (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY)); #ifdef HAVE_GST_D3D11 auto d3d11_caps = gst_caps_copy (raw_caps); gst_caps_set_features_simple (d3d11_caps, - gst_caps_features_new_single (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)); gst_caps_append (src_caps, d3d11_caps); #endif gst_caps_append (src_caps, raw_caps); diff --git a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12download.cpp b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12download.cpp index 67628599aa..b653c18a12 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12download.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12download.cpp @@ -115,7 +115,7 @@ _set_caps_features (const GstCaps * caps, const gchar * feature_name) for (i = 0; i < n; i++) { gst_caps_set_features (tmp, i, - gst_caps_features_from_string (feature_name)); + gst_caps_features_new_single_static_str (feature_name)); } return tmp; diff --git a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12h264enc.cpp b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12h264enc.cpp index da6f486857..cd12060ddc 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12h264enc.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12h264enc.cpp @@ -2417,7 +2417,8 @@ gst_d3d12_h264_enc_register (GstPlugin * plugin, GstD3D12Device * device, auto sysmem_caps = gst_caps_from_string (sink_caps_str.c_str ()); auto sink_caps = gst_caps_copy (sysmem_caps); gst_caps_set_features_simple (sink_caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, + nullptr)); gst_caps_append (sink_caps, sysmem_caps); auto src_caps = gst_caps_from_string (src_caps_str.c_str ()); diff --git a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12ipcsink.cpp b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12ipcsink.cpp index 6e0d3c3cfa..3bbc95dc81 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12ipcsink.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12ipcsink.cpp @@ -410,7 +410,8 @@ gst_d3d12_ipc_sink_set_caps (GstBaseSink * sink, GstCaps * caps) } gst_caps_set_features_simple (new_caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, + nullptr)); gst_clear_caps (&priv->caps); priv->caps = new_caps; diff --git a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12memorycopy.cpp b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12memorycopy.cpp index 0bed4db5c3..f6775cde08 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12memorycopy.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12memorycopy.cpp @@ -751,7 +751,7 @@ _set_caps_features (const GstCaps * caps, const gchar * feature_name) for (i = 0; i < n; i++) { gst_caps_set_features (tmp, i, - gst_caps_features_from_string (feature_name)); + gst_caps_features_new_single_static_str (feature_name)); } return tmp; diff --git a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12screencapturesrc.cpp b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12screencapturesrc.cpp index 2c5f2a1e6f..ae4313ecf3 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12screencapturesrc.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12screencapturesrc.cpp @@ -674,8 +674,8 @@ gst_d3d12_screen_capture_src_fixate (GstBaseSrc * bsrc, GstCaps * caps) gst_caps_append_structure (d3d12_caps, gst_structure_copy (s)); gst_caps_set_features (d3d12_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, - nullptr)); + gst_caps_features_new_static_str + (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, nullptr)); break; } } diff --git a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12upload.cpp b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12upload.cpp index 9df487fba6..284859faeb 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12upload.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12upload.cpp @@ -114,7 +114,7 @@ _set_caps_features (const GstCaps * caps, const gchar * feature_name) for (i = 0; i < n; i++) { gst_caps_set_features (tmp, i, - gst_caps_features_from_string (feature_name)); + gst_caps_features_new_single_static_str (feature_name)); } return tmp; diff --git a/subprojects/gst-plugins-bad/sys/mediafoundation/gstmfvideoencoder.cpp b/subprojects/gst-plugins-bad/sys/mediafoundation/gstmfvideoencoder.cpp index 4bfe3bc374..890b62be6e 100644 --- a/subprojects/gst-plugins-bad/sys/mediafoundation/gstmfvideoencoder.cpp +++ b/subprojects/gst-plugins-bad/sys/mediafoundation/gstmfvideoencoder.cpp @@ -1742,7 +1742,8 @@ gst_mf_video_encoder_enum_internal (GstMFTransform * transform, GUID & subtype, gst_caps_set_value (d3d11_caps, "format", &d3d11_formats); g_value_unset (&d3d11_formats); gst_caps_set_features_simple (d3d11_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)); device_caps->d3d11_aware = TRUE; device_caps->adapter_luid = adapter_luid; } diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcaps.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcaps.c index a10f43eba5..e7c758a2ed 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcaps.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcaps.c @@ -2012,7 +2012,7 @@ gst_msdkcaps_set_strings (GstCaps * caps, if (features) { GstStructure *s = NULL; - GstCapsFeatures *f = gst_caps_features_from_string (features); + GstCapsFeatures *f = gst_caps_features_new_single_static_str (features); for (guint i = 0; i < size; i++) { if (gst_caps_features_is_equal (f, gst_caps_get_features (caps, i))) { diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkdec.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkdec.c index 11122914c8..f167f4e715 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkdec.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkdec.c @@ -516,7 +516,8 @@ pad_accept_memory (GstMsdkDec * thiz, const gchar * mem_type, GstCaps ** filter) pad = GST_VIDEO_DECODER_SRC_PAD (thiz); caps = gst_caps_copy (*filter); - gst_caps_set_features (caps, 0, gst_caps_features_from_string (mem_type)); + gst_caps_set_features (caps, 0, + gst_caps_features_new_single_static_str (mem_type)); #ifndef _WIN32 /* In dma caps case, we need to set drm-format for raw caps */ @@ -1766,7 +1767,8 @@ gst_msdk_create_va_pool (GstMsdkDec * thiz, GstVideoInfo * info, if (thiz->use_dmabuf && thiz->modifier != DRM_FORMAT_MOD_INVALID) { caps = gst_msdkcaps_video_info_to_drm_caps (info, thiz->modifier); gst_caps_set_features (caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_DMABUF, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_DMABUF, + NULL)); } else { caps = gst_video_info_to_caps (info); } @@ -1835,7 +1837,8 @@ gst_msdkdec_create_buffer_pool (GstMsdkDec * thiz, GstVideoInfo * info, if (thiz->use_dmabuf) { caps = gst_msdkcaps_video_info_to_drm_caps (&vinfo, thiz->modifier); gst_caps_set_features (caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_DMABUF, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_DMABUF, + NULL)); } else { caps = gst_video_info_to_caps (&vinfo); } diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c index 76b393d265..38dec1fa8b 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c @@ -1206,7 +1206,8 @@ gst_msdk_create_va_pool (GstMsdkEnc * thiz, GstVideoInfo * info, if (thiz->use_dmabuf && thiz->modifier != DRM_FORMAT_MOD_INVALID) { aligned_caps = gst_msdkcaps_video_info_to_drm_caps (info, thiz->modifier); gst_caps_set_features (aligned_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_DMABUF, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_DMABUF, + NULL)); } else aligned_caps = gst_video_info_to_caps (info); @@ -1426,7 +1427,8 @@ gst_msdkenc_set_format (GstVideoEncoder * encoder, GstVideoCodecState * state) if (!thiz->use_va && sinkpad_can_dmabuf (thiz)) { thiz->input_state->caps = gst_caps_make_writable (thiz->input_state->caps); gst_caps_set_features (thiz->input_state->caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_DMABUF, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_DMABUF, + NULL)); thiz->use_dmabuf = TRUE; thiz->modifier = get_msdkcaps_get_modifier (state->caps); } diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvpp.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvpp.c index ce30ca5a9b..89a99527c0 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvpp.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvpp.c @@ -439,7 +439,8 @@ gst_msdk_create_va_pool (GstMsdkVPP * thiz, GstVideoInfo * info, usage_hint |= VA_SURFACE_ATTRIB_USAGE_HINT_VPP_READ | VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE; gst_caps_set_features (aligned_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_DMABUF, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_DMABUF, + NULL)); } else aligned_caps = gst_video_info_to_caps (info); @@ -879,7 +880,7 @@ gst_msdkvpp_transform (GstBaseTransform * trans, GstBuffer * inbuf, * msdkenc and msdkvpp re-use surface from decoder and they both need to set * timestamp for input mfx surface; but encoder use input frame->pts while vpp * use input buffer->pts, and frame->pts has 1000h offset larger than inbuf->pts; - * It is very likely to cause conflict or mfx surface timestamp. So we add this + * It is very likely to cause conflict or mfx surface timestamp. So we add this * PTS_OFFSET here to ensure enc and vpp set the same value to input mfx surface * meanwhile does not break encoder's setting min_pts for dts protection. */ diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvpputil.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvpputil.c index bbd14790fe..b385642bdf 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvpputil.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvpputil.c @@ -196,15 +196,17 @@ fixate_output_format (GstMsdkVPP * thiz, GstVideoInfo * vinfo, GstCaps * caps) #ifndef _WIN32 if (is_va) gst_caps_set_features (ret, 0, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_VA)); + gst_caps_features_new_single_static_str (GST_CAPS_FEATURE_MEMORY_VA)); #else if (is_d3d) gst_caps_set_features (ret, 0, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)); #endif else if (is_dma) gst_caps_set_features (ret, 0, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_DMABUF)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_DMABUF)); return ret; } diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconvertscale.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconvertscale.c index a374a50f69..6767cb8e0c 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconvertscale.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconvertscale.c @@ -177,7 +177,8 @@ gst_cuda_base_convert_caps_remove_format_info (GstCaps * caps) gint i, n; GstCaps *res; GstCapsFeatures *feature = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY); res = gst_caps_new_empty (); @@ -214,7 +215,8 @@ gst_cuda_base_convert_caps_rangify_size_info (GstCaps * caps) gint i, n; GstCaps *res; GstCapsFeatures *feature = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY); res = gst_caps_new_empty (); @@ -257,7 +259,8 @@ gst_cuda_base_convert_caps_remove_format_and_rangify_size_info (GstCaps * caps) gint i, n; GstCaps *res; GstCapsFeatures *feature = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY); res = gst_caps_new_empty (); diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaipcsink.cpp b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaipcsink.cpp index f4ea185331..58437f9b80 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaipcsink.cpp +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaipcsink.cpp @@ -437,7 +437,8 @@ gst_cuda_ipc_sink_set_caps (GstBaseSink * sink, GstCaps * caps) } gst_caps_set_features_simple (new_caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, + nullptr)); gst_clear_caps (&priv->caps); priv->caps = new_caps; diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudamemorycopy.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudamemorycopy.c index 0be36a438d..ad38fcbb2f 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudamemorycopy.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudamemorycopy.c @@ -246,7 +246,7 @@ _set_caps_features (const GstCaps * caps, const gchar * feature_name) for (i = 0; i < n; i++) gst_caps_set_features (tmp, i, - gst_caps_features_from_string (feature_name)); + gst_caps_features_new_single_static_str (feature_name)); return tmp; } diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvav1encoder.cpp b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvav1encoder.cpp index b067f80908..9418c20243 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvav1encoder.cpp +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvav1encoder.cpp @@ -1457,13 +1457,15 @@ gst_nv_av1_encoder_create_class_data (GstObject * device, gpointer session, #ifdef G_OS_WIN32 if (device_mode == GST_NV_ENCODER_DEVICE_D3D11) { gst_caps_set_features (sink_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr)); } #endif if (device_mode == GST_NV_ENCODER_DEVICE_CUDA) { gst_caps_set_features (sink_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, + nullptr)); #ifdef HAVE_GST_D3D12 if (gst_nvcodec_is_windows_10_or_greater ()) { gboolean have_interop = FALSE; @@ -1472,8 +1474,8 @@ gst_nv_av1_encoder_create_class_data (GstObject * device, gpointer session, if (have_interop) { auto d3d12_caps = gst_caps_copy (system_caps); gst_caps_set_features_simple (d3d12_caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, - nullptr)); + gst_caps_features_new_static_str + (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, nullptr)); gst_caps_append (sink_caps, d3d12_caps); } } @@ -1481,7 +1483,8 @@ gst_nv_av1_encoder_create_class_data (GstObject * device, gpointer session, #ifdef HAVE_CUDA_GST_GL GstCaps *gl_caps = gst_caps_copy (system_caps); gst_caps_set_features (gl_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + nullptr)); gst_caps_append (sink_caps, gl_caps); #endif } @@ -1775,14 +1778,16 @@ gst_nv_av1_encoder_register_auto_select (GstPlugin * plugin, if (cuda_device_id_size > 0) { GstCaps *cuda_caps = gst_caps_copy (system_caps); gst_caps_set_features (cuda_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, + nullptr)); gst_caps_append (sink_caps, cuda_caps); } #ifdef G_OS_WIN32 if (adapter_luid_size > 0) { GstCaps *d3d11_caps = gst_caps_copy (system_caps); gst_caps_set_features (d3d11_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr)); gst_caps_append (sink_caps, d3d11_caps); } #endif @@ -1790,7 +1795,8 @@ gst_nv_av1_encoder_register_auto_select (GstPlugin * plugin, #ifdef HAVE_CUDA_GST_GL GstCaps *gl_caps = gst_caps_copy (system_caps); gst_caps_set_features (gl_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + nullptr)); gst_caps_append (sink_caps, gl_caps); #endif diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c index a69021a150..32205723ad 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c @@ -669,15 +669,17 @@ gst_nvdec_negotiate (GstVideoDecoder * decoder) case GST_NVDEC_MEM_TYPE_CUDA: GST_DEBUG_OBJECT (nvdec, "use cuda memory"); gst_caps_set_features (state->caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, + NULL)); break; #ifdef HAVE_CUDA_GST_GL case GST_NVDEC_MEM_TYPE_GL: GST_DEBUG_OBJECT (nvdec, "use gl memory"); gst_caps_set_features (state->caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, NULL)); - gst_caps_set_simple (state->caps, "texture-target", G_TYPE_STRING, - "2D", NULL); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + NULL)); + gst_caps_set_simple (state->caps, "texture-target", G_TYPE_STRING, "2D", + NULL); break; #endif default: diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdecoder.cpp b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdecoder.cpp index 3f7b45e00f..2139b8fddf 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdecoder.cpp +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdecoder.cpp @@ -1249,7 +1249,8 @@ gst_nv_decoder_check_device_caps (CUcontext cuda_ctx, cudaVideoCodec codec, { GstCaps *cuda_caps = gst_caps_copy (src_templ); gst_caps_set_features_simple (cuda_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY)); #ifdef G_OS_WIN32 if (is_stateless) { @@ -1266,7 +1267,8 @@ gst_nv_decoder_check_device_caps (CUcontext cuda_ctx, cudaVideoCodec codec, { GstCaps *gl_caps = gst_caps_copy (src_templ); gst_caps_set_features_simple (gl_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); gst_caps_append (src_templ, gl_caps); } #endif @@ -1414,7 +1416,8 @@ gst_nv_decoder_check_device_caps (CUcontext cuda_ctx, cudaVideoCodec codec, src_templ = gst_caps_copy (raw_caps); gst_caps_set_features_simple (src_templ, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY)); #ifdef G_OS_WIN32 if (is_stateless) { @@ -1438,7 +1441,8 @@ gst_nv_decoder_check_device_caps (CUcontext cuda_ctx, cudaVideoCodec codec, src_caps_string = "video/x-raw, format = (string) " + format_str; GstCaps *d3d11_caps = gst_caps_from_string (src_caps_string.c_str ()); gst_caps_set_features_simple (d3d11_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)); gst_caps_append (src_templ, d3d11_caps); } #endif @@ -1463,7 +1467,8 @@ gst_nv_decoder_check_device_caps (CUcontext cuda_ctx, cudaVideoCodec codec, src_caps_string = "video/x-raw, format = (string) " + format_str; GstCaps *gl_caps = gst_caps_from_string (src_caps_string.c_str ()); gst_caps_set_features_simple (gl_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); gst_caps_append (src_templ, gl_caps); #endif gst_caps_append (src_templ, raw_caps); @@ -1853,21 +1858,24 @@ gst_nv_decoder_negotiate (GstNvDecoder * decoder, case GST_NV_DECODER_OUTPUT_TYPE_CUDA: GST_DEBUG_OBJECT (videodec, "using CUDA memory"); gst_caps_set_features (state->caps, 0, - gst_caps_features_new_single (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY)); break; #ifdef G_OS_WIN32 case GST_NV_DECODER_OUTPUT_TYPE_D3D11: gst_caps_set_features (state->caps, 0, - gst_caps_features_new_single (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY)); break; #endif #ifdef HAVE_CUDA_GST_GL case GST_NV_DECODER_OUTPUT_TYPE_GL: GST_DEBUG_OBJECT (videodec, "using GL memory"); gst_caps_set_features (state->caps, 0, - gst_caps_features_new_single (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); - gst_caps_set_simple (state->caps, "texture-target", G_TYPE_STRING, - "2D", nullptr); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); + gst_caps_set_simple (state->caps, "texture-target", G_TYPE_STRING, "2D", + nullptr); break; #endif default: diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvh264encoder.cpp b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvh264encoder.cpp index c5b3a76a88..b0aac116fc 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvh264encoder.cpp +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvh264encoder.cpp @@ -2196,13 +2196,15 @@ gst_nv_h264_encoder_create_class_data (GstObject * device, gpointer session, #ifdef G_OS_WIN32 if (device_mode == GST_NV_ENCODER_DEVICE_D3D11) { gst_caps_set_features (sink_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr)); } #endif if (device_mode == GST_NV_ENCODER_DEVICE_CUDA) { gst_caps_set_features (sink_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, + nullptr)); #ifdef HAVE_GST_D3D12 if (gst_nvcodec_is_windows_10_or_greater ()) { gboolean have_interop = FALSE; @@ -2211,8 +2213,8 @@ gst_nv_h264_encoder_create_class_data (GstObject * device, gpointer session, if (have_interop) { auto d3d12_caps = gst_caps_copy (system_caps); gst_caps_set_features_simple (d3d12_caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, - nullptr)); + gst_caps_features_new_static_str + (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, nullptr)); gst_caps_append (sink_caps, d3d12_caps); } } @@ -2220,7 +2222,8 @@ gst_nv_h264_encoder_create_class_data (GstObject * device, gpointer session, #ifdef HAVE_CUDA_GST_GL GstCaps *gl_caps = gst_caps_copy (system_caps); gst_caps_set_features (gl_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + nullptr)); gst_caps_append (sink_caps, gl_caps); #endif } @@ -2544,14 +2547,16 @@ gst_nv_h264_encoder_register_auto_select (GstPlugin * plugin, if (cuda_device_id_size > 0) { GstCaps *cuda_caps = gst_caps_copy (system_caps); gst_caps_set_features (cuda_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, + nullptr)); gst_caps_append (sink_caps, cuda_caps); } #ifdef G_OS_WIN32 if (adapter_luid_size > 0) { GstCaps *d3d11_caps = gst_caps_copy (system_caps); gst_caps_set_features (d3d11_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr)); gst_caps_append (sink_caps, d3d11_caps); } #endif @@ -2559,7 +2564,8 @@ gst_nv_h264_encoder_register_auto_select (GstPlugin * plugin, #ifdef HAVE_CUDA_GST_GL GstCaps *gl_caps = gst_caps_copy (system_caps); gst_caps_set_features (gl_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + nullptr)); gst_caps_append (sink_caps, gl_caps); #endif diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvh265encoder.cpp b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvh265encoder.cpp index 81525bef6d..ababef0942 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvh265encoder.cpp +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvh265encoder.cpp @@ -2254,13 +2254,15 @@ gst_nv_h265_encoder_create_class_data (GstObject * device, gpointer session, #ifdef G_OS_WIN32 if (device_mode == GST_NV_ENCODER_DEVICE_D3D11) { gst_caps_set_features (sink_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr)); } #endif if (device_mode == GST_NV_ENCODER_DEVICE_CUDA) { gst_caps_set_features (sink_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, + nullptr)); #ifdef HAVE_GST_D3D12 if (gst_nvcodec_is_windows_10_or_greater ()) { gboolean have_interop = FALSE; @@ -2269,8 +2271,8 @@ gst_nv_h265_encoder_create_class_data (GstObject * device, gpointer session, if (have_interop) { auto d3d12_caps = gst_caps_copy (system_caps); gst_caps_set_features_simple (d3d12_caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, - nullptr)); + gst_caps_features_new_static_str + (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, nullptr)); gst_caps_append (sink_caps, d3d12_caps); } } @@ -2278,7 +2280,8 @@ gst_nv_h265_encoder_create_class_data (GstObject * device, gpointer session, #ifdef HAVE_CUDA_GST_GL GstCaps *gl_caps = gst_caps_copy (system_caps); gst_caps_set_features (gl_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + nullptr)); gst_caps_append (sink_caps, gl_caps); #endif } @@ -2599,14 +2602,16 @@ gst_nv_h265_encoder_register_auto_select (GstPlugin * plugin, if (cuda_device_id_size > 0) { GstCaps *cuda_caps = gst_caps_copy (system_caps); gst_caps_set_features (cuda_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, + nullptr)); gst_caps_append (sink_caps, cuda_caps); } #ifdef G_OS_WIN32 if (adapter_luid_size > 0) { GstCaps *d3d11_caps = gst_caps_copy (system_caps); gst_caps_set_features (d3d11_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr)); gst_caps_append (sink_caps, d3d11_caps); } #endif @@ -2614,7 +2619,8 @@ gst_nv_h265_encoder_register_auto_select (GstPlugin * plugin, #ifdef HAVE_CUDA_GST_GL GstCaps *gl_caps = gst_caps_copy (system_caps); gst_caps_set_features (gl_caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + nullptr)); gst_caps_append (sink_caps, gl_caps); #endif diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvav1enc.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvav1enc.cpp index 401ebb6620..5f511c53fb 100644 --- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvav1enc.cpp +++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvav1enc.cpp @@ -751,12 +751,14 @@ gst_qsv_av1_enc_register (GstPlugin * plugin, guint rank, guint impl_index, #ifdef G_OS_WIN32 GstCaps *d3d11_caps = gst_caps_copy (sink_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr); gst_caps_set_features_simple (d3d11_caps, caps_features); #ifdef HAVE_GST_D3D12 auto d3d12_caps = gst_caps_copy (sink_caps); auto d3d12_feature = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, + nullptr); gst_caps_set_features_simple (d3d12_caps, d3d12_feature); gst_caps_append (d3d11_caps, d3d12_caps); #endif @@ -765,7 +767,7 @@ gst_qsv_av1_enc_register (GstPlugin * plugin, guint rank, guint impl_index, #else GstCaps *va_caps = gst_caps_copy (sink_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VA, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VA, nullptr); gst_caps_set_features_simple (va_caps, caps_features); gst_caps_append (va_caps, sink_caps); sink_caps = va_caps; diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvdecoder.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvdecoder.cpp index fc75ff49f3..eb1592e862 100644 --- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvdecoder.cpp +++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvdecoder.cpp @@ -1197,7 +1197,8 @@ gst_qsv_decoder_negotiate_internal (GstVideoDecoder * decoder, if (priv->use_video_memory) { GST_DEBUG_OBJECT (self, "Downstream supports D3D11 memory"); gst_caps_set_features (priv->output_state->caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr)); } #endif diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvh264dec.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvh264dec.cpp index 6d90708913..b0fd3e9059 100644 --- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvh264dec.cpp +++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvh264dec.cpp @@ -498,7 +498,8 @@ gst_qsv_h264_dec_register (GstPlugin * plugin, guint rank, guint impl_index, #ifdef G_OS_WIN32 GstCaps *d3d11_caps = gst_caps_copy (src_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr); gst_caps_set_features_simple (d3d11_caps, caps_features); gst_caps_append (d3d11_caps, src_caps); src_caps = d3d11_caps; diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvh264enc.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvh264enc.cpp index 917541f9f1..be80b6626a 100644 --- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvh264enc.cpp +++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvh264enc.cpp @@ -2241,12 +2241,14 @@ gst_qsv_h264_enc_register (GstPlugin * plugin, guint rank, guint impl_index, #ifdef G_OS_WIN32 GstCaps *d3d11_caps = gst_caps_copy (sink_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr); gst_caps_set_features_simple (d3d11_caps, caps_features); #ifdef HAVE_GST_D3D12 auto d3d12_caps = gst_caps_copy (sink_caps); auto d3d12_feature = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, + nullptr); gst_caps_set_features_simple (d3d12_caps, d3d12_feature); gst_caps_append (d3d11_caps, d3d12_caps); #endif @@ -2255,7 +2257,7 @@ gst_qsv_h264_enc_register (GstPlugin * plugin, guint rank, guint impl_index, #else GstCaps *va_caps = gst_caps_copy (sink_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VA, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VA, nullptr); gst_caps_set_features_simple (va_caps, caps_features); gst_caps_append (va_caps, sink_caps); sink_caps = va_caps; diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvh265dec.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvh265dec.cpp index 02f1d98655..d4f24059dd 100644 --- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvh265dec.cpp +++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvh265dec.cpp @@ -613,7 +613,8 @@ gst_qsv_h265_dec_register (GstPlugin * plugin, guint rank, guint impl_index, #ifdef G_OS_WIN32 GstCaps *d3d11_caps = gst_caps_copy (src_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr); gst_caps_set_features_simple (d3d11_caps, caps_features); gst_caps_append (d3d11_caps, src_caps); src_caps = d3d11_caps; diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.cpp index 50542ca9a3..53302499af 100644 --- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.cpp +++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.cpp @@ -1580,12 +1580,14 @@ gst_qsv_h265_enc_register (GstPlugin * plugin, guint rank, guint impl_index, #ifdef G_OS_WIN32 GstCaps *d3d11_caps = gst_caps_copy (sink_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr); gst_caps_set_features_simple (d3d11_caps, caps_features); #ifdef HAVE_GST_D3D12 auto d3d12_caps = gst_caps_copy (sink_caps); auto d3d12_feature = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, + nullptr); gst_caps_set_features_simple (d3d12_caps, d3d12_feature); gst_caps_append (d3d11_caps, d3d12_caps); #endif @@ -1594,7 +1596,7 @@ gst_qsv_h265_enc_register (GstPlugin * plugin, guint rank, guint impl_index, #else GstCaps *va_caps = gst_caps_copy (sink_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VA, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VA, nullptr); gst_caps_set_features_simple (va_caps, caps_features); gst_caps_append (va_caps, sink_caps); sink_caps = va_caps; diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegdec.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegdec.cpp index 1405299e7e..d7add64322 100644 --- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegdec.cpp +++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegdec.cpp @@ -228,7 +228,8 @@ gst_qsv_jpeg_dec_register (GstPlugin * plugin, guint rank, guint impl_index, #ifdef G_OS_WIN32 GstCaps *d3d11_caps = gst_caps_copy (src_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr); gst_caps_set_features_simple (d3d11_caps, caps_features); gst_caps_append (d3d11_caps, src_caps); src_caps = d3d11_caps; diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegenc.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegenc.cpp index d970e3a000..ce9aa42eee 100644 --- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegenc.cpp +++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegenc.cpp @@ -483,12 +483,14 @@ gst_qsv_jpeg_enc_register (GstPlugin * plugin, guint rank, guint impl_index, #ifdef G_OS_WIN32 GstCaps *d3d11_caps = gst_caps_copy (sink_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr); gst_caps_set_features_simple (d3d11_caps, caps_features); #ifdef HAVE_GST_D3D12 auto d3d12_caps = gst_caps_copy (sink_caps); auto d3d12_feature = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, + nullptr); gst_caps_set_features_simple (d3d12_caps, d3d12_feature); gst_caps_append (d3d11_caps, d3d12_caps); #endif @@ -497,7 +499,7 @@ gst_qsv_jpeg_enc_register (GstPlugin * plugin, guint rank, guint impl_index, #else GstCaps *va_caps = gst_caps_copy (sink_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VA, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VA, nullptr); gst_caps_set_features_simple (va_caps, caps_features); gst_caps_append (va_caps, sink_caps); sink_caps = va_caps; diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9dec.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9dec.cpp index c4cf67c855..e207891ab8 100644 --- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9dec.cpp +++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9dec.cpp @@ -231,7 +231,8 @@ gst_qsv_vp9_dec_register (GstPlugin * plugin, guint rank, guint impl_index, #ifdef G_OS_WIN32 GstCaps *d3d11_caps = gst_caps_copy (src_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr); gst_caps_set_features_simple (d3d11_caps, caps_features); gst_caps_append (d3d11_caps, src_caps); src_caps = d3d11_caps; diff --git a/subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9enc.cpp b/subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9enc.cpp index 11d2474c2e..a101ac0ce7 100644 --- a/subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9enc.cpp +++ b/subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9enc.cpp @@ -970,12 +970,14 @@ gst_qsv_vp9_enc_register (GstPlugin * plugin, guint rank, guint impl_index, #ifdef G_OS_WIN32 GstCaps *d3d11_caps = gst_caps_copy (sink_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, + nullptr); gst_caps_set_features_simple (d3d11_caps, caps_features); #ifdef HAVE_GST_D3D12 auto d3d12_caps = gst_caps_copy (sink_caps); auto d3d12_feature = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D12_MEMORY, + nullptr); gst_caps_set_features_simple (d3d12_caps, d3d12_feature); gst_caps_append (d3d11_caps, d3d12_caps); #endif @@ -984,7 +986,7 @@ gst_qsv_vp9_enc_register (GstPlugin * plugin, guint rank, guint impl_index, #else GstCaps *va_caps = gst_caps_copy (sink_caps); GstCapsFeatures *caps_features = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VA, nullptr); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VA, nullptr); gst_caps_set_features_simple (va_caps, caps_features); gst_caps_append (va_caps, sink_caps); sink_caps = va_caps; diff --git a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2decoder.c b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2decoder.c index 7c2ed4b9e0..9b459e8d62 100644 --- a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2decoder.c +++ b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2decoder.c @@ -444,11 +444,13 @@ gst_v4l2_decoder_probe_caps_for_format (GstV4l2Decoder * self, "DMA_DRM", "drm-format", G_TYPE_STRING, gst_video_dma_drm_fourcc_to_string (drm_fourcc, 0), NULL); gst_caps_set_features_simple (drm_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_DMABUF)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_DMABUF)); if (!gst_caps_is_empty (size_caps)) { gst_caps_set_features_simple (size_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_DMABUF)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_DMABUF)); tmp = drm_caps; drm_caps = gst_caps_intersect_full (tmp, size_caps, GST_CAPS_INTERSECT_FIRST); diff --git a/subprojects/gst-plugins-bad/sys/va/gstvaav1dec.c b/subprojects/gst-plugins-bad/sys/va/gstvaav1dec.c index 0952d8376b..e7e64ab44b 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvaav1dec.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvaav1dec.c @@ -285,7 +285,7 @@ _create_internal_pool (GstVaAV1Dec * self, gint width, gint height) } gst_caps_set_features_simple (caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_VA)); + gst_caps_features_new_single_static_str (GST_CAPS_FEATURE_MEMORY_VA)); surface_formats = gst_va_decoder_get_surface_formats (base->decoder); allocator = gst_va_allocator_new (base->display, surface_formats); diff --git a/subprojects/gst-plugins-bad/sys/va/gstvabase.c b/subprojects/gst-plugins-bad/sys/va/gstvabase.c index dbc1a19cdb..fde4953082 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvabase.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvabase.c @@ -210,7 +210,7 @@ gst_va_base_convert_caps_to_va (GstCaps * caps) } gst_caps_set_features_simple (caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_VA)); + gst_caps_features_new_single_static_str (GST_CAPS_FEATURE_MEMORY_VA)); return TRUE; } diff --git a/subprojects/gst-plugins-bad/sys/va/gstvabasedec.c b/subprojects/gst-plugins-bad/sys/va/gstvabasedec.c index bffb75337a..ca9dba22af 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvabasedec.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvabasedec.c @@ -372,7 +372,7 @@ _decide_allocation_for_video_crop (GstVideoDecoder * decoder, va_caps = gst_caps_copy (caps); gst_caps_set_features_simple (va_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_VA)); + gst_caps_features_new_single_static_str (GST_CAPS_FEATURE_MEMORY_VA)); if (!(allocator = _create_allocator (base, va_caps))) goto cleanup; diff --git a/subprojects/gst-plugins-bad/sys/va/gstvacaps.c b/subprojects/gst-plugins-bad/sys/va/gstvacaps.c index 4768a79b98..45b2cd89eb 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvacaps.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvacaps.c @@ -249,7 +249,7 @@ gst_va_create_dma_caps (GstVaDisplay * display, VAEntrypoint entrypoint, max_height, NULL); gst_caps_set_features_simple (caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_DMABUF)); + gst_caps_features_new_single_static_str (GST_CAPS_FEATURE_MEMORY_DMABUF)); gst_caps_set_simple (caps, "format", G_TYPE_STRING, "DMA_DRM", NULL); @@ -367,7 +367,8 @@ gst_va_create_raw_caps_from_config (GstVaDisplay * display, VAConfigID config) if (mem_type & VA_SURFACE_ATTRIB_MEM_TYPE_VA) { feature_caps = gst_caps_copy (base_caps); - features = gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_VA); + features = + gst_caps_features_new_single_static_str (GST_CAPS_FEATURE_MEMORY_VA); gst_caps_set_features_simple (feature_caps, features); caps = gst_caps_merge (caps, feature_caps); } diff --git a/subprojects/gst-plugins-bad/sys/va/gstvacompositor.c b/subprojects/gst-plugins-bad/sys/va/gstvacompositor.c index 114d78d97b..1e17c782bd 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvacompositor.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvacompositor.c @@ -1223,7 +1223,7 @@ _caps_from_format_and_feature (GstVideoFormat format, if (g_strcmp0 (feature, GST_CAPS_FEATURE_MEMORY_DMABUF) == 0 || g_strcmp0 (feature, GST_CAPS_FEATURE_MEMORY_VA) == 0) gst_caps_set_features_simple (caps, - gst_caps_features_from_string (feature)); + gst_caps_features_new_single_static_str (feature)); return caps; } @@ -1455,7 +1455,7 @@ gst_va_compositor_update_caps (GstVideoAggregator * vagg, GstCaps * src_caps) } else { clip_caps = gst_caps_new_empty_simple ("video/x-raw"); gst_caps_set_features_simple (clip_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_VA)); + gst_caps_features_new_single_static_str (GST_CAPS_FEATURE_MEMORY_VA)); } } else if (dma_formats) { g_assert (dma_formats->len == modifiers->len); @@ -1474,7 +1474,8 @@ gst_va_compositor_update_caps (GstVideoAggregator * vagg, GstCaps * src_caps) } else { clip_caps = gst_caps_new_empty_simple ("video/x-raw"); gst_caps_set_features_simple (clip_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_DMABUF)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_DMABUF)); } } else if (sys_formats) { if (best_sys != GST_VIDEO_FORMAT_UNKNOWN) { diff --git a/subprojects/gst-plugins-bad/sys/va/gstvaencoder.c b/subprojects/gst-plugins-bad/sys/va/gstvaencoder.c index 09975f758e..d114217656 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvaencoder.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvaencoder.c @@ -364,7 +364,7 @@ _create_reconstruct_pool (GstVaDisplay * display, GArray * surface_formats, caps = gst_video_info_to_caps (&info); gst_caps_set_features_simple (caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_VA)); + gst_caps_features_new_single_static_str (GST_CAPS_FEATURE_MEMORY_VA)); allocator = gst_va_allocator_new (display, surface_formats); diff --git a/subprojects/gst-plugins-bad/sys/va/gstvafilter.c b/subprojects/gst-plugins-bad/sys/va/gstvafilter.c index 28b5524163..efe721784f 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvafilter.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvafilter.c @@ -1101,7 +1101,8 @@ gst_va_filter_get_caps (GstVaFilter * self) if (mem_types & VA_SURFACE_ATTRIB_MEM_TYPE_VA) { feature_caps = gst_caps_copy (base_caps); - features = gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_VA); + features = + gst_caps_features_new_single_static_str (GST_CAPS_FEATURE_MEMORY_VA); gst_caps_set_features_simple (feature_caps, features); caps = gst_caps_merge (caps, feature_caps); } diff --git a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c index a1e96824a3..fb9cdf7077 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c @@ -1015,7 +1015,7 @@ gst_va_vpp_complete_caps_features (const GstCaps * caps, continue; } - features = gst_caps_features_new (feature_name, NULL); + features = gst_caps_features_new_static_str (feature_name, NULL); if (!gst_caps_is_subset_structure_full (tmp, s, features)) gst_caps_append_structure_full (tmp, gst_structure_copy (s), features); else diff --git a/subprojects/gst-plugins-bad/tests/check/libs/vkimagebufferpool.c b/subprojects/gst-plugins-bad/tests/check/libs/vkimagebufferpool.c index 008b1c5a36..6034636b3d 100644 --- a/subprojects/gst-plugins-bad/tests/check/libs/vkimagebufferpool.c +++ b/subprojects/gst-plugins-bad/tests/check/libs/vkimagebufferpool.c @@ -68,7 +68,8 @@ create_buffer_pool (const char *format, VkImageUsageFlags usage, caps = gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING, format, "width", G_TYPE_INT, 1024, "height", G_TYPE_INT, 780, NULL); gst_caps_set_features_simple (caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE, + NULL)); pool = gst_vulkan_image_buffer_pool_new (device); diff --git a/subprojects/gst-plugins-bad/tests/check/libs/vkvideodecode.c b/subprojects/gst-plugins-bad/tests/check/libs/vkvideodecode.c index 97b16070ee..6bf05da2ab 100644 --- a/subprojects/gst-plugins-bad/tests/check/libs/vkvideodecode.c +++ b/subprojects/gst-plugins-bad/tests/check/libs/vkvideodecode.c @@ -112,7 +112,8 @@ get_output_buffer (GstVulkanDecoder * dec, VkFormat vk_format, GstStructure *config; gst_caps_set_features_simple (caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE, + NULL)); profile_caps = gst_vulkan_decoder_profile_caps (dec); fail_unless (profile_caps); diff --git a/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh264.c b/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh264.c index 8d6bc7bb87..e580e81621 100644 --- a/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh264.c +++ b/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh264.c @@ -111,7 +111,8 @@ allocate_image_buffer_pool (GstVulkanEncoder * enc, uint32_t width, gsize frame_size = width * height * 2; //NV12 gst_caps_set_features_simple (caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE, + NULL)); fail_unless (gst_vulkan_encoder_create_dpb_pool (enc, caps)); gst_video_info_from_caps (&out_info, caps); @@ -147,7 +148,8 @@ allocate_buffer_pool (GstVulkanEncoder * enc, uint32_t width, uint32_t height) GstStructure *config = gst_buffer_pool_get_config (pool); gst_caps_set_features_simple (caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VULKAN_BUFFER, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VULKAN_BUFFER, + NULL)); gst_video_info_from_caps (&in_info, caps); diff --git a/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh265.c b/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh265.c index 7d442505c1..3d1a8002c3 100644 --- a/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh265.c +++ b/subprojects/gst-plugins-bad/tests/check/libs/vkvideoencodeh265.c @@ -114,7 +114,8 @@ allocate_image_buffer_pool (GstVulkanEncoder * enc, uint32_t width, gsize frame_size = width * height * 2; //NV12 gst_caps_set_features_simple (caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE, + NULL)); fail_unless (gst_vulkan_encoder_create_dpb_pool (enc, caps)); gst_video_info_from_caps (&out_info, caps); @@ -151,7 +152,8 @@ allocate_buffer_pool (GstVulkanEncoder * enc, uint32_t width, uint32_t height) GstStructure *config = gst_buffer_pool_get_config (pool); gst_caps_set_features_simple (caps, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_VULKAN_BUFFER, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VULKAN_BUFFER, + NULL)); gst_video_info_from_caps (&in_info, caps); diff --git a/subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11converter.cpp b/subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11converter.cpp index ea50d8a3cc..233f703aa9 100644 --- a/subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11converter.cpp +++ b/subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11converter.cpp @@ -348,7 +348,7 @@ create_pipelne (AppData * app_data) /* Set d3d11 caps feature so that d3d11testsrc can output GPU memory * instead of system memory */ gst_caps_set_features (caps, 0, - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, nullptr)); g_object_set (sink, "caps", caps, nullptr); gst_caps_unref (caps); diff --git a/subprojects/gst-plugins-bad/tests/examples/nvcodec/nvcodec.c b/subprojects/gst-plugins-bad/tests/examples/nvcodec/nvcodec.c index ffe19601d6..a1ab144132 100644 --- a/subprojects/gst-plugins-bad/tests/examples/nvcodec/nvcodec.c +++ b/subprojects/gst-plugins-bad/tests/examples/nvcodec/nvcodec.c @@ -439,7 +439,7 @@ main (gint argc, gchar ** argv) if (use_gl) { gst_caps_set_features_simple (caps, - gst_caps_features_from_string ("memory:GLMemory")); + gst_caps_features_new_single_static_str ("memory:GLMemory")); } g_object_set (G_OBJECT (capsfilter), "caps", caps, NULL); diff --git a/subprojects/gst-plugins-base/ext/gl/gstgldownloadelement.c b/subprojects/gst-plugins-base/ext/gl/gstgldownloadelement.c index da1f1dc26b..1174f2ff64 100644 --- a/subprojects/gst-plugins-base/ext/gl/gstgldownloadelement.c +++ b/subprojects/gst-plugins-base/ext/gl/gstgldownloadelement.c @@ -948,7 +948,7 @@ _set_caps_features (const GstCaps * caps, const gchar * feature_name) for (i = 0; i < n; i++) gst_caps_set_features (tmp, i, - gst_caps_features_from_string (feature_name)); + gst_caps_features_new_single_static_str (feature_name)); return tmp; } diff --git a/subprojects/gst-plugins-base/ext/gl/gstglimagesink.c b/subprojects/gst-plugins-base/ext/gl/gstglimagesink.c index 5b9b4cd0e8..76369a6574 100644 --- a/subprojects/gst-plugins-base/ext/gl/gstglimagesink.c +++ b/subprojects/gst-plugins-base/ext/gl/gstglimagesink.c @@ -1612,9 +1612,10 @@ update_output_format (GstGLImageSink * glimage_sink) out_caps = gst_video_info_to_caps (out_info); gst_caps_set_features (out_caps, 0, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); - gst_caps_set_simple (out_caps, "texture-target", G_TYPE_STRING, - target_str, NULL); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); + gst_caps_set_simple (out_caps, "texture-target", G_TYPE_STRING, target_str, + NULL); if (glimage_sink->convert_views) { gst_caps_set_simple (out_caps, "texture-target", G_TYPE_STRING, diff --git a/subprojects/gst-plugins-base/ext/gl/gstglstereomix.c b/subprojects/gst-plugins-base/ext/gl/gstglstereomix.c index 1c21a735c4..aa9737398c 100644 --- a/subprojects/gst-plugins-base/ext/gl/gstglstereomix.c +++ b/subprojects/gst-plugins-base/ext/gl/gstglstereomix.c @@ -605,7 +605,8 @@ _update_caps (GstVideoAggregator * vagg, GstCaps * caps) blend_caps = gst_video_info_to_caps (mix_info); gst_caps_set_features (blend_caps, 0, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); tmp_caps = get_converted_caps (GST_GL_STEREO_MIX (vagg), blend_caps); gst_caps_unref (blend_caps); @@ -640,7 +641,8 @@ _negotiated_caps (GstAggregator * agg, GstCaps * caps) in_caps = gst_video_info_to_caps (&mix->mix_info); gst_caps_set_features (in_caps, 0, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); gst_caps_set_simple (in_caps, "texture-target", G_TYPE_STRING, GST_GL_TEXTURE_TARGET_2D_STR, NULL); diff --git a/subprojects/gst-plugins-base/ext/gl/gstglviewconvert.c b/subprojects/gst-plugins-base/ext/gl/gstglviewconvert.c index 512a57f244..6668e42c45 100644 --- a/subprojects/gst-plugins-base/ext/gl/gstglviewconvert.c +++ b/subprojects/gst-plugins-base/ext/gl/gstglviewconvert.c @@ -196,12 +196,14 @@ gst_gl_view_convert_element_set_caps (GstGLFilter * filter, GstCaps * incaps, gst_caps_set_simple (incaps, "format", G_TYPE_STRING, "RGBA", NULL); gl_features = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY); gst_caps_set_features (incaps, 0, gl_features); gst_caps_set_simple (outcaps, "format", G_TYPE_STRING, "RGBA", NULL); gl_features = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY); gst_caps_set_features (outcaps, 0, gl_features); ret = gst_gl_view_convert_set_caps (viewconvert_filter->viewconvert, diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c index 7072cf42ac..6aa1577d17 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c @@ -198,7 +198,7 @@ _set_caps_features_with_passthrough (const GstCaps * caps, GstStructure *s = gst_caps_get_structure (caps, i); orig_features = gst_caps_get_features (caps, i); - features = gst_caps_features_new (feature_name, NULL); + features = gst_caps_features_new_static_str (feature_name, NULL); if (gst_caps_features_is_any (orig_features)) { /* if we have any features, we add both the features with and without @passthrough */ @@ -430,7 +430,8 @@ _gl_memory_upload_transform_caps (gpointer impl, GstGLContext * context, GstCapsFeatures *filter_features; GstGLTextureTarget target_mask; - filter_features = gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + filter_features = + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY, NULL); if (!_filter_caps_with_features (caps, filter_features, &tmp)) { gst_caps_features_free (filter_features); @@ -538,9 +539,12 @@ _gl_memory_upload_propose_allocation (gpointer impl, GstQuery * decide_query, g_assert (gst_caps_is_fixed (caps)); - features_gl = gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, NULL); + features_gl = + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + NULL); features_sys = - gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY, NULL); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY, + NULL); /* Only offer our custom allocator if that type of memory was negotiated. */ if (_filter_caps_with_features (caps, features_sys, NULL)) { use_sys_mem = TRUE; @@ -1277,7 +1281,7 @@ _dma_buf_upload_transform_caps_common (GstCaps * caps, (!g_strcmp0 (from_feature, GST_CAPS_FEATURE_MEMORY_GL_MEMORY), NULL); } - features = gst_caps_features_new (from_feature, NULL); + features = gst_caps_features_new_static_str (from_feature, NULL); if (!_filter_caps_with_features (caps, features, &caps_to_transform)) { gst_caps_features_free (features); return NULL; @@ -1335,8 +1339,8 @@ _dma_buf_upload_transform_caps_common (GstCaps * caps, passthrough: /* Change the feature name. */ - passthrough = gst_caps_features_from_string - (GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION); + passthrough = gst_caps_features_new_static_str + (GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, NULL); ret_caps = _set_caps_features_with_passthrough (tmp_caps, to_feature, passthrough); @@ -2231,7 +2235,8 @@ _raw_data_upload_transform_caps (gpointer impl, GstGLContext * context, GstCaps *tmp; filter_features = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY); if (!_filter_caps_with_features (caps, filter_features, &tmp)) { gst_caps_features_free (filter_features); gst_caps_features_free (passthrough); @@ -2276,7 +2281,8 @@ _raw_data_upload_accept (gpointer impl, GstBuffer * buffer, GstCaps * in_caps, GstCapsFeatures *features; features = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY); /* Also consider the omited system memory feature cases, such as video/x-raw(meta:GstVideoOverlayComposition) */ if (!_filter_caps_with_features (in_caps, features, NULL)) { @@ -2438,7 +2444,8 @@ _directviv_upload_transform_caps (gpointer impl, GstGLContext * context, GstCapsFeatures *filter_features; filter_features = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY); if (!_filter_caps_with_features (caps, filter_features, &tmp)) { gst_caps_features_free (filter_features); gst_caps_features_free (passthrough); @@ -2494,7 +2501,8 @@ _directviv_upload_accept (gpointer impl, GstBuffer * buffer, GstCaps * in_caps, return FALSE; features = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY); /* Also consider the omited system memory feature cases, such as video/x-raw(meta:GstVideoOverlayComposition) */ if (!_filter_caps_with_features (in_caps, features, NULL)) { @@ -2772,7 +2780,7 @@ _nvmm_upload_transform_caps (gpointer impl, GstGLContext * context, GstCapsFeatures *filter_features; filter_features = - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_NVMM); + gst_caps_features_new_single_static_str (GST_CAPS_FEATURE_MEMORY_NVMM); if (!_filter_caps_with_features (caps, filter_features, &tmp)) { gst_caps_features_free (filter_features); gst_caps_features_free (passthrough); diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/video-info-dma.c b/subprojects/gst-plugins-base/gst-libs/gst/video/video-info-dma.c index c2d7d4848b..7d67d7c668 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/video-info-dma.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/video-info-dma.c @@ -306,7 +306,7 @@ gst_video_info_dma_drm_to_caps (const GstVideoInfoDmaDrm * drm_info) } gst_caps_set_features_simple (caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_DMABUF)); + gst_caps_features_new_single_static_str (GST_CAPS_FEATURE_MEMORY_DMABUF)); str = gst_video_dma_drm_fourcc_to_string (drm_info->drm_fourcc, drm_info->drm_modifier); diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c b/subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c index 660d0c4b42..34cf8cd745 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c @@ -702,7 +702,9 @@ gst_video_info_to_caps (const GstVideoInfo * info) */ GstCapsFeatures *features; - features = gst_caps_features_new (GST_CAPS_FEATURE_FORMAT_INTERLACED, NULL); + features = + gst_caps_features_new_static_str (GST_CAPS_FEATURE_FORMAT_INTERLACED, + NULL); gst_caps_set_features (caps, 0, features); } diff --git a/subprojects/gst-plugins-base/gst/videoconvertscale/gstvideoconvertscale.c b/subprojects/gst-plugins-base/gst/videoconvertscale/gstvideoconvertscale.c index 71087a6aae..c3b159a1f7 100644 --- a/subprojects/gst-plugins-base/gst/videoconvertscale/gstvideoconvertscale.c +++ b/subprojects/gst-plugins-base/gst/videoconvertscale/gstvideoconvertscale.c @@ -294,7 +294,8 @@ gst_video_convert_scale_class_init (GstVideoConvertScaleClass * klass) GST_DEBUG_CATEGORY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE"); features_format_interlaced = - gst_caps_features_new (GST_CAPS_FEATURE_FORMAT_INTERLACED, NULL); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_FORMAT_INTERLACED, + NULL); features_format_interlaced_sysmem = gst_caps_features_copy (features_format_interlaced); gst_caps_features_add (features_format_interlaced_sysmem, diff --git a/subprojects/gst-plugins-base/tests/check/libs/gstglcolorconvert.c b/subprojects/gst-plugins-base/tests/check/libs/gstglcolorconvert.c index 8bfbfe9941..ea0a0babe9 100644 --- a/subprojects/gst-plugins-base/tests/check/libs/gstglcolorconvert.c +++ b/subprojects/gst-plugins-base/tests/check/libs/gstglcolorconvert.c @@ -156,7 +156,8 @@ check_conversion (TestFrame * frames, guint size) gst_video_info_set_format (&in_info, in_v_format, in_width, in_height); in_caps = gst_video_info_to_caps (&in_info); gst_caps_set_features (in_caps, 0, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); /* create GL buffer */ inbuf = gst_buffer_new (); @@ -204,7 +205,8 @@ check_conversion (TestFrame * frames, guint size) out_height); out_caps = gst_video_info_to_caps (&out_info); gst_caps_set_features (out_caps, 0, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); for (k = 0; k < GST_VIDEO_INFO_N_PLANES (&out_info); k++) { out_data[k] = frames[j].data[k]; @@ -283,7 +285,7 @@ GST_START_TEST (test_passthrough) in_caps = gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING, gst_video_format_to_string (in_format), NULL); gst_caps_set_features_simple (in_caps, - gst_caps_features_from_string (in_feature)); + gst_caps_features_new_single_static_str (in_feature)); for (l = 0; l < features_size; l++) { @@ -293,7 +295,7 @@ GST_START_TEST (test_passthrough) out_caps = gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING, gst_video_format_to_string (out_format), NULL); gst_caps_set_features_simple (out_caps, - gst_caps_features_from_string (out_feature)); + gst_caps_features_new_single_static_str (out_feature)); if (gst_caps_is_equal (in_caps, out_caps)) { GstCaps *tmp_caps, *tmp_caps2, *tmp_caps3; diff --git a/subprojects/gst-plugins-base/tests/check/libs/gstglupload.c b/subprojects/gst-plugins-base/tests/check/libs/gstglupload.c index 523f05a561..c9b02f0eb5 100644 --- a/subprojects/gst-plugins-base/tests/check/libs/gstglupload.c +++ b/subprojects/gst-plugins-base/tests/check/libs/gstglupload.c @@ -448,7 +448,7 @@ GST_START_TEST (test_passthrough) in_caps = gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING, gst_video_format_to_string (in_format), NULL); gst_caps_set_features_simple (in_caps, - gst_caps_features_from_string (in_feature)); + gst_caps_features_new_single_static_str (in_feature)); for (l = 0; l < features_size; l++) { @@ -458,7 +458,7 @@ GST_START_TEST (test_passthrough) out_caps = gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING, gst_video_format_to_string (out_format), NULL); gst_caps_set_features_simple (out_caps, - gst_caps_features_from_string (out_feature)); + gst_caps_features_new_single_static_str (out_feature)); if (gst_caps_is_equal (in_caps, out_caps)) { GstCaps *tmp_caps, *tmp_caps2, *tmp_caps3; diff --git a/subprojects/gst-plugins-good/ext/qt6/gstqml6glmixer.cc b/subprojects/gst-plugins-good/ext/qt6/gstqml6glmixer.cc index ae7387da1a..6c98cc5fa0 100644 --- a/subprojects/gst-plugins-good/ext/qt6/gstqml6glmixer.cc +++ b/subprojects/gst-plugins-good/ext/qt6/gstqml6glmixer.cc @@ -124,7 +124,9 @@ gst_qml6_gl_mixer_pad_prepare_frame (GstVideoAggregatorPad *vagg_pad, GstVideoAg GstGLContext *context; in_caps = gst_video_info_to_caps (&vagg_pad->info); - gst_caps_set_features_simple (in_caps, gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); + gst_caps_set_features_simple (in_caps, + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); pad->widget->setCaps (in_caps); gst_clear_caps (&in_caps); diff --git a/subprojects/gst-plugins-good/ext/qt6/qt6glwindow.cc b/subprojects/gst-plugins-good/ext/qt6/qt6glwindow.cc index 661187c6eb..ca51cf5a20 100644 --- a/subprojects/gst-plugins-good/ext/qt6/qt6glwindow.cc +++ b/subprojects/gst-plugins-good/ext/qt6/qt6glwindow.cc @@ -447,7 +447,8 @@ qt6_gl_window_take_buffer (Qt6GLWindow * qt6_gl_window, GstCaps ** updated_caps) if (qt6_gl_window->priv->new_caps) { *updated_caps = gst_video_info_to_caps (&qt6_gl_window->priv->v_info); gst_caps_set_features (*updated_caps, 0, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY)); qt6_gl_window->priv->new_caps = FALSE; } diff --git a/subprojects/gst-plugins-good/gst/deinterlace/gstdeinterlace.c b/subprojects/gst-plugins-good/gst/deinterlace/gstdeinterlace.c index 998b3a4af4..7a0707aeb5 100644 --- a/subprojects/gst-plugins-good/gst/deinterlace/gstdeinterlace.c +++ b/subprojects/gst-plugins-good/gst/deinterlace/gstdeinterlace.c @@ -2472,7 +2472,9 @@ dup_caps_with_alternate (GstCaps * caps) GstCapsFeatures *features; with_alternate = gst_caps_copy (caps); - features = gst_caps_features_new (GST_CAPS_FEATURE_FORMAT_INTERLACED, NULL); + features = + gst_caps_features_new_static_str (GST_CAPS_FEATURE_FORMAT_INTERLACED, + NULL); gst_caps_set_features_simple (with_alternate, features); gst_caps_set_simple (with_alternate, "interlace-mode", G_TYPE_STRING, diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c index 472a24ef55..aceadc1441 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c @@ -1667,7 +1667,8 @@ add_alternate_variant (GstV4l2Object * v4l2object, GstCaps * caps, gst_structure_set (alt_s, "interlace-mode", G_TYPE_STRING, "alternate", NULL); gst_caps_append_structure_full (caps, alt_s, - gst_caps_features_new (GST_CAPS_FEATURE_FORMAT_INTERLACED, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_FORMAT_INTERLACED, + NULL)); } static void @@ -2730,7 +2731,9 @@ check_alternate_and_append_struct (GstCaps * caps, GstStructure * s) "alternate")) { GstCapsFeatures *feat; - feat = gst_caps_features_new (GST_CAPS_FEATURE_FORMAT_INTERLACED, NULL); + feat = + gst_caps_features_new_static_str (GST_CAPS_FEATURE_FORMAT_INTERLACED, + NULL); gst_caps_set_features (caps, gst_caps_get_size (caps) - 1, feat); } } else if (GST_VALUE_HOLDS_LIST (mode)) { @@ -2754,7 +2757,8 @@ check_alternate_and_append_struct (GstCaps * caps, GstStructure * s) copy = gst_structure_copy (s); gst_structure_take_value (copy, "interlace-mode", &inter); gst_caps_append_structure_full (caps, copy, - gst_caps_features_new (GST_CAPS_FEATURE_FORMAT_INTERLACED, NULL)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_FORMAT_INTERLACED, + NULL)); } g_value_unset (&alter); } diff --git a/subprojects/gst-plugins-good/tests/check/elements/videocrop.c b/subprojects/gst-plugins-good/tests/check/elements/videocrop.c index 2a0e73cb82..798eab8fba 100644 --- a/subprojects/gst-plugins-good/tests/check/elements/videocrop.c +++ b/subprojects/gst-plugins-good/tests/check/elements/videocrop.c @@ -815,7 +815,7 @@ get_featured_caps (void) GstCaps *caps; GstCapsFeatures *features; - features = gst_caps_features_new ("memory:DMABuf", NULL); + features = gst_caps_features_new_static_str ("memory:DMABuf", NULL); caps = gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING, "NV12", "framerate", GST_TYPE_FRACTION, 1, 1, diff --git a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c index a54f85e55e..fe53d4554b 100644 --- a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c +++ b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c @@ -258,7 +258,8 @@ gst_vaapidecode_ensure_allowed_srcpad_caps (GstVaapiDecode * decode) va_caps = gst_caps_copy (base_caps); gst_caps_set_features_simple (va_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, + NULL)); #if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL) if (!GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (decode) @@ -374,7 +375,7 @@ gst_vaapidecode_update_src_caps (GstVaapiDecode * decode) if (!structure) break; feature_str = gst_vaapi_caps_feature_to_string (feature); - features = gst_caps_features_new (feature_str, NULL); + features = gst_caps_features_new_static_str (feature_str, NULL); gst_caps_set_features (state->caps, 0, features); break; } diff --git a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapipluginutil.c b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapipluginutil.c index 6fa18f6fab..c23e89264e 100644 --- a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapipluginutil.c +++ b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapipluginutil.c @@ -1117,7 +1117,8 @@ gst_vaapi_build_caps_from_formats (GArray * formats, gint min_width, va_caps = gst_caps_copy (raw_caps); gst_caps_set_features_simple (va_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, + NULL)); if (gst_vaapi_mem_type_supports (mem_types, GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF) || @@ -1125,7 +1126,8 @@ gst_vaapi_build_caps_from_formats (GArray * formats, gint min_width, GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF2)) { dma_caps = gst_caps_copy (raw_caps); gst_caps_set_features_simple (dma_caps, - gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_DMABUF)); + gst_caps_features_new_static_str (GST_CAPS_FEATURE_MEMORY_DMABUF, + NULL)); } out_caps = va_caps; diff --git a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapisink.c b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapisink.c index b318f70539..7f349a5717 100644 --- a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapisink.c +++ b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapisink.c @@ -1323,7 +1323,7 @@ gst_vaapisink_get_caps_impl (GstBaseSink * base_sink) gst_caps_append (out_caps, gst_caps_copy (raw_caps)); feature_caps = gst_caps_copy (raw_caps); - features = gst_caps_features_new + features = gst_caps_features_new_static_str (GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, NULL); gst_caps_set_features (feature_caps, 0, features); gst_caps_append (out_caps, feature_caps); diff --git a/subprojects/gstreamer/tests/check/gst/gstcaps.c b/subprojects/gstreamer/tests/check/gst/gstcaps.c index 14118f4dd7..4a3d844c3f 100644 --- a/subprojects/gstreamer/tests/check/gst/gstcaps.c +++ b/subprojects/gstreamer/tests/check/gst/gstcaps.c @@ -1266,7 +1266,7 @@ GST_START_TEST (test_features) s1 = gst_structure_new ("video/x-raw", "width", G_TYPE_INT, 320, "height", GST_TYPE_INT_RANGE, 240, 260, NULL); fail_unless (s1 != NULL); - f1 = gst_caps_features_new ("memory:EGLImage", NULL); + f1 = gst_caps_features_new_static_str ("memory:EGLImage", NULL); fail_unless (f1 != NULL); gst_caps_append_structure_full (c1, s1, f1); @@ -1293,7 +1293,8 @@ GST_START_TEST (test_features) s2 = gst_structure_new ("video/x-raw", "width", G_TYPE_INT, 320, "height", GST_TYPE_INT_RANGE, 240, 260, NULL); fail_unless (s2 != NULL); - f2 = gst_caps_features_new ("memory:VASurface", "meta:VAMeta", NULL); + f2 = gst_caps_features_new_static_str ("memory:VASurface", "meta:VAMeta", + NULL); fail_unless (f2 != NULL); gst_caps_append_structure_full (c2, s2, f2); @@ -1367,7 +1368,7 @@ GST_START_TEST (test_features) c1 = gst_caps_from_string ("video/x-raw"); f1 = gst_caps_get_features (c1, 0); - f2 = gst_caps_features_new ("memory:dmabuf", NULL); + f2 = gst_caps_features_new_static_str ("memory:dmabuf", NULL); gst_caps_set_features (c1, 0, f2); gst_caps_unref (c1); @@ -1377,7 +1378,7 @@ GST_START_TEST (test_features) ("video/x-raw, format=NV12; video/x-raw, format=NV16"); fail_unless_equals_int (gst_caps_get_size (c1), 2); - f1 = gst_caps_features_new ("memory:EGLImage", NULL); + f1 = gst_caps_features_new_static_str ("memory:EGLImage", NULL); gst_caps_set_features_simple (c1, f1); f2 = gst_caps_get_features (c1, 0); @@ -1390,7 +1391,7 @@ GST_START_TEST (test_features) c1 = gst_caps_new_any (); fail_unless_equals_int (gst_caps_get_size (c1), 0); - f1 = gst_caps_features_new ("memory:EGLImage", NULL); + f1 = gst_caps_features_new_static_str ("memory:EGLImage", NULL); /* Nothing to set the features on, but method should still take * ownership of the given features */ gst_caps_set_features_simple (c1, f1); diff --git a/subprojects/gstreamer/tests/check/gst/gstcapsfeatures.c b/subprojects/gstreamer/tests/check/gst/gstcapsfeatures.c index 9af126f8ab..d299120623 100644 --- a/subprojects/gstreamer/tests/check/gst/gstcapsfeatures.c +++ b/subprojects/gstreamer/tests/check/gst/gstcapsfeatures.c @@ -30,7 +30,7 @@ GST_START_TEST (test_basic_operations) { GstCapsFeatures *a, *b; - a = gst_caps_features_new ("m:abc", "m:def", "m:ghi", NULL); + a = gst_caps_features_new_static_str ("m:abc", "m:def", "m:ghi", NULL); fail_unless (a != NULL); b = gst_caps_features_copy (a); fail_unless (b != NULL); diff --git a/subprojects/gstreamer/tests/check/gst/gstvalue.c b/subprojects/gstreamer/tests/check/gst/gstvalue.c index b1d2548584..6426948f2d 100644 --- a/subprojects/gstreamer/tests/check/gst/gstvalue.c +++ b/subprojects/gstreamer/tests/check/gst/gstvalue.c @@ -3812,7 +3812,7 @@ GST_END_TEST; GST_START_TEST (test_serialize_deserialize_caps_features) { GstCapsFeatures *test_feats[] = { - gst_caps_features_new ("abc:val1", "xyz:val2", NULL), + gst_caps_features_new_static_str ("abc:val1", "xyz:val2", NULL), gst_caps_features_new ("feat:val", NULL), gst_caps_features_new_any (), gst_caps_features_new_empty ()