forked from openlp/openlp
Fixes
This commit is contained in:
parent
c43cdea8b1
commit
77ddd4f385
@ -284,6 +284,9 @@ class MediaController(object):
|
|||||||
"""
|
"""
|
||||||
After a new display is configured, all media related widget will be
|
After a new display is configured, all media related widget will be
|
||||||
created too
|
created too
|
||||||
|
|
||||||
|
``display``
|
||||||
|
Display on which the output is to be played
|
||||||
"""
|
"""
|
||||||
# clean up possible running old media files
|
# clean up possible running old media files
|
||||||
self.finalise()
|
self.finalise()
|
||||||
@ -298,6 +301,16 @@ class MediaController(object):
|
|||||||
player.setup(display)
|
player.setup(display)
|
||||||
|
|
||||||
def set_controls_visible(self, controller, value):
|
def set_controls_visible(self, controller, value):
|
||||||
|
"""
|
||||||
|
After a new display is configured, all media related widget will be
|
||||||
|
created too
|
||||||
|
|
||||||
|
``controller``
|
||||||
|
The controller on which controls act.
|
||||||
|
|
||||||
|
``value``
|
||||||
|
control name to be changed.
|
||||||
|
"""
|
||||||
# Generic controls
|
# Generic controls
|
||||||
controller.mediabar.setVisible(value)
|
controller.mediabar.setVisible(value)
|
||||||
if controller.isLive and controller.display:
|
if controller.isLive and controller.display:
|
||||||
@ -310,6 +323,12 @@ class MediaController(object):
|
|||||||
"""
|
"""
|
||||||
After Mainwindow changes or Splitter moved all related media widgets
|
After Mainwindow changes or Splitter moved all related media widgets
|
||||||
have to be resized
|
have to be resized
|
||||||
|
|
||||||
|
``display``
|
||||||
|
The display on which output is playing.
|
||||||
|
|
||||||
|
``player``
|
||||||
|
The player which is doing the playing.
|
||||||
"""
|
"""
|
||||||
player.resize(display)
|
player.resize(display)
|
||||||
|
|
||||||
@ -317,6 +336,18 @@ class MediaController(object):
|
|||||||
hidden=False):
|
hidden=False):
|
||||||
"""
|
"""
|
||||||
Loads and starts a video to run with the option of sound
|
Loads and starts a video to run with the option of sound
|
||||||
|
|
||||||
|
``serviceItem``
|
||||||
|
The player which is doing the playing
|
||||||
|
|
||||||
|
``muted``
|
||||||
|
The player which is doing the playing
|
||||||
|
|
||||||
|
``isBackground``
|
||||||
|
The player which is doing the playing
|
||||||
|
|
||||||
|
``hidden``
|
||||||
|
The player which is doing the playing
|
||||||
"""
|
"""
|
||||||
log.debug(u'video')
|
log.debug(u'video')
|
||||||
isValid = False
|
isValid = False
|
||||||
@ -327,7 +358,8 @@ class MediaController(object):
|
|||||||
controller.media_info.volume = 0
|
controller.media_info.volume = 0
|
||||||
else:
|
else:
|
||||||
controller.media_info.volume = controller.volumeSlider.value()
|
controller.media_info.volume = controller.volumeSlider.value()
|
||||||
controller.media_info.file_info = QtCore.QFileInfo(serviceItem.get_filename())
|
controller.media_info.file_info = \
|
||||||
|
QtCore.QFileInfo(serviceItem.get_filename())
|
||||||
controller.media_info.is_background = isBackground
|
controller.media_info.is_background = isBackground
|
||||||
display = None
|
display = None
|
||||||
#self.curDisplayMediaPlayer[u'current'] = serviceItem.name
|
#self.curDisplayMediaPlayer[u'current'] = serviceItem.name
|
||||||
|
@ -44,9 +44,9 @@ from openlp.core.ui.media import get_media_players, set_media_players
|
|||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
CLAPPERBOARD = u':/media/slidecontroller_multimedia.png'
|
CLAPPERBOARD = u':/media/slidecontroller_multimedia.png'
|
||||||
VIDEO = QtGui.QImage(u':/media/media_video.png')
|
VIDEO = build_icon(QtGui.QImage(u':/media/media_video.png'))
|
||||||
AUDIO = QtGui.QImage(u':/media/media_audio.png')
|
AUDIO = build_icon(QtGui.QImage(u':/media/media_audio.png'))
|
||||||
DVDICON = QtGui.QImage(u':/media/media_video.png')
|
DVDICON = build_icon(QtGui.QImage(u':/media/media_video.png'))
|
||||||
|
|
||||||
|
|
||||||
class MediaMediaItem(MediaManagerItem):
|
class MediaMediaItem(MediaManagerItem):
|
||||||
@ -215,8 +215,7 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
service_item.title = unicode(self.displayTypeComboBox.currentText())
|
service_item.title = unicode(self.displayTypeComboBox.currentText())
|
||||||
service_item.shortname = service_item.title
|
service_item.shortname = service_item.title
|
||||||
(path, name) = os.path.split(filename)
|
(path, name) = os.path.split(filename)
|
||||||
service_item.add_from_command(path, name,
|
service_item.add_from_command(path, name, CLAPPERBOARD)
|
||||||
u':/media/image_clapperboard.png')
|
|
||||||
# Start media and obtain the length
|
# Start media and obtain the length
|
||||||
if not self.plugin.mediaController.media_length(
|
if not self.plugin.mediaController.media_length(
|
||||||
self.mediaController, service_item):
|
self.mediaController, service_item):
|
||||||
@ -230,9 +229,6 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
service_item.will_auto_start = True
|
service_item.will_auto_start = True
|
||||||
# force a non-existent theme
|
# force a non-existent theme
|
||||||
service_item.theme = -1
|
service_item.theme = -1
|
||||||
frame = CLAPPERBOARD
|
|
||||||
(path, name) = os.path.split(filename)
|
|
||||||
service_item.add_from_command(path, name, frame)
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user