playbin2 and mpeg2 elementary stream: perfomance issue

Christophe Oosterlynck tiftof at gmail.com
Fri Nov 16 07:50:03 PST 2012


It seems that gstreamer 1.0 plays my clip smoothly without a queue between
filesrc and mpegvideoparse. I tried finding out which patch could have
solved my issue. I thought it was bug 672701 [1] but the patch for this is
already in 0.10 branch and I still have the problem when using the HEAD of
0.10 branch.

I have attached profiling results to this mail:
callgrind.out.noqueue = gstreamer-0.10 and no queue between filesrc and
mpegvideoparse = slow
callgrind.out.queue = gstreamer-0.10 and queue between filesrc and
mpegvideoparse = smooth
callgrind.out.1.0 = gstreamer-1.0 and no queue between filesrc and
mpegvideoparse = smooth

[1] https://bugzilla.gnome.org/show_bug.cgi?id=672701

Any other ideas how this might have been solved in the 1.0 version? I would
like to backport the fix to 0.10 as I'm using QtMobility which uses
gstreamer-0.10.

Thanks,

Christophe


On Wed, Nov 14, 2012 at 4:40 PM, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:

> 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
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20121116/8011d5a5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: callgrind.out.tar.gz
Type: application/x-gzip
Size: 479665 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20121116/8011d5a5/attachment-0001.bin>


More information about the gstreamer-devel mailing list