qsv: Fix critical warnings

Fixing warnings
GStreamer-CRITICAL **: 01:21:25.862: gst_value_set_int_range_step:
assertion 'start < end' failed

Although when QSV runtime reports a codec is supported, resolution query
fails sometimes, espeically VP9 encoder case on Windows.
Don't try to register an element if resolution query returned an error

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7250>
This commit is contained in:
Seungha Yang 2024-07-28 02:01:24 +09:00 committed by GStreamer Marge Bot
parent 0bb336f34c
commit 080a838fca
5 changed files with 15 additions and 0 deletions

View file

@ -710,6 +710,9 @@ gst_qsv_av1_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
max_resolution.height = gst_qsv_resolutions[i].height;
}
if (max_resolution.width == 0 || max_resolution.height == 0)
return;
GST_INFO ("Maximum supported resolution: %dx%d",
max_resolution.width, max_resolution.height);

View file

@ -2181,6 +2181,9 @@ gst_qsv_h264_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
max_resolution.height = gst_qsv_resolutions[i].height;
}
if (max_resolution.width == 0 || max_resolution.height == 0)
return;
GST_INFO ("Maximum supported resolution: %dx%d",
max_resolution.width, max_resolution.height);

View file

@ -1539,6 +1539,9 @@ gst_qsv_h265_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
max_resolution.height = gst_qsv_resolutions[i].height;
}
if (max_resolution.width == 0 || max_resolution.height == 0)
return;
GST_INFO ("Maximum supported resolution: %dx%d",
max_resolution.width, max_resolution.height);

View file

@ -446,6 +446,9 @@ gst_qsv_jpeg_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
max_resolution.height = gst_qsv_resolutions[i].height;
}
if (max_resolution.width == 0 || max_resolution.height == 0)
return;
GST_INFO ("Maximum supported resolution: %dx%d",
max_resolution.width, max_resolution.height);

View file

@ -929,6 +929,9 @@ gst_qsv_vp9_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
max_resolution.height = gst_qsv_resolutions[i].height;
}
if (max_resolution.width == 0 || max_resolution.height == 0)
return;
GST_INFO ("Maximum supported resolution: %dx%d",
max_resolution.width, max_resolution.height);