mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
d3d11decoder: Copy HDR10 related caps field manually
If negotiate() is called from the set_format() chain, sinkpad may not hold caps yet, so baseclass cannot copy it over to srcpad caps. Copy them manually. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2376>
This commit is contained in:
parent
fe2a940898
commit
288f6e4dba
1 changed files with 15 additions and 0 deletions
|
@ -1603,6 +1603,8 @@ gst_d3d11_decoder_negotiate (GstD3D11Decoder * decoder,
|
||||||
gboolean alternate_supported = FALSE;
|
gboolean alternate_supported = FALSE;
|
||||||
gboolean d3d11_supported = FALSE;
|
gboolean d3d11_supported = FALSE;
|
||||||
GstVideoCodecState *input_state;
|
GstVideoCodecState *input_state;
|
||||||
|
GstStructure *s;
|
||||||
|
const gchar *str;
|
||||||
|
|
||||||
g_return_val_if_fail (GST_IS_D3D11_DECODER (decoder), FALSE);
|
g_return_val_if_fail (GST_IS_D3D11_DECODER (decoder), FALSE);
|
||||||
g_return_val_if_fail (GST_IS_VIDEO_DECODER (videodec), FALSE);
|
g_return_val_if_fail (GST_IS_VIDEO_DECODER (videodec), FALSE);
|
||||||
|
@ -1694,6 +1696,19 @@ gst_d3d11_decoder_negotiate (GstD3D11Decoder * decoder,
|
||||||
|
|
||||||
state->caps = gst_video_info_to_caps (&state->info);
|
state->caps = gst_video_info_to_caps (&state->info);
|
||||||
|
|
||||||
|
s = gst_caps_get_structure (input_state->caps, 0);
|
||||||
|
str = gst_structure_get_string (s, "mastering-display-info");
|
||||||
|
if (str) {
|
||||||
|
gst_caps_set_simple (state->caps,
|
||||||
|
"mastering-display-info", G_TYPE_STRING, str, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
str = gst_structure_get_string (s, "content-light-level");
|
||||||
|
if (str) {
|
||||||
|
gst_caps_set_simple (state->caps,
|
||||||
|
"content-light-level", G_TYPE_STRING, str, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
g_clear_pointer (&decoder->output_state, gst_video_codec_state_unref);
|
g_clear_pointer (&decoder->output_state, gst_video_codec_state_unref);
|
||||||
decoder->output_state = state;
|
decoder->output_state = state;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue