d3d12encoder: Do not print error log for not-supported feature

gst_d3d12_result() will print message with ERROR level if failed.
Use FAILED/SUCCEEDED macros instead, since not-supported feature
is not a critical error

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6963>
This commit is contained in:
Seungha Yang 2024-05-29 18:54:18 +09:00 committed by GStreamer Marge Bot
parent 63367659f2
commit 0ca5517d80

View file

@ -2164,7 +2164,7 @@ gst_d3d12_h264_enc_register (GstPlugin * plugin, GstD3D12Device * device,
hr = video_device->CheckFeatureSupport (D3D12_FEATURE_VIDEO_ENCODER_CODEC,
&feature_codec, sizeof (feature_codec));
if (!gst_d3d12_result (hr, device) || !feature_codec.IsSupported) {
if (FAILED (hr) || !feature_codec.IsSupported) {
GST_INFO_OBJECT (device, "Device does not support H.264 encoding");
return;
}
@ -2190,7 +2190,7 @@ gst_d3d12_h264_enc_register (GstPlugin * plugin, GstD3D12Device * device,
hr = video_device->CheckFeatureSupport
(D3D12_FEATURE_VIDEO_ENCODER_PROFILE_LEVEL, &feature_profile_level,
sizeof (feature_profile_level));
if (!gst_d3d12_result (hr, device) || !feature_profile_level.IsSupported) {
if (FAILED (hr) || !feature_profile_level.IsSupported) {
GST_WARNING_OBJECT (device, "Main profile is not supported");
return;
}
@ -2199,7 +2199,7 @@ gst_d3d12_h264_enc_register (GstPlugin * plugin, GstD3D12Device * device,
hr = video_device->CheckFeatureSupport
(D3D12_FEATURE_VIDEO_ENCODER_INPUT_FORMAT, &feature_input_format,
sizeof (feature_input_format));
if (!gst_d3d12_result (hr, device) || !feature_input_format.IsSupported) {
if (FAILED (hr) || !feature_input_format.IsSupported) {
GST_WARNING_OBJECT (device, "NV12 format is not supported");
return;
}
@ -2213,7 +2213,7 @@ gst_d3d12_h264_enc_register (GstPlugin * plugin, GstD3D12Device * device,
hr = video_device->CheckFeatureSupport
(D3D12_FEATURE_VIDEO_ENCODER_PROFILE_LEVEL, &feature_profile_level,
sizeof (feature_profile_level));
if (gst_d3d12_result (hr, device) && feature_profile_level.IsSupported) {
if (SUCCEEDED (hr) && feature_profile_level.IsSupported) {
profiles.push_back ("high");
GST_INFO_OBJECT (device, "High profile is supported, level [%d, %d]",
level_h264_min, level_h264_max);
@ -2230,7 +2230,7 @@ gst_d3d12_h264_enc_register (GstPlugin * plugin, GstD3D12Device * device,
hr = video_device->CheckFeatureSupport
(D3D12_FEATURE_VIDEO_ENCODER_OUTPUT_RESOLUTION_RATIOS_COUNT,
&ratios_count, sizeof (ratios_count));
if (!gst_d3d12_result (hr, device)) {
if (FAILED (hr)) {
GST_WARNING_OBJECT (device,
"Couldn't query output resolution ratios count");
return;
@ -2249,7 +2249,7 @@ gst_d3d12_h264_enc_register (GstPlugin * plugin, GstD3D12Device * device,
hr = video_device->CheckFeatureSupport
(D3D12_FEATURE_VIDEO_ENCODER_OUTPUT_RESOLUTION, &feature_resolution,
sizeof (feature_resolution));
if (!gst_d3d12_result (hr, device) || !feature_resolution.IsSupported) {
if (FAILED (hr) || !feature_resolution.IsSupported) {
GST_WARNING_OBJECT (device, "Couldn't query output resolution");
return;
}
@ -2376,7 +2376,7 @@ gst_d3d12_h264_enc_register (GstPlugin * plugin, GstD3D12Device * device,
hr = video_device->CheckFeatureSupport
(D3D12_FEATURE_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT,
&feature_pic_ctrl, sizeof (feature_pic_ctrl));
if (!gst_d3d12_result (hr, device) || !feature_pic_ctrl.IsSupported) {
if (FAILED (hr) || !feature_pic_ctrl.IsSupported) {
GST_WARNING_OBJECT (device, "Couldn't query picture control support");
return;
}