forked from openlp/openlp
Fix playback of videos with vlc in preview window on OSX.
This commit is contained in:
parent
39f249647c
commit
15d031eec1
@ -136,7 +136,9 @@ class VlcPlayer(MediaPlayer):
|
|||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
display.vlcMediaPlayer.set_hwnd(int(display.vlcWidget.winId()))
|
display.vlcMediaPlayer.set_hwnd(int(display.vlcWidget.winId()))
|
||||||
elif sys.platform == "darwin":
|
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:
|
else:
|
||||||
# for Linux using the X Server
|
# for Linux using the X Server
|
||||||
display.vlcMediaPlayer.set_xwindow(int(display.vlcWidget.winId()))
|
display.vlcMediaPlayer.set_xwindow(int(display.vlcWidget.winId()))
|
||||||
@ -215,9 +217,11 @@ class VlcPlayer(MediaPlayer):
|
|||||||
display.vlcMediaPlayer.set_time(seekVal)
|
display.vlcMediaPlayer.set_time(seekVal)
|
||||||
|
|
||||||
def reset(self, display):
|
def reset(self, display):
|
||||||
display.vlcMediaPlayer.stop()
|
# FIXME Reset causes that OpenLP stops responding on OS X.
|
||||||
display.vlcWidget.setVisible(False)
|
#display.vlcMediaPlayer.stop()
|
||||||
self.state = MediaState.Off
|
#display.vlcWidget.setVisible(False)
|
||||||
|
#self.state = MediaState.Off
|
||||||
|
pass
|
||||||
|
|
||||||
def set_visible(self, display, status):
|
def set_visible(self, display, status):
|
||||||
if self.hasOwnWidget:
|
if self.hasOwnWidget:
|
||||||
|
Loading…
Reference in New Issue
Block a user