How to install phonon with macports on mac osx pyside

867 views Asked by At

I am trying to use phonon with pyside on mac. I want to be able to play quicktime movies in widgets on a desktop app with pyside.

I installed phonon, qt and pyside from source via macports

$ sudo port -s -v install phonon qt4-mac
$ sudo port -s -v install py27-pyside

I can confirm the installs as follows

$ port installed phonon qt4-mac
The following ports are currently installed:
  phonon @4.6.0_1 (active)
  qt4-mac @4.8.5_0 (active)

I found a simple bit of code to test this ..

import sys
from PySide import QtCore, QtGui
from PySide.phonon import Phonon

app = QtGui.QApplication(sys.argv)
testPlayer = Phonon.VideoPlayer()
testMedia = Phonon.MediaSource('/path/to/media/test_MOV.MOV')
testPlayer.load(testMedia)
testPlayer.play()
testPlayer.show()

sys.exit(app.exec_())

however i get the following errors when running the code in pycharm.

Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
WARNING: Phonon needs QCoreApplication::applicationName to be set to export audio output names through the DBUS interface 
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded 
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded 
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded 
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded 
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded 
WARNING: Phonon::createPath: Cannot connect  Phonon::MediaObject ( no objectName ) to  Phonon::AudioOutput ( no objectName ). 
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded 
WARNING: Phonon::createPath: Cannot connect  Phonon::MediaObject ( no objectName ) to  Phonon::VideoWidget ( no objectName ). 
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded 
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded 

It looks like the backend isn't working properly and phonon isn't connecting to quicktime? If this is the case ho do i fix this? how do i set the plugin path? -- i couldn't find information for this for osx.

Or alternatively is there another better way to play quicktimes with audio within pyside instead of phonon?

thanks in advance.

1

There are 1 answers

1
abdimuna On

Run the following commands, it seems those are listed, but not loaded

sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
sudo launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist