mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:46:13 +00:00
h264parse: Include interlace-mode
in caps
Those are the rules: In the SPS: * if frame_mbs_only_flag=1 => all frame progressive * if frame_mbs_only_flag=0 => field_pic_flag defines if each frame is progressive or interlaced, thus the mode is 'mixed' in GStreamer terms. https://bugzilla.gnome.org/show_bug.cgi?id=779309
This commit is contained in:
parent
40c74694ab
commit
b75a61342f
1 changed files with 8 additions and 0 deletions
|
@ -1791,6 +1791,7 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G_UNLIKELY (modified || h264parse->update_caps)) {
|
if (G_UNLIKELY (modified || h264parse->update_caps)) {
|
||||||
|
GstVideoInterlaceMode imode = GST_VIDEO_INTERLACE_MODE_PROGRESSIVE;
|
||||||
gint width, height;
|
gint width, height;
|
||||||
GstClockTime latency;
|
GstClockTime latency;
|
||||||
|
|
||||||
|
@ -1864,7 +1865,14 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
|
||||||
gst_base_parse_set_latency (GST_BASE_PARSE (h264parse), latency,
|
gst_base_parse_set_latency (GST_BASE_PARSE (h264parse), latency,
|
||||||
latency);
|
latency);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (sps->frame_mbs_only_flag == 0)
|
||||||
|
imode = GST_VIDEO_INTERLACE_MODE_MIXED;
|
||||||
|
|
||||||
|
if (s && !gst_structure_has_field (s, "interlace-mode"))
|
||||||
|
gst_caps_set_simple (caps, "interlace-mode", G_TYPE_STRING,
|
||||||
|
gst_video_interlace_mode_to_string (imode), NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue