From 15d031eec16e4b9895a0c90499b2ca1ba4167449 Mon Sep 17 00:00:00 2001 From: Martin Zibricky Date: Sat, 18 Aug 2012 19:26:54 +0200 Subject: [PATCH] Fix playback of videos with vlc in preview window on OSX. --- openlp/core/ui/media/vlcplayer.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/openlp/core/ui/media/vlcplayer.py b/openlp/core/ui/media/vlcplayer.py index bf1e7a920..287b06a80 100644 --- a/openlp/core/ui/media/vlcplayer.py +++ b/openlp/core/ui/media/vlcplayer.py @@ -136,7 +136,9 @@ class VlcPlayer(MediaPlayer): if sys.platform == "win32": display.vlcMediaPlayer.set_hwnd(int(display.vlcWidget.winId())) elif sys.platform == "darwin": - display.vlcMediaPlayer.set_agl(int(display.vlcWidget.winId())) + # We have to use 'set_nsobject' since Qt4 on OSX uses Cocoa + # framework and not the old Carbon. + display.vlcMediaPlayer.set_nsobject(int(display.vlcWidget.winId())) else: # for Linux using the X Server display.vlcMediaPlayer.set_xwindow(int(display.vlcWidget.winId())) @@ -215,9 +217,11 @@ class VlcPlayer(MediaPlayer): display.vlcMediaPlayer.set_time(seekVal) def reset(self, display): - display.vlcMediaPlayer.stop() - display.vlcWidget.setVisible(False) - self.state = MediaState.Off + # FIXME Reset causes that OpenLP stops responding on OS X. + #display.vlcMediaPlayer.stop() + #display.vlcWidget.setVisible(False) + #self.state = MediaState.Off + pass def set_visible(self, display, status): if self.hasOwnWidget: