Phonon backend plugin development

Thiago Macieira thiago at
Wed Jul 22 07:55:39 BST 2009

Harry Liebel wrote:
>I am trying to create a new backend. I have a set of multimedia
> libraries that I am trying to wrap up in a plugin. I have had some
> success and some problems.
>I am more of a C driver person so I may be making bad assumptions and
>obvious mistakes :-)

Hi Harry

Does this mean you're rather unfamiliar with Qt?

>What happens:
>I can start the mediaplayer app and select a media file to play. It
> starts playing full screen. If I move
>the mouse the app crashes and I get :
>ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to
>objects owned by a different thread. Current thread 84f2ee0. Receiver ''
> (of type 'QSocketNotifier') was created in thread 805e6b8"

Look at the backtrace when this failed assertion happens to find out what 
caused it.

I doubt you're using sendEvent directly, so it's more likely you're 
accessing a QObject outside its creation thread. Please understand that 
any and every QObject is attached to the thread it is created in (unless 
you move it), and that's the only thread you can call Qt functions in.

More importantly, objects derived from QWidget can only be created in the 
GUI thread.

>Currently I use the 'setsource' call to call the library
>init(<path-to-file>). When I do not call init() the mediaplayer app does
> not crash. It looks like the init() spawns a seperate thread in the
> background. I have tried to put the library init() in a Qthread, but it
> crashes in the same way.
>I have read that QT does not like to send/receive events from threads
> that are not under its control. This I can understand. Is there a easy
> way to wrap up a 'library thread' so QT does not try to send/receive
> events? Do I need to wrap the library up in a Qprocess?

Sending from threads not created with QThread should not be a problem.

Can you post your backtrace?
  Thiago Macieira  -  thiago (AT) - thiago (AT)
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- 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: <>
-------------- next part --------------
kde-multimedia mailing list
kde-multimedia at

More information about the kde-multimedia mailing list