KDE4 power consumption issues
Matthias Kretz
kretz at kde.org
Mon Nov 12 16:24:08 GMT 2007
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 at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071112/bea6f686/attachment.sig>
More information about the kde-core-devel
mailing list