diff options
author | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2017-02-27 10:32:45 -0300 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2017-02-27 15:28:31 -0300 |
commit | b75a61342f4ea039d922a966f36b02cd9d9c3ad8 (patch) | |
tree | aca878d4e092f74f24535aa8617086469fe83766 /gst/videoparsers | |
parent | 40c74694abe26e95d95af20a4006f8d737f5d76a (diff) | |
download | gstreamer-plugins-bad-b75a61342f4ea039d922a966f36b02cd9d9c3ad8.tar.gz |
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
Diffstat (limited to 'gst/videoparsers')
-rw-r--r-- | gst/videoparsers/gsth264parse.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index 3153c2bc5..aaf4c39ac 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -1791,6 +1791,7 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps) } if (G_UNLIKELY (modified || h264parse->update_caps)) { + GstVideoInterlaceMode imode = GST_VIDEO_INTERLACE_MODE_PROGRESSIVE; gint width, height; 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, 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); } } |