diff --git a/subprojects/gst-plugins-bad/sys/va/plugin.c b/subprojects/gst-plugins-bad/sys/va/plugin.c index 0b186377d1..eb2852aacd 100644 --- a/subprojects/gst-plugins-bad/sys/va/plugin.c +++ b/subprojects/gst-plugins-bad/sys/va/plugin.c @@ -103,43 +103,45 @@ plugin_register_decoders (GstPlugin * plugin, GstVaDevice * device, switch (codec) { case H264: + /* avdec_h264 has primary rank, make this higher than it */ if (!gst_va_h264_dec_register (plugin, device, sinkcaps, srccaps, - GST_RANK_NONE)) { + GST_RANK_PRIMARY + 1)) { GST_WARNING ("Failed to register H264 decoder: %s", device->render_device_path); } break; case HEVC: + /* avdec_h265 has primary rank, make this higher than it */ if (!gst_va_h265_dec_register (plugin, device, sinkcaps, srccaps, - GST_RANK_NONE)) { + GST_RANK_PRIMARY + 1)) { GST_WARNING ("Failed to register H265 decoder: %s", device->render_device_path); } break; case VP8: if (!gst_va_vp8_dec_register (plugin, device, sinkcaps, srccaps, - GST_RANK_NONE)) { + GST_RANK_PRIMARY)) { GST_WARNING ("Failed to register VP8 decoder: %s", device->render_device_path); } break; case VP9: if (!gst_va_vp9_dec_register (plugin, device, sinkcaps, srccaps, - GST_RANK_NONE)) { + GST_RANK_PRIMARY)) { GST_WARNING ("Failed to register VP9 decoder: %s", device->render_device_path); } break; case MPEG2: if (!gst_va_mpeg2_dec_register (plugin, device, sinkcaps, srccaps, - GST_RANK_NONE)) { + GST_RANK_SECONDARY)) { GST_WARNING ("Failed to register Mpeg2 decoder: %s", device->render_device_path); } break; case AV1: if (!gst_va_av1_dec_register (plugin, device, sinkcaps, srccaps, - GST_RANK_NONE)) { + GST_RANK_PRIMARY)) { GST_WARNING ("Failed to register AV1 decoder: %s", device->render_device_path); } diff --git a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapi.c b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapi.c index 3fc761ea2e..8f4bb0ec92 100644 --- a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapi.c +++ b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapi.c @@ -201,7 +201,7 @@ plugin_init (GstPlugin * plugin) if (decoders) { gst_vaapidecode_register (plugin, decoders); gst_element_register (plugin, "vaapidecodebin", - GST_RANK_PRIMARY + 2, GST_TYPE_VAAPI_DECODE_BIN); + GST_RANK_NONE, GST_TYPE_VAAPI_DECODE_BIN); g_array_unref (decoders); } @@ -212,9 +212,7 @@ plugin_init (GstPlugin * plugin) GST_RANK_NONE, GST_TYPE_VAAPIPOSTPROC); } - rank = GST_RANK_SECONDARY; - if (g_getenv ("WAYLAND_DISPLAY")) - rank = GST_RANK_MARGINAL; + rank = GST_RANK_NONE; gst_element_register (plugin, "vaapisink", rank, GST_TYPE_VAAPISINK); #if GST_VAAPI_USE_ENCODERS diff --git a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c index 20276d1ba9..a54f85e55e 100644 --- a/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c +++ b/subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c @@ -96,21 +96,21 @@ struct _GstVaapiDecoderMap }; static const GstVaapiDecoderMap vaapi_decode_map[] = { - {GST_VAAPI_CODEC_JPEG, GST_RANK_MARGINAL, "jpeg", "image/jpeg", NULL}, - {GST_VAAPI_CODEC_MPEG2, GST_RANK_PRIMARY, "mpeg2", + {GST_VAAPI_CODEC_JPEG, GST_RANK_NONE, "jpeg", "image/jpeg", NULL}, + {GST_VAAPI_CODEC_MPEG2, GST_RANK_NONE, "mpeg2", "video/mpeg, mpegversion=2, systemstream=(boolean)false", NULL}, - {GST_VAAPI_CODEC_MPEG4, GST_RANK_PRIMARY, "mpeg4", + {GST_VAAPI_CODEC_MPEG4, GST_RANK_NONE, "mpeg4", "video/mpeg, mpegversion=4", NULL}, - {GST_VAAPI_CODEC_H263, GST_RANK_PRIMARY, "h263", "video/x-h263", NULL}, - {GST_VAAPI_CODEC_H264, GST_RANK_PRIMARY, "h264", "video/x-h264", + {GST_VAAPI_CODEC_H263, GST_RANK_NONE, "h263", "video/x-h263", NULL}, + {GST_VAAPI_CODEC_H264, GST_RANK_NONE, "h264", "video/x-h264", gst_vaapi_decode_h264_install_properties}, - {GST_VAAPI_CODEC_VC1, GST_RANK_PRIMARY, "vc1", + {GST_VAAPI_CODEC_VC1, GST_RANK_NONE, "vc1", "video/x-wmv, wmvversion=3, format={WMV3,WVC1}", NULL}, - {GST_VAAPI_CODEC_VP8, GST_RANK_PRIMARY, "vp8", "video/x-vp8", NULL}, - {GST_VAAPI_CODEC_VP9, GST_RANK_PRIMARY, "vp9", "video/x-vp9", NULL}, - {GST_VAAPI_CODEC_H265, GST_RANK_PRIMARY, "h265", "video/x-h265", NULL}, - {GST_VAAPI_CODEC_AV1, GST_RANK_PRIMARY, "av1", "video/x-av1", NULL}, - {0 /* the rest */ , GST_RANK_PRIMARY + 1, NULL, NULL, NULL}, + {GST_VAAPI_CODEC_VP8, GST_RANK_NONE, "vp8", "video/x-vp8", NULL}, + {GST_VAAPI_CODEC_VP9, GST_RANK_NONE, "vp9", "video/x-vp9", NULL}, + {GST_VAAPI_CODEC_H265, GST_RANK_NONE, "h265", "video/x-h265", NULL}, + {GST_VAAPI_CODEC_AV1, GST_RANK_NONE, "av1", "video/x-av1", NULL}, + {0 /* the rest */ , GST_RANK_NONE, NULL, NULL, NULL}, }; static GstElementClass *parent_class = NULL;