Use new gst_h264_video_calculate_framerate() API instead of fps_n/fps_d
fields in SPS struct which are to be removed.
Apparently H264 content in MSS is always non-interlaced/progressive,
so we can just pass 0 for field_pic_flag and don't need to parse any
slice headers first if there's no external signalling. But even if
that's not the case the new code is not worse than the existing code.
https://msdn.microsoft.com/en-us/library/
cc189080%28VS.95%29.aspx
https://bugzilla.gnome.org/show_bug.cgi?id=723352
parseres = gst_h264_parse_sps (&nalu, &sps_struct, TRUE);
if (parseres == GST_H264_PARSER_OK) {
+ gint fps_num, fps_den;
+
+ /* MSS apparently only supports non-interlaced/progressive H.264 content */
+ gst_h264_video_calculate_framerate (&sps_struct, 0, 0, &fps_num, &fps_den);
+
gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION,
- sps_struct.fps_num, sps_struct.fps_den, NULL);
+ fps_num, fps_den, NULL);
}
buffer = _make_h264_codec_data (sps, pps);