Hello!
In Qt4, Phonon's AudioOutput-class inherits QObject and MediaNode:
http://doc.trolltech.com/4.4/phonon-audiooutput.html
In PyKDE4, AudioOutput does NOT inherit MediaNode, as you can easily
find out is you try something like this:

from PyKDE4.phonon import *
audiooutput = Phonon.AudioOutput(Phonon.MusicCategory)
print audiooutput.isValid()

This will throw an "AttributeError: isValid", but AudioOutput should have
inherited the isValid()-method from MediaNode. Because AudioOutput is
not a subclass of MediaNode, It's not possible to do something like this:

m_media = Phonon.MediaObject()
audioOutput = Phonon.AudioOutput(Phonon.MusicCategory)
Phonon.createPath(m_media,audioOutput)

The code above doesn't work. There is a "TypeError: argument 2 of
createPath() has an invalid type", because both arguments need to
be a (sub)class of MediaNode. MediaObject is, but AudioOutput isn't.

I'm fairly sure this is a bug and it needs to be fixed, but is there any
way to get around this problem at the moment?

I tried subclassing them:

class AudioOutput2(Phonon.AudioOutput,Phonon.MediaNode):
        def __init__(self,category=None,parent=None):
                Phonon.AudioOutput.__init__(self,category,parent)
                Phonon.MediaNode.__init__(self)

But now i'm getting something like this:

    Phonon.createPath(m_media,audioOutput)
SystemError: error return without exception set

Can anyone help me?

Thanks in advance,
Jan Holthuis

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to