h265parse: Rename parsed_framerate to framerate_from_caps

That meaning of parsed_framerate is ambigious, it is set whenever the
framerate has been parsed from caps, which can be confused with being
parsed from the bitstream. Rename this as framerate_from_caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4259>
This commit is contained in:
Nicolas Dufresne 2023-03-23 20:02:16 -04:00
parent 86489dd456
commit 93904f1921
2 changed files with 5 additions and 5 deletions

View file

@ -2167,7 +2167,7 @@ gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps)
fps_den = sps->vui_params.num_units_in_tick; fps_den = sps->vui_params.num_units_in_tick;
if (gst_h265_parse_is_field_interlaced (h265parse) if (gst_h265_parse_is_field_interlaced (h265parse)
&& h265parse->parsed_framerate) { && h265parse->framerate_from_caps) {
gint new_fps_num, new_fps_den; gint new_fps_num, new_fps_den;
if (!gst_util_fraction_multiply (fps_num, fps_den, 1, 2, &new_fps_num, if (!gst_util_fraction_multiply (fps_num, fps_den, 1, 2, &new_fps_num,
@ -2180,7 +2180,7 @@ gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps)
fps_num = new_fps_num; fps_num = new_fps_num;
fps_den = new_fps_den; fps_den = new_fps_den;
} }
h265parse->parsed_framerate = FALSE; h265parse->framerate_from_caps = FALSE;
} }
} }
@ -2257,7 +2257,7 @@ gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps)
gst_caps_set_simple (caps, "width", G_TYPE_INT, width, gst_caps_set_simple (caps, "width", G_TYPE_INT, width,
"height", G_TYPE_INT, height, NULL); "height", G_TYPE_INT, height, NULL);
h265parse->parsed_framerate = FALSE; h265parse->framerate_from_caps = FALSE;
/* upstream overrides */ /* upstream overrides */
if (s && gst_structure_has_field (s, "framerate")) if (s && gst_structure_has_field (s, "framerate"))
gst_structure_get_fraction (s, "framerate", &fps_num, &fps_den); gst_structure_get_fraction (s, "framerate", &fps_num, &fps_den);
@ -2277,7 +2277,7 @@ gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps)
fps_num, fps_den, 0, 0); fps_num, fps_den, 0, 0);
val = sps->profile_tier_level.interlaced_source_flag ? GST_SECOND / 2 : val = sps->profile_tier_level.interlaced_source_flag ? GST_SECOND / 2 :
GST_SECOND; GST_SECOND;
h265parse->parsed_framerate = TRUE; h265parse->framerate_from_caps = TRUE;
/* If we know the frame duration, and if we are not in one of the zero /* If we know the frame duration, and if we are not in one of the zero
* latency pattern, add one frame of latency */ * latency pattern, add one frame of latency */

View file

@ -110,7 +110,7 @@ struct _GstH265Parse
gboolean predicted; gboolean predicted;
gboolean bidirectional; gboolean bidirectional;
gboolean header; gboolean header;
gboolean parsed_framerate; gboolean framerate_from_caps;
/* AU state */ /* AU state */
gboolean picture_start; gboolean picture_start;