From b8a78c6b37211aa5b3e58cec56ed4aa7024c85b1 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Wed, 15 Feb 2012 11:59:37 +0100 Subject: [PATCH] videoparsers: adjust to standardized baseparse frame state tracking --- gst/videoparsers/gsth264parse.c | 7 +------ gst/videoparsers/gstmpeg4videoparse.c | 7 +------ gst/videoparsers/gstmpegvideoparse.c | 7 +------ 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index 4ba67e133b..f8d33fb604 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -639,10 +639,6 @@ gst_h264_parse_collect_nal (GstH264Parse * h264parse, const guint8 * data, return complete; } -/* FIXME move into baseparse, or anything equivalent; - * see https://bugzilla.gnome.org/show_bug.cgi?id=650093 */ -#define GST_BASE_PARSE_FRAME_FLAG_PARSING 0x10000 - static GstFlowReturn gst_h264_parse_handle_frame (GstBaseParse * parse, GstBaseParseFrame * frame, gint * skipsize) @@ -675,10 +671,9 @@ gst_h264_parse_handle_frame (GstBaseParse * parse, gst_h264_parse_negotiate (h264parse, NULL); /* avoid stale cached parsing state */ - if (!(frame->flags & GST_BASE_PARSE_FRAME_FLAG_PARSING)) { + if (frame->flags & GST_BASE_PARSE_FRAME_FLAG_NEW_FRAME) { GST_LOG_OBJECT (h264parse, "parsing new frame"); gst_h264_parse_reset_frame (h264parse); - frame->flags |= GST_BASE_PARSE_FRAME_FLAG_PARSING; } else { GST_LOG_OBJECT (h264parse, "resuming frame parsing"); } diff --git a/gst/videoparsers/gstmpeg4videoparse.c b/gst/videoparsers/gstmpeg4videoparse.c index aae6a8a4a0..d359439e43 100644 --- a/gst/videoparsers/gstmpeg4videoparse.c +++ b/gst/videoparsers/gstmpeg4videoparse.c @@ -357,10 +357,6 @@ gst_mpeg4vparse_process_sc (GstMpeg4VParse * mp4vparse, GstMpeg4Packet * packet, return FALSE; } -/* FIXME move into baseparse, or anything equivalent; - * see https://bugzilla.gnome.org/show_bug.cgi?id=650093 */ -#define GST_BASE_PARSE_FRAME_FLAG_PARSING 0x10000 - static GstFlowReturn gst_mpeg4vparse_handle_frame (GstBaseParse * parse, GstBaseParseFrame * frame, gint * skipsize) @@ -386,10 +382,9 @@ retry: } /* avoid stale cached parsing state */ - if (!(frame->flags & GST_BASE_PARSE_FRAME_FLAG_PARSING)) { + if (frame->flags & GST_BASE_PARSE_FRAME_FLAG_NEW_FRAME) { GST_LOG_OBJECT (mp4vparse, "parsing new frame"); gst_mpeg4vparse_reset_frame (mp4vparse); - frame->flags |= GST_BASE_PARSE_FRAME_FLAG_PARSING; } else { GST_LOG_OBJECT (mp4vparse, "resuming frame parsing"); } diff --git a/gst/videoparsers/gstmpegvideoparse.c b/gst/videoparsers/gstmpegvideoparse.c index dca3df5551..f0726b9606 100644 --- a/gst/videoparsers/gstmpegvideoparse.c +++ b/gst/videoparsers/gstmpegvideoparse.c @@ -472,19 +472,14 @@ get_frame_size (GstMpegvParse * mpvparse, GstBuffer * buf, GList * l_codoffsz) return -1; } -/* FIXME move into baseparse, or anything equivalent; - * see https://bugzilla.gnome.org/show_bug.cgi?id=650093 */ -#define GST_BASE_PARSE_FRAME_FLAG_PARSING 0x10000 - static inline void update_frame_parsing_status (GstMpegvParse * mpvparse, GstBaseParseFrame * frame) { /* avoid stale cached parsing state */ - if (!(frame->flags & GST_BASE_PARSE_FRAME_FLAG_PARSING)) { + if (frame->flags & GST_BASE_PARSE_FRAME_FLAG_NEW_FRAME) { GST_LOG_OBJECT (mpvparse, "parsing new frame"); gst_mpegv_parse_reset_frame (mpvparse); - frame->flags |= GST_BASE_PARSE_FRAME_FLAG_PARSING; } else { GST_LOG_OBJECT (mpvparse, "resuming frame parsing"); } -- 2.34.1