Tim Bentley has proposed merging lp:~openlp-core/openlp/video into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Lets see what this looks like.
Cleaned up the video tree and brought it up to date.
Made the Plugin work like the others
Added Toolbar options for live
Play , Pause , Stop work
New track plays the original.
--
https://code.launchpad.net/~openlp-core/openlp/video/+merge/14288
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py 2009-10-25 16:26:03 +
+++ openlp/core/lib/__init__.py 2009-11-01 19:45:24 +
@@ -137,7 +137,7 @@
from mediamanageritem import MediaManagerItem
from xmlrootclass import XmlRootClass
from serviceitem import ServiceItem
-from serviceitem import ServiceType
+from serviceitem import ServiceItemType
from serviceitem import ServiceItem
from toolbar import OpenLPToolbar
from dockwidget import OpenLPDockWidget
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2009-10-31 20:27:08 +
+++ openlp/core/lib/mediamanageritem.py 2009-11-01 19:45:24 +
@@ -388,7 +388,8 @@
if self.ServiceItemIconName is not None:
service_item.addIcon(self.ServiceItemIconName)
else:
-service_item.addIcon(self.icon)
+service_item.addIcon(
+u':/media/media_' + self.PluginNameShort.lower() + u'.png')
if self.generateSlideData(service_item):
self.ListView.clearSelection()
return service_item
=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py 2009-10-29 09:18:26 +
+++ openlp/core/lib/serviceitem.py 2009-11-01 19:45:24 +
@@ -30,13 +30,14 @@
from openlp.core.lib import buildIcon
-class ServiceType(object):
+class ServiceItemType(object):
Defines the type of service item
Text = 1
Image = 2
Command = 3
+Video = 4
class ServiceItem(object):
@@ -91,7 +92,7 @@
log.debug(u'Render called')
self.frames = []
-if self.service_item_type == ServiceType.Text:
+if self.service_item_type == ServiceItemType.Text:
log.debug(u'Formatting slides')
if self.theme is None:
self.RenderManager.set_override_theme(None)
@@ -109,9 +110,9 @@
self.frames.append({u'title': title, u'text': lines,
u'image': frame})
log.info(u'Formatting took %4s' % (time.time() - before))
-elif self.service_item_type == ServiceType.Command:
+elif self.service_item_type == ServiceItemType.Command:
self.frames = self.service_frames
-elif self.service_item_type == ServiceType.Image:
+elif self.service_item_type == ServiceItemType.Image:
for slide in self.service_frames:
slide[u'image'] = \
self.RenderManager.resize_image(slide[u'image'])
@@ -148,10 +149,16 @@
``image``
The actual image file name.
-self.service_item_type = ServiceType.Image
-self.service_item_path = path
-self.service_frames.append(
-{u'title': frame_title, u'text':None, u'image': image})
+self.service_item_type = ServiceItemType.Image
+self.service_item_path = path
+self.service_frames.append(
+{u'title': frame_title, u'text': None, u'image': image})
+
+def add_from_media(self, path, frame_title, image):
+self.service_item_type = ServiceItemType.Video
+self.service_item_path = path
+self.service_frames.append(
+{u'title': frame_title, u'text': None, u'image': image})
def add_from_text(self, frame_title, raw_slide):
@@ -163,7 +170,7 @@
``raw_slide``
The raw text of the slide.
-self.service_item_type = ServiceType.Text
+self.service_item_type = ServiceItemType.Text
frame_title = frame_title.split(u'\n')[0]
self.service_frames.append(
{u'title': frame_title, u'raw_slide': raw_slide})
@@ -178,7 +185,7 @@
``command``
The command of/for the slide.
-self.service_item_type = ServiceType.Command
+self.service_item_type = ServiceItemType.Command
self.service_item_path = path
self.service_frames.append(
{u'title': frame_title, u'command': None, u'text':None, u'image': image})
@@ -199,13 +206,16 @@
u'audit':self.audit
}
service_data = []
-if self.service_item_type == ServiceType.Text:
+if self.service_item_type == ServiceItemType.Text:
for slide in self.service_frames:
service_data.append(slide)
-elif self.service_item_type == ServiceType.Image:
-for slide in self.service_frames:
-