summaryrefslogtreecommitdiff
path: root/gst-libs/gst/codecs/gsth264picture.c
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@intel.com>2021-07-20 23:49:12 +0800
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-07-21 15:23:17 +0000
commit573d3f5ba5725b59aeb245eed4a673aa39504d54 (patch)
treef4633e1584e7ed2d88b442ad477b8f3b13123131 /gst-libs/gst/codecs/gsth264picture.c
parentbe223ad316bbd044dd9e3ea51e33b53edcd00b2b (diff)
downloadgstreamer-plugins-bad-573d3f5ba5725b59aeb245eed4a673aa39504d54.tar.gz
codecs: h264dec: Add help function of dpb_set_max_num_reorder_frames.
The max_num_reorder_frames can be useful for bump check. We store it in the DPB and no need for the decoder now. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2373>
Diffstat (limited to 'gst-libs/gst/codecs/gsth264picture.c')
-rw-r--r--gst-libs/gst/codecs/gsth264picture.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gst-libs/gst/codecs/gsth264picture.c b/gst-libs/gst/codecs/gsth264picture.c
index 417986c62..a824b785a 100644
--- a/gst-libs/gst/codecs/gsth264picture.c
+++ b/gst-libs/gst/codecs/gsth264picture.c
@@ -108,6 +108,7 @@ struct _GstH264Dpb
GArray *pic_list;
gint max_num_frames;
gint num_output_needed;
+ guint32 max_num_reorder_frames;
gint32 last_output_poc;
gboolean interlaced;
@@ -240,6 +241,24 @@ gst_h264_dpb_clear (GstH264Dpb * dpb)
}
/**
+ * gst_h264_dpb_set_max_num_reorder_frames:
+ * @dpb: a #GstH264Dpb
+ * @max_num_reorder_frames: the max number of reorder frames, which
+ * should not exceed the max size of DPB.
+ *
+ * Since: 1.20
+ */
+void
+gst_h264_dpb_set_max_num_reorder_frames (GstH264Dpb * dpb,
+ guint32 max_num_reorder_frames)
+{
+ g_return_if_fail (dpb != NULL);
+ g_return_if_fail (max_num_reorder_frames <= dpb->max_num_frames);
+
+ dpb->max_num_reorder_frames = max_num_reorder_frames;
+}
+
+/**
* gst_h264_dpb_add:
* @dpb: a #GstH264Dpb
* @picture: (transfer full): a #GstH264Picture