Video cleanup part1

This commit is contained in:
Tim Bentley 2009-11-01 16:06:59 +00:00
parent 70b04f5821
commit 6df0649fbc
3 changed files with 25 additions and 30 deletions

View File

@ -117,11 +117,6 @@ class ServiceItem(object):
slide[u'image'] = \
self.RenderManager.resize_image(slide[u'image'])
self.frames = self.service_frames
elif self.service_item_type == ServiceItemType.Video:
for slide in self.service_frames:
slide[u'image'] = \
self.RenderManager.resize_image(slide[u'image'])
self.frames = self.service_frames
else:
log.error(u'Invalid value renderer :%s' % self.service_item_type)

View File

@ -294,7 +294,7 @@ class SlideController(QtGui.QWidget):
#More than 20 verses hard luck
pass
self.Songbar.setVisible(True)
elif item.service_item_type == ServiceType.Image:
elif item.service_item_type == ServiceItemType.Image:
#Not sensible to allow loops with 1 frame
if len(item.frames) > 1:
self.Toolbar.makeWidgetsVisible(self.image_list)
@ -444,7 +444,7 @@ class SlideController(QtGui.QWidget):
if row > -1 and row < self.PreviewListWidget.rowCount():
if self.commandItem.service_item_type == ServiceItemType.Command:
Receiver().send_message(u'%s_slide'% self.commandItem.name.lower(), [row])
if isLive:
if self.isLive:
QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
else:
frame = self.serviceitem.frames[row][u'image']

View File

@ -91,31 +91,31 @@ class MediaMediaItem(MediaManagerItem):
#service_item.add_from_image(path, name, frame)
print path
print name
service_item.add_from_media(path, name, frame)
service_item.add_from_command(path, name, frame)
return True
def onPreviewClick(self):
log.debug(u'Media Preview Button pressed')
items = self.ListView.selectedIndexes()
for item in items:
baseItem = self.ListView.item(item.row())
itemText = unicode(baseItem.data(QtCore.Qt.UserRole).toString())
print itemText
def onLiveClick(self):
log.debug(u'Media Live Button pressed')
items = self.ListView.selectedIndexes()
if len(items) > 0:
firstPass = True
for item in items:
baseItem = self.ListView.item(item.row())
filename = unicode(baseItem.data(QtCore.Qt.UserRole).toString())
if firstPass:
self.MainDisplay.queueMedia(filename, firstPass)
firstPass = False
else:
self.MainDisplay.queueMedia(filename, firstPass)
self.MainDisplay.playMedia()
# def onPreviewClick(self):
# log.debug(u'Media Preview Button pressed')
# items = self.ListView.selectedIndexes()
# for item in items:
# baseItem = self.ListView.item(item.row())
# itemText = unicode(baseItem.data(QtCore.Qt.UserRole).toString())
# print itemText
#
# def onLiveClick(self):
# log.debug(u'Media Live Button pressed')
# items = self.ListView.selectedIndexes()
# if len(items) > 0:
# firstPass = True
# for item in items:
# baseItem = self.ListView.item(item.row())
# filename = unicode(baseItem.data(QtCore.Qt.UserRole).toString())
# if firstPass:
# self.MainDisplay.queueMedia(filename, firstPass)
# firstPass = False
# else:
# self.MainDisplay.queueMedia(filename, firstPass)
# self.MainDisplay.playMedia()
def initialise(self):
self.ListView.setSelectionMode(