[PyQt] Newbie question - Quicktime

Hugo Léveillé hugol at fastmail.net
Wed Jul 7 11:14:12 BST 2010


Hey there

I tried it under windows XP and Mac osx 10.5. At least under OSX, i get
an error message that might help

WARNING: Phonon needs QCoreApplication::applicationName to be set to
export audio output names through the DBUS interface

I've added that line to my script, no more error but still a black
square with no video :(



On Wed, 07 Jul 2010 09:52 +0200, "Sebastian Elsner"
<sebastianelsner at freenet.de> wrote:
> Hey Hugo,
> 
> it's not working here either. But this might be because the backend is 
> not able to play it. Which OS are you on? I am on windows XP and I think 
> QT is not supported there for phonon. Start the capabilities app, which 
> comes with the pyqt phonon examples. There you can find what is 
> supported on you system.
> 
> Cheers
> 
> Sebastian
> 
> Am 07.07.2010 01:38, schrieb David Boddie:
> > On Wed Jul 7 00:13:43 BST 2010, Hugo Léveillé wrote:
> >
> >    
> >> Id like to have some pointer on how, if possible, to add a quicktime
> >> movie in pyqt.
> >>
> >> I guess I have to add it to a label ?
> >> How to you add it ( QtGui.QMovie ? )
> >>      
> > QMovie is an ancient class that basically plays animated GIF files and
> > some MNG files. To play video streams and files, you need to look at the
> > classes in the Phonon module.
> >
> > PyQt doesn't appear to have any Phonon examples written in Python and, from
> > memory, I think the only one supplied with Qt is actually a demo.
> >
> > This code came from an example I wrote for PyCon Italia last year:
> >
> > class Player(QWidget):
> >
> >      def __init__(self, parent = None):
> >
> >          QWidget.__init__(self, parent)
> >
> >          self.player = Phonon.VideoPlayer(Phonon.VideoCategory)
> >          urlLabel = QLabel(self.tr("&Location:"))
> >          self.urlEdit = QLineEdit()
> >          urlLabel.setBuddy(self.urlEdit)
> >          self.playButton = QPushButton(self.tr("&Play/Stop"))
> >
> >          self.connect(self.urlEdit, SIGNAL("returnPressed()"),
> >                       self.playButton, SLOT("animateClick()"))
> >          self.connect(self.playButton, SIGNAL("clicked()"),
> >                       self.play)
> >
> >          layout = QGridLayout(self)
> >          layout.addWidget(self.player, 0, 0, 2, 3)
> >          layout.addWidget(urlLabel, 2, 0)
> >          layout.addWidget(self.urlEdit, 2, 1)
> >          layout.addWidget(self.playButton, 2, 2)
> >
> >      def play(self):
> >
> >          if self.player.isPlaying():
> >              self.player.stop()
> >          else:
> >              url = QUrl(self.urlEdit.text())
> >              self.player.play(Phonon.MediaSource(url))
> >
> >
> > I hope you find it useful.
> >
> > David
> > _______________________________________________
> > PyQt mailing list    PyQt at riverbankcomputing.com
> > http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> >    
> 
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 


-- 
  Hugo Léveillé
  hugol at fastmail.net



More information about the PyQt mailing list