convert video api to registered controller

This commit is contained in:
Tim Bentley 2012-10-25 20:38:12 +01:00
parent e24c588df3
commit 34b4828c30
3 changed files with 5 additions and 3 deletions

View File

@ -350,7 +350,7 @@ class MediaController(object):
"""
player.resize(display)
def video(self, controller, serviceItem, muted, isBackground,
def video(self, source, serviceItem, muted, isBackground,
hidden=False):
"""
Loads and starts a video to run with the option of sound
@ -369,6 +369,7 @@ class MediaController(object):
"""
log.debug(u'video')
isValid = False
controller = self.displayControllers[source]
# stop running videos
self.media_reset(controller)
controller.media_info = MediaInfo()

View File

@ -1355,7 +1355,8 @@ class SlideController(DisplayController):
Respond to the arrival of a media service item
"""
log.debug(u'SlideController onMediaStart')
self.mediaController.video(self, item, False, False, self.hideMode())
self.mediaController.video(self.controllerType, item, False, False, \
self.hideMode())
if not self.isLive:
self.previewDisplay.show()
self.slidePreview.hide()

View File

@ -175,7 +175,7 @@ class MediaMediaItem(MediaManagerItem):
(path, name) = os.path.split(filename)
service_item.add_from_command(path, name,CLAPPERBOARD)
if self.plugin.liveController.mediaController.video(
self.plugin.liveController, service_item, True, True):
DisplayControllerType.Live, service_item, True, True):
self.resetAction.setVisible(True)
else:
critical_error_message_box(UiStrings().LiveBGError,