[vlc-devel] [PATCH] Fixed PyQt example for MacOS X platform.
Jean-Baptiste Kempf
jb at videolan.org
Fri Oct 18 01:06:47 CEST 2013
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 +++++--
> 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
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
Best regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list