gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] Burning 100% CPU time: MediaParser/FLVParser never pauses


From: John Gilmore
Subject: [Gnash-dev] Burning 100% CPU time: MediaParser/FLVParser never pauses
Date: Thu, 05 Aug 2010 19:07:32 -0700

When there's no media to parse (_parsingComplete) is true, the media
thread loops forever, doing 100 usec nanosleeps and nothing else.
Instead it should wait to be restarted by the main thread when some
other media needs parsing.

It is in this state after a YouTube video finishes, for example.

It's a straight loop from MediaParser::parserLoop to
FLVParser::parseNextChunk to FLVParser::parseNextTag, which returns
almost immediately if _parsingComplete is set.  And around we go again.

I'm not sure of the right place to insert the wait -- perhaps someone
who's groveled around in this code before could advise, or patch?

There's a routine called waitIfNeeded that isn't called in this loop.

The MediaParser.h file says parseNextChunk puts frames on the queue,
"which may trigger the thread to sleep when queues are full or parsing
completed", but that doesn't happen.

        John





reply via email to

[Prev in Thread] Current Thread [Next in Thread]