videoparsers: adjust to standardized baseparse frame state tracking

This commit is contained in:
Mark Nauwelaerts 2012-02-15 11:59:37 +01:00
parent ca5010cc4b
commit b8a78c6b37
3 changed files with 3 additions and 18 deletions

View file

@ -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");
}

View file

@ -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");
}

View file

@ -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");
}