forked from openlp/openlp
Temporary workaround for VLC
This commit is contained in:
parent
d42a7118c0
commit
d95b4343b5
@ -161,33 +161,35 @@ class VlcPlayer(MediaPlayer):
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
vlc = get_vlc()
|
vlc = get_vlc()
|
||||||
output_display.vlc_widget = QtWidgets.QFrame(output_display)
|
# Temporary workaround
|
||||||
output_display.vlc_widget.setFrameStyle(QtWidgets.QFrame.NoFrame)
|
if vlc:
|
||||||
# creating a basic vlc instance
|
output_display.vlc_widget = QtWidgets.QFrame(output_display)
|
||||||
command_line_options = '--no-video-title-show'
|
output_display.vlc_widget.setFrameStyle(QtWidgets.QFrame.NoFrame)
|
||||||
if Settings().value('advanced/hide mouse') and live_display:
|
# creating a basic vlc instance
|
||||||
command_line_options += ' --mouse-hide-timeout=0'
|
command_line_options = '--no-video-title-show'
|
||||||
output_display.vlc_instance = vlc.Instance(command_line_options)
|
if Settings().value('advanced/hide mouse') and live_display:
|
||||||
# creating an empty vlc media player
|
command_line_options += ' --mouse-hide-timeout=0'
|
||||||
output_display.vlc_media_player = output_display.vlc_instance.media_player_new()
|
output_display.vlc_instance = vlc.Instance(command_line_options)
|
||||||
output_display.vlc_widget.resize(output_display.size())
|
# creating an empty vlc media player
|
||||||
output_display.vlc_widget.raise_()
|
output_display.vlc_media_player = output_display.vlc_instance.media_player_new()
|
||||||
output_display.vlc_widget.hide()
|
output_display.vlc_widget.resize(output_display.size())
|
||||||
# The media player has to be 'connected' to the QFrame.
|
output_display.vlc_widget.raise_()
|
||||||
# (otherwise a video would be displayed in it's own window)
|
output_display.vlc_widget.hide()
|
||||||
# This is platform specific!
|
# The media player has to be 'connected' to the QFrame.
|
||||||
# You have to give the id of the QFrame (or similar object)
|
# (otherwise a video would be displayed in it's own window)
|
||||||
# to vlc, different platforms have different functions for this.
|
# This is platform specific!
|
||||||
win_id = int(output_display.vlc_widget.winId())
|
# You have to give the id of the QFrame (or similar object)
|
||||||
if is_win():
|
# to vlc, different platforms have different functions for this.
|
||||||
output_display.vlc_media_player.set_hwnd(win_id)
|
win_id = int(output_display.vlc_widget.winId())
|
||||||
elif is_macosx():
|
if is_win():
|
||||||
# We have to use 'set_nsobject' since Qt5 on OSX uses Cocoa
|
output_display.vlc_media_player.set_hwnd(win_id)
|
||||||
# framework and not the old Carbon.
|
elif is_macosx():
|
||||||
output_display.vlc_media_player.set_nsobject(win_id)
|
# We have to use 'set_nsobject' since Qt5 on OSX uses Cocoa
|
||||||
else:
|
# framework and not the old Carbon.
|
||||||
# for Linux/*BSD using the X Server
|
output_display.vlc_media_player.set_nsobject(win_id)
|
||||||
output_display.vlc_media_player.set_xwindow(win_id)
|
else:
|
||||||
|
# for Linux/*BSD using the X Server
|
||||||
|
output_display.vlc_media_player.set_xwindow(win_id)
|
||||||
self.has_own_widget = True
|
self.has_own_widget = True
|
||||||
|
|
||||||
def check_available(self):
|
def check_available(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user