From 3c22fb611bdbc9bc3a768264ea3e8b726d2c231c Mon Sep 17 00:00:00 2001 From: Josep Torra Date: Fri, 7 Aug 2009 18:17:28 +0200 Subject: mpegpsdemux: improved demuxer performance Increased performance doing pull_range in blocks of 32Kb instead of 4Kb. Caching the value of gst_adapter_available instead of calling it 3 times. Added some comments with the header descriptions. Peek enough data to avoid a corner case where could be readed data outside the buffer. Speed up some more inlining some functions and keeping another stream pointer list to be used as iterator. Sprinkle branch prediction macros accross the code. Handling the seeking with flush in pull mode in the proper way. --- gst/mpegdemux/gstmpegdemux.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gst/mpegdemux/gstmpegdemux.h') diff --git a/gst/mpegdemux/gstmpegdemux.h b/gst/mpegdemux/gstmpegdemux.h index 29b3d5e5..a8822350 100644 --- a/gst/mpegdemux/gstmpegdemux.h +++ b/gst/mpegdemux/gstmpegdemux.h @@ -101,6 +101,7 @@ struct _GstFluPSDemux GstPad *sinkpad; gboolean random_access; /* If we operate in pull mode */ + gboolean flushing; GstAdapter *adapter; GstAdapter *rev_adapter; @@ -136,6 +137,8 @@ struct _GstFluPSDemux guint64 next_pts; guint64 next_dts; GstFluPSStream **streams; + GstFluPSStream **streams_found; + gint found_count; gboolean need_no_more_pads; /* Indicates an MPEG-2 stream */ -- cgit v1.2.1