h265parse: Rename parsed_framerate to framerate_from_caps
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 24 Mar 2023 00:02:16 +0000 (20:02 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 16 Jun 2023 08:18:49 +0000 (08:18 +0000)
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/4352>

subprojects/gst-plugins-bad/gst/videoparsers/gsth265parse.c
subprojects/gst-plugins-bad/gst/videoparsers/gsth265parse.h

index 76f2a5f..bc2e78c 100644 (file)
@@ -2167,7 +2167,7 @@ gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps)
         fps_den = sps->vui_params.num_units_in_tick;
 
         if (gst_h265_parse_is_field_interlaced (h265parse)
-            && h265parse->parsed_framerate) {
+            && h265parse->framerate_from_caps) {
           gint new_fps_num, new_fps_den;
 
           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_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,
           "height", G_TYPE_INT, height, NULL);
 
-      h265parse->parsed_framerate = FALSE;
+      h265parse->framerate_from_caps = FALSE;
       /* upstream overrides */
       if (s && gst_structure_has_field (s, "framerate"))
         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);
         val = sps->profile_tier_level.interlaced_source_flag ? GST_SECOND / 2 :
             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
          * latency pattern, add one frame of latency */
index fb94542..e49d22c 100644 (file)
@@ -110,7 +110,7 @@ struct _GstH265Parse
   gboolean predicted;
   gboolean bidirectional;
   gboolean header;
-  gboolean parsed_framerate;
+  gboolean framerate_from_caps;
   /* AU state */
   gboolean picture_start;