mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
va/vaapi: promote va ranks and demote vaapi ones
VA decoders implementation has been verified from 1.18 through 1.22 development cycles and also via the Fluster test framework. Similar to other cases, we can prefer hardware over software in most cases. At the same time, GStreamer-VAAPI decoders are demoted to NONE to avoid collisions. The first step to their deprecation. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2312>
This commit is contained in:
parent
1e4cc59a3f
commit
e1765c4ce8
3 changed files with 21 additions and 21 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue