[vlc-devel] [PATCH] Fixed PyQt example for MacOS X platform.
Rafaël Carré
funman at videolan.org
Fri Oct 18 21:32:47 CEST 2013
Le 18/10/2013 01:06, Jean-Baptiste Kempf a écrit :
> LGTM.
> Thanks.
>
> On 17 Oct, Hendrik Buschmeier wrote :
>> * Draws the video onto the QWidget instead of only showing a
>> a black box.
>> * Uses QMacCocoaViewContainer instead of QFrame as videoframe
>> QWidget.
>> * Uses MediaPlayer's set_nsobject method instead of set_agl.
>> * Fixes spelling error in QWidget method being called.
>> ---
>> examples/qtvlc.py | 7 +++++--
You can call me stupid but I did not find in which repository this patch
should be applied.
>> 1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/examples/qtvlc.py b/examples/qtvlc.py
>> index 34aeedc..2d427e7 100755
>> --- a/examples/qtvlc.py
>> +++ b/examples/qtvlc.py
>> @@ -46,7 +46,10 @@ class Player(QtGui.QMainWindow):
>> self.setCentralWidget(self.widget)
>>
>> # In this widget, the video will be drawn
>> - self.videoframe = QtGui.QFrame()
>> + if sys.platform == "darwin": # for MacOS
>> + self.videoframe = QtGui.QMacCocoaViewContainer(0)
>> + else:
>> + self.videoframe = QtGui.QFrame()
>> self.palette = self.videoframe.palette()
>> self.palette.setColor (QtGui.QPalette.Window,
>> QtGui.QColor(0,0,0))
>> @@ -152,7 +155,7 @@ class Player(QtGui.QMainWindow):
>> elif sys.platform == "win32": # for Windows
>> self.mediaplayer.set_hwnd(self.videoframe.winId())
>> elif sys.platform == "darwin": # for MacOS
>> - self.mediaplayer.set_agl(self.videoframe.windId())
>> + self.mediaplayer.set_nsobject(self.videoframe.winId())
>> self.PlayPause()
>>
>> def setVolume(self, Volume):
>> --
>> 1.8.4
More information about the vlc-devel
mailing list