[Top][All Lists]
[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
- [Gnash-dev] Burning 100% CPU time: MediaParser/FLVParser never pauses,
John Gilmore <=
- [Gnash-dev] Re: Burning 100% CPU time: MediaParser/FLVParser never pauses, John Gilmore, 2010/08/05
- Re: [Gnash-dev] Re: Burning 100% CPU time: MediaParser/FLVParser never pauses, strk, 2010/08/08
- Re: [Gnash-dev] Re: Burning 100% CPU time: MediaParser/FLVParser never pauses, strk, 2010/08/08
- Re: [Gnash-dev] Re: Burning 100% CPU time: MediaParser/FLVParser never pauses, John Gilmore, 2010/08/08
- Re: [Gnash-dev] Re: Burning 100% CPU time: MediaParser/FLVParser never pauses, strk, 2010/08/12
- Re: [Gnash-dev] Re: Burning 100% CPU time: MediaParser/FLVParser never pauses, strk, 2010/08/12
- Re: [Gnash-dev] Re: Burning 100% CPU time: MediaParser/FLVParser never pauses, Rob Savoye, 2010/08/12
- Re: [Gnash-dev] Re: Burning 100% CPU time: MediaParser/FLVParser never pauses, strk, 2010/08/13
- Re: [Gnash-dev] Re: Burning 100% CPU time: MediaParser/FLVParser never pauses, strk, 2010/08/13
- Re: [Gnash-dev] Re: Burning 100% CPU time: MediaParser/FLVParser never pauses, Rob Savoye, 2010/08/13