From adbe2a1b69af3050578701a5717cfe146c06775e Mon Sep 17 00:00:00 2001 From: Julien Moutte Date: Sat, 27 Oct 2007 08:20:59 +0000 Subject: gst/mpeg4videoparse/mpeg4videoparse.*: Improved version not damaging headers using a simple state machine. Original commit message from CVS: 2007-10-27 Julien MOUTTE * gst/mpeg4videoparse/mpeg4videoparse.c: (gst_mpeg4vparse_align), (gst_mpeg4vparse_drain), (gst_mpeg4vparse_chain), (gst_mpeg4vparse_sink_setcaps), (gst_mpeg4vparse_sink_event), (gst_mpeg4vparse_cleanup), (gst_mpeg4vparse_change_state), (gst_mpeg4vparse_dispose), (gst_mpeg4vparse_base_init), (gst_mpeg4vparse_class_init), (gst_mpeg4vparse_init), (plugin_init): * gst/mpeg4videoparse/mpeg4videoparse.h: Improved version not damaging headers using a simple state machine. --- gst/mpeg4videoparse/mpeg4videoparse.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gst/mpeg4videoparse/mpeg4videoparse.h') diff --git a/gst/mpeg4videoparse/mpeg4videoparse.h b/gst/mpeg4videoparse/mpeg4videoparse.h index 0fb434c3..94438ad2 100644 --- a/gst/mpeg4videoparse/mpeg4videoparse.h +++ b/gst/mpeg4videoparse/mpeg4videoparse.h @@ -40,6 +40,12 @@ G_BEGIN_DECLS typedef struct _GstMpeg4VParse GstMpeg4VParse; typedef struct _GstMpeg4VParseClass GstMpeg4VParseClass; +typedef enum { + PARSE_NEED_START, + PARSE_START_FOUND, + PARSE_VOP_FOUND +} GstMpeg4VParseState; + struct _GstMpeg4VParse { GstElement element; @@ -47,8 +53,9 @@ struct _GstMpeg4VParse { GstPad * srcpad; GstAdapter * adapter; + guint offset; - gboolean found_start; + GstMpeg4VParseState state; }; struct _GstMpeg4VParseClass { -- cgit v1.2.1