mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-06-03 05:59:44 +00:00
d3d12h264enc: Fix profile support check
Add missing CheckFeatureSupport() call, and remove unused field Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5952>
This commit is contained in:
parent
f44d5d18f3
commit
4fb284346e
|
@ -95,7 +95,6 @@ struct GstD3D12H264EncClassData
|
||||||
GstCaps *src_caps;
|
GstCaps *src_caps;
|
||||||
guint rc_support;
|
guint rc_support;
|
||||||
guint slice_mode_support;
|
guint slice_mode_support;
|
||||||
D3D12_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT_H264 picture_ctrl;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
|
@ -2211,16 +2210,13 @@ gst_d3d12_h264_enc_register (GstPlugin * plugin, GstD3D12Device * device,
|
||||||
level_h264_min, level_h264_max);
|
level_h264_min, level_h264_max);
|
||||||
|
|
||||||
profile_h264 = D3D12_VIDEO_ENCODER_PROFILE_H264_HIGH;
|
profile_h264 = D3D12_VIDEO_ENCODER_PROFILE_H264_HIGH;
|
||||||
|
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 (gst_d3d12_result (hr, device) && feature_profile_level.IsSupported) {
|
||||||
feature_input_format.Format = DXGI_FORMAT_NV12;
|
profiles.push_back ("high");
|
||||||
hr = video_device->CheckFeatureSupport
|
GST_INFO_OBJECT (device, "High profile is supported, level [%d, %d]",
|
||||||
(D3D12_FEATURE_VIDEO_ENCODER_INPUT_FORMAT, &feature_input_format,
|
level_h264_min, level_h264_max);
|
||||||
sizeof (feature_input_format));
|
|
||||||
if (gst_d3d12_result (hr, device) && feature_input_format.IsSupported) {
|
|
||||||
profiles.push_back ("high");
|
|
||||||
GST_INFO_OBJECT (device, "High profile is supported, level [%d, %d]",
|
|
||||||
level_h264_min, level_h264_max);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profiles.empty ()) {
|
if (profiles.empty ()) {
|
||||||
|
@ -2435,7 +2431,6 @@ gst_d3d12_h264_enc_register (GstPlugin * plugin, GstD3D12Device * device,
|
||||||
cdata->src_caps = src_caps;
|
cdata->src_caps = src_caps;
|
||||||
cdata->rc_support = rc_support;
|
cdata->rc_support = rc_support;
|
||||||
cdata->slice_mode_support = slice_mode_support;
|
cdata->slice_mode_support = slice_mode_support;
|
||||||
cdata->picture_ctrl = picture_ctrl_h264;
|
|
||||||
|
|
||||||
GType type;
|
GType type;
|
||||||
gchar *type_name;
|
gchar *type_name;
|
||||||
|
|
Loading…
Reference in a new issue