From 4411a4e00f7a3274cad5aebaa541cfd8f8b68fe8 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Mon, 12 Jul 2021 00:01:58 +0800 Subject: codecs: h264dec: Make dpb_has_empty_frame_buffer a codecs API. Part-of: --- gst-libs/gst/codecs/gsth264picture.c | 10 +++++++++- gst-libs/gst/codecs/gsth264picture.h | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'gst-libs/gst') diff --git a/gst-libs/gst/codecs/gsth264picture.c b/gst-libs/gst/codecs/gsth264picture.c index b5a1de5f1..0f23455a2 100644 --- a/gst-libs/gst/codecs/gsth264picture.c +++ b/gst-libs/gst/codecs/gsth264picture.c @@ -587,7 +587,15 @@ gst_h264_dpb_get_picture (GstH264Dpb * dpb, guint32 system_frame_number) return NULL; } -static gboolean +/** + * gst_h264_dpb_has_empty_frame_buffer: + * @dpb: a #GstH264Dpb + * + * Returns: %TRUE if @dpb still has empty frame buffers. + * + * Since: 1.20 + */ +gboolean gst_h264_dpb_has_empty_frame_buffer (GstH264Dpb * dpb) { if (!dpb->interlaced) { diff --git a/gst-libs/gst/codecs/gsth264picture.h b/gst-libs/gst/codecs/gsth264picture.h index bdf99b5b0..5bedfe132 100644 --- a/gst-libs/gst/codecs/gsth264picture.h +++ b/gst-libs/gst/codecs/gsth264picture.h @@ -278,6 +278,9 @@ GstH264Picture * gst_h264_dpb_get_picture (GstH264Dpb * dpb, GST_CODECS_API gint gst_h264_dpb_get_size (GstH264Dpb * dpb); +GST_CODECS_API +gboolean gst_h264_dpb_has_empty_frame_buffer (GstH264Dpb * dpb); + GST_CODECS_API gboolean gst_h264_dpb_needs_bump (GstH264Dpb * dpb, guint32 max_num_reorder_frames, -- cgit v1.2.1