Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Anderson <tony_anderson@usa.net>2009-09-02 06:05:54 (GMT)
committer Tony Anderson <tony_anderson@usa.net>2009-09-02 06:05:54 (GMT)
commitc6c49e76c9d4c1220ac9b7161e2e05cd6467d41a (patch)
tree2174ab2d71162c414e047a8bd233b0ab9f1532ef
parent22e47adaff12b7d1b916240cf62f98261606973c (diff)
fix problem with thumbnail display and problem with record/play
-rw-r--r--listview.py3
-rw-r--r--showntell.py2
-rw-r--r--slideshow.py1
-rw-r--r--textarea.py22
4 files changed, 18 insertions, 10 deletions
diff --git a/listview.py b/listview.py
index 73dd3b2..623558b 100644
--- a/listview.py
+++ b/listview.py
@@ -94,6 +94,5 @@ class Listview(gtk.VBox):
print 'object filename', path(fn).exists(), fn
self.deck.addSlide(fn)
self.deck.reload()
- for object in ds_objects:
- object.destroy()
+ object.destroy()
self.activity.set_screen(0)
diff --git a/showntell.py b/showntell.py
index bf7793f..34a82e6 100644
--- a/showntell.py
+++ b/showntell.py
@@ -89,7 +89,7 @@ class ShowNTell(activity.Activity):
# Set up Main Viewer box
self.__main_view_box = gtk.VBox()
self.__slide = slideviewer.SlideViewer(self.__deck, self.__renderer)
- self.__text_area = textarea.TextArea(self.__deck)
+ self.__text_area = textarea.TextArea(self.__deck, self.__work_path)
self.__image_chooser = listview.Listview(self, self.__deck)
self.__slideshow_chooser = cpxoview.Cpxoview(self, self.__deck)
self.__html_slide = gtk.EventBox()
diff --git a/slideshow.py b/slideshow.py
index 78f4488..e5c25fa 100644
--- a/slideshow.py
+++ b/slideshow.py
@@ -143,6 +143,7 @@ class Deck(gobject.GObject):
self.__nslides = len(self.__slides)
self.__logger.debug(str(self.__nslides) + " slides in show")
self.goToIndex(0, is_local=False)
+ self.emit('deck-changed')
print 'deck reloaded'
def save(self, path=None):
diff --git a/textarea.py b/textarea.py
index a322f26..2862b0a 100644
--- a/textarea.py
+++ b/textarea.py
@@ -32,14 +32,17 @@ import pygst
pygst.require("0.10")
import gst
+AUDIOPATH = path(activity.get_activity_root()) / 'data' / 'temp.wav'
+
class TextArea(gtk.HBox):
# Constructor
- def __init__(self, deck):
+ def __init__(self, deck, work_path):
gtk.HBox.__init__(self)
self.__logger = logging.getLogger('TextArea')
self.__deck = deck
+ self.__work_path = work_path
self.__text_area = gtk.Entry()
self.render_text_area()
self.__deck.connect('slide-redraw', self.update_text)
@@ -69,7 +72,7 @@ class TextArea(gtk.HBox):
"""
#initialize convert pipeline
- p = "filesrc location=/tmp/temp.wav ! wavparse "
+ p = "filesrc location=" + AUDIOPATH + " ! wavparse "
p = p + "! audioconvert ! vorbisenc ! oggmux "
p = p + "! filesink location="
self.__pipeline = p
@@ -107,10 +110,15 @@ class TextArea(gtk.HBox):
subprocess.call("killall -q arecord", shell=True)
n = self.__deck.getIndex()
self.__audiofile = self.__deck.getSlideClip(n)
- if path(self.__audiofile).exists():
- subprocess.call("rm -rf " + str(self.__audiofile), shell=True)
+ if self.__audiofile == False:
+ self.__audiofile = self.__deck.get_SlideTitle() + '.ogg'
+ audiofile = self.__work_path / 'deck' / self.__audiofile
+ print 'audiofile', n, audiofile
+ if audiofile.exists():
+ subprocess.call("rm -rf " + str(audiofile), shell=True)
+ self.__deck.setSlideClip(audiofile.name, n)
#convert to ogg file
- pipeline = self.__pipeline + self.__audiofile
+ pipeline = self.__pipeline + audiofile
subprocess.call("gst-launch-0.10 " + pipeline, shell=True)
subprocess.call("amixer cset numid=11 off", shell = True)
#reset mic boost
@@ -120,10 +128,10 @@ class TextArea(gtk.HBox):
print 'turn on mic boost'
subprocess.call("amixer cset numid=11 on", shell=True)
#self.__fileout.set_property("location", self.__audiofile)
- #self.__source.set_property("location", "/tmp/temp.wav")
+ #self.__source.set_property("location", AUDIOPATH)
#self.__player.set_state(gst.STATE_PLAYING)
print 'recording started'
- self.__pid=subprocess.Popen("arecord -f cd /tmp/temp.wav", shell=True)
+ self.__pid=subprocess.Popen("arecord -f cd " + AUDIOPATH, shell=True)
# Play Audio Clip
def play(self, button):