qsv: Promote encoder rank to PRIMARY on Windows

QSV is very well integrated with GstD3D11 infrastructure on Windows,
and this is the recommended H/W encoder element over the MediaFoundation
plugins on Intel GPU system.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3393>
This commit is contained in:
Seungha Yang 2022-11-13 03:07:54 +09:00 committed by GStreamer Marge Bot
parent e60a94c27d
commit f6327e25a7
2 changed files with 13 additions and 10 deletions

View file

@ -225364,7 +225364,7 @@
"writable": true "writable": true
} }
}, },
"rank": "none" "rank": "primary"
}, },
"qsvh264dec": { "qsvh264dec": {
"author": "Seungha Yang <seungha@centricular.com>", "author": "Seungha Yang <seungha@centricular.com>",
@ -225763,7 +225763,7 @@
"writable": true "writable": true
} }
}, },
"rank": "none" "rank": "primary"
}, },
"qsvh265dec": { "qsvh265dec": {
"author": "Seungha Yang <seungha@centricular.com>", "author": "Seungha Yang <seungha@centricular.com>",
@ -226096,7 +226096,7 @@
"writable": true "writable": true
} }
}, },
"rank": "none" "rank": "primary"
}, },
"qsvjpegdec": { "qsvjpegdec": {
"author": "Seungha Yang <seungha@centricular.com>", "author": "Seungha Yang <seungha@centricular.com>",
@ -226169,7 +226169,7 @@
"writable": true "writable": true
} }
}, },
"rank": "none" "rank": "primary"
}, },
"qsvvp9dec": { "qsvvp9dec": {
"author": "Seungha Yang <seungha@centricular.com>", "author": "Seungha Yang <seungha@centricular.com>",
@ -226338,7 +226338,7 @@
"writable": true "writable": true
} }
}, },
"rank": "none" "rank": "primary"
} }
}, },
"filename": "gstqsv", "filename": "gstqsv",

View file

@ -209,12 +209,15 @@ plugin_init (GstPlugin * plugin)
mfxLoader loader; mfxLoader loader;
guint i = 0; guint i = 0;
GList *platform_devices = nullptr; GList *platform_devices = nullptr;
GstRank enc_rank = GST_RANK_NONE;
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
/* D3D11 Video API is supported since Windows 8. /* D3D11 Video API is supported since Windows 8.
* Do we want to support old OS (Windows 7 for example) with D3D9 ?? */ * Do we want to support old OS (Windows 7 for example) with D3D9 ?? */
if (!IsWindows8OrGreater ()) if (!IsWindows8OrGreater ())
return TRUE; return TRUE;
enc_rank = GST_RANK_PRIMARY;
#endif #endif
GST_DEBUG_CATEGORY_INIT (gst_qsv_debug, "qsv", 0, "Intel Quick Sync Video"); GST_DEBUG_CATEGORY_INIT (gst_qsv_debug, "qsv", 0, "Intel Quick Sync Video");
@ -261,11 +264,11 @@ plugin_init (GstPlugin * plugin)
gst_qsv_jpeg_dec_register (plugin, GST_RANK_SECONDARY, i, device, session); gst_qsv_jpeg_dec_register (plugin, GST_RANK_SECONDARY, i, device, session);
gst_qsv_vp9_dec_register (plugin, GST_RANK_MARGINAL, i, device, session); gst_qsv_vp9_dec_register (plugin, GST_RANK_MARGINAL, i, device, session);
gst_qsv_h264_enc_register (plugin, GST_RANK_NONE, i, device, session); gst_qsv_h264_enc_register (plugin, enc_rank, i, device, session);
gst_qsv_h265_enc_register (plugin, GST_RANK_NONE, i, device, session); gst_qsv_h265_enc_register (plugin, enc_rank, i, device, session);
gst_qsv_jpeg_enc_register (plugin, GST_RANK_NONE, i, device, session); gst_qsv_jpeg_enc_register (plugin, enc_rank, i, device, session);
gst_qsv_vp9_enc_register (plugin, GST_RANK_NONE, i, device, session); gst_qsv_vp9_enc_register (plugin, enc_rank, i, device, session);
gst_qsv_av1_enc_register (plugin, GST_RANK_NONE, i, device, session); gst_qsv_av1_enc_register (plugin, enc_rank, i, device, session);
next: next:
MFXDispReleaseImplDescription (loader, desc); MFXDispReleaseImplDescription (loader, desc);