playbin2 and mpeg2 elementary stream: perfomance issue

Tim-Philipp Müller t.i.m at zen.co.uk
Wed Nov 14 07:40:47 PST 2012


On Wed, 2012-11-14 at 16:20 +0100, Christophe Oosterlynck wrote:

Hi,

> The fact that inserting a queue between the filesrc and the
> mpegvideoparse element solves my problem, is not relevant? I shouldn't
> be focussing on that but rather on performance issues in
> mpegvideoparse?

It is an interesting observation, because at first glance it seems
somewhat implausible. If you put a queue between filesrc and the parser,
you force the parser to operate in push mode rather than pull mode, so
the flow is going to be like:

   while (filesrc_read_data)
     mpeg_video_parse_chain ()

whereas if the parser operates in pull mode, it should be like:

   while (parser_pull_data_from_filesrc)
     mpeg_video_parse_chain ()

(Not necessarily literally, but in principle). Maybe the parser is
pulling way too small chunks from filesrc in one go, leading to lots of
buffer merging overhead, while filesrc reads larger buffers in one go?

It would be interesting to profile. There are also some patches in
bugzilla I think, but they apply to both modes of operation equally.

Not sure if 1.0 (no more 0.11) will make a huge difference, likely not -
but only one way to find out :) It would certainly increase the chances
of someone looking at profiling results or patches.

 Cheers
  -Tim



> On Wed, Nov 14, 2012 at 4:14 PM, Edward Hervey <bilboed at gmail.com>
> wrote:
>         On Wed, 2012-11-14 at 10:36 +0100, Christophe Oosterlynck
>         wrote:
>         > Hi,
>         
>         >
>         > The pipeline used by playbin2 is similar to:
>         > filesrc ! mpegvideoparse ! queue ! mpeg2dec ! xvimagesink
>         
>         
>         It actually has a queue before the sink (which is important,
>         because
>         otherwise you're throttling the mpeg2dec processing everytime
>         an
>         outputted frame needs to wait for its display time).
>         
>         None the less, various fixes (including performance ones) have
>         gone into
>         mpegvideoparse and other elements since that release.
>         
>         _______________________________________________
>         gstreamer-devel mailing list
>         gstreamer-devel at lists.freedesktop.org
>         http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list