[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KDE4 power consumption issues
From: Matthias Kretz <kretz () kde ! org>
Date: 2007-11-12 16:24:08
Message-ID: 200711121724.08958.kretz () kde ! org
[Download RAW message or body]
On Sunday 11 November 2007, Olivier Goffart wrote:
> My guess is the problem is in Phonon.
to be more precise: in libxine. libphonon itself has no timers that I can
think of right now.
> The only thing I do is to keep a pointer to Phonon::MediaObject and
> Phonon::AudioOutput
Yes. Deleting those objects might help, but I'm not 100% sure. Though the
numbers will only go down 10s later (if at all) for reasons you don't want to
know.
Btw, I've seen worse numbers from xine. But basically the problem is that its
demuxer, decoder, and output threads are in a loop calling
xine_usec_sleep (5000);
whenever no new data is available. xine_usec_sleep uses nanosleep when
available and usleep otherwise:
#if HAVE_NANOSLEEP
/* nanosleep is prefered on solaris, because it's mt-safe */
struct timespec ts, remaining;
ts.tv_sec = usec / 1000000;
ts.tv_nsec = (usec % 1000000) * 1000;
while (nanosleep (&ts, &remaining) == -1 && errno == EINTR)
ts = remaining;
#else
# if WIN32
Sleep(usec / 1000);
# else
usleep(usec);
# endif
#endif
--
________________________________________________________
Matthias Kretz (Germany) <><
http://Vir.homelinux.org/
MatthiasKretz@gmx.net, kretz@kde.org,
Matthias.Kretz@urz.uni-heidelberg.de
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic