Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ui.py
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2008-07-01 18:48:07 (GMT)
committer Daniel Drake <dsd@laptop.org>2008-07-01 18:48:07 (GMT)
commit4c52afbb3da6e81fa9940ab78ce52b4ed5d38909 (patch)
treea17905a2b37e765a81c4e705b184b1beedd55a1a /ui.py
parent1d3d774aaeebb80721f87ab3451dac193de8bd03 (diff)
Pipeline rework
Move to a model where the pipeline core is fixed, and we can plug in photo and video bins to the tee element, and/or add an audiobin separated from the rest for recording audio. Fixes problems caused by not doing pad blocking and having unconnected elements lying around in the pipeline. Video recording is not quite working right... Audio and photo seem OK.
Diffstat (limited to 'ui.py')
-rw-r--r--ui.py32
1 files changed, 13 insertions, 19 deletions
diff --git a/ui.py b/ui.py
index 64786b2..ff99ebd 100644
--- a/ui.py
+++ b/ui.py
@@ -554,7 +554,7 @@ class UI:
self.moveWinOffscreen( self.liveVideoWindow )
elif (self.ca.m.MODE == Constants.MODE_VIDEO):
if (not self.LIVEMODE):
- self.moveWinOffscreen( self.playLiveWindow )
+ self.moveWinOffscreen( self.liveVideoWindow )
elif (self.ca.m.MODE == Constants.MODE_AUDIO):
if (not self.LIVEMODE):
self.moveWinOffscreen( self.liveVideoWindow )
@@ -862,7 +862,7 @@ class UI:
self.showLiveVideoTags()
self.LIVEMODE = True
- self.startLiveVideo( self.playLiveWindow, self.ca.glive.PIPETYPE_XV_VIDEO_DISPLAY_RECORD, False )
+ self.startLiveVideo( self.playLiveWindow, False )
self.updateVideoComponents()
@@ -927,11 +927,11 @@ class UI:
#set up the x & xv x-ition (if need be)
self.ca.gplay.stop()
if (self.ca.m.MODE == Constants.MODE_PHOTO):
- self.startLiveVideo( self.liveVideoWindow, self.ca.glive.PIPETYPE_XV_VIDEO_DISPLAY_RECORD, True )
+ self.startLiveVideo( self.liveVideoWindow, True )
elif (self.ca.m.MODE == Constants.MODE_VIDEO):
- self.startLiveVideo( self.playLiveWindow, self.ca.glive.PIPETYPE_XV_VIDEO_DISPLAY_RECORD, True )
+ self.startLiveVideo( self.liveVideoWindow, True )
elif (self.ca.m.MODE == Constants.MODE_AUDIO):
- self.startLiveVideo( self.liveVideoWindow, self.ca.glive.PIPETYPE_AUDIO_RECORD, True )
+ self.startLiveVideo( self.liveVideoWindow, True )
bottomKid = self.bottomCenter.get_child()
if (bottomKid != None):
@@ -944,19 +944,16 @@ class UI:
self.resetWidgetFadeTimer()
- def startLiveVideo(self, window, pipetype, force):
+ def startLiveVideo(self, window, force):
#We need to know which window and which pipe here
#if returning from another activity, active won't be false and needs to be to get started
- if (self.ca.glive.getPipeType() == pipetype
- and self.ca.glive.window == window
+ if (self.ca.glive.window == window
and self.ca.props.active
and not force):
return
- self.ca.glive.setPipeType( pipetype )
window.set_glive(self.ca.glive)
- self.ca.glive.stop()
self.ca.glive.play()
@@ -1352,7 +1349,7 @@ class UI:
pos.append({"position":"tmr", "window":self.progressWindow} )
elif (self.ca.m.MODE == Constants.MODE_VIDEO):
if (self.LIVEMODE):
- pos.append({"position":"img", "window":self.playLiveWindow} )
+ pos.append({"position":"img", "window":self.liveVideoWindow} )
pos.append({"position":"max", "window":self.maxWindow} )
pos.append({"position":"eye", "window":self.recordWindow} )
pos.append({"position":"prg", "window":self.progressWindow} )
@@ -1617,11 +1614,6 @@ class UI:
def showVideo( self, recd ):
- if (self.LIVEMODE):
- if (self.ca.glive.isXv()):
- self.ca.glive.setPipeType( self.ca.glive.PIPETYPE_X_VIDEO_DISPLAY )
- self.ca.glive.stop()
- self.ca.glive.play()
downloading = self.ca.requestMeshDownload(recd)
if (not downloading):
@@ -1641,12 +1633,15 @@ class UI:
if (not downloading):
mediaFilepath = recd.getMediaFilepath()
if (mediaFilepath != None):
+ self.ca.glive.stop()
videoUrl = "file://" + str( mediaFilepath )
self.ca.gplay.setLocation(videoUrl)
self.scrubWindow.doPlay()
ableToShowVideo = True
if (not ableToShowVideo):
+ # FIXME is this correct?
+ self.ca.glive.stop()
thumbFilepath = recd.getThumbFilepath( )
thumbUrl = "file://" + str( thumbFilepath )
self.ca.gplay.setLocation(thumbUrl)
@@ -1664,7 +1659,7 @@ class UI:
self.livePhotoCanvas.setImage( None )
elif (recd.type == Constants.TYPE_VIDEO):
self.ca.gplay.stop()
- self.startLiveVideo( self.playLiveWindow, self.ca.glive.PIPETYPE_XV_VIDEO_DISPLAY_RECORD, False )
+ self.startLiveVideo( self.playLiveWindow, False )
elif (recd.type == Constants.TYPE_AUDIO):
self.livePhotoCanvas.setImage( None )
self.startLiveAudio()
@@ -1679,7 +1674,6 @@ class UI:
self.ca.m.setUpdating(True)
self.ca.gplay.stop()
- self.ca.glive.setPipeType( self.ca.glive.PIPETYPE_AUDIO_RECORD )
self.liveVideoWindow.set_glive(self.ca.glive)
self.showLiveVideoTags()
@@ -2358,4 +2352,4 @@ class AudioToolbar(gtk.Toolbar):
def getDuration(self):
- return 60 * Constants.DURATIONS[self.durCb.combo.get_active()] \ No newline at end of file
+ return 60 * Constants.DURATIONS[self.durCb.combo.get_active()]