Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/glive.py
diff options
context:
space:
mode:
authorerikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-12-20 19:02:59 (GMT)
committer erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-12-20 19:02:59 (GMT)
commitd8b2eeabdbcdf71688dec07ece72723c43d5efde (patch)
tree774b7dd61ab12cd8a18194f4e5a9d3065a81601a /glive.py
parent86975b24bf574da0091db7a4fd3d950980a90bef (diff)
git-svn-id: http://mediamods.com/public-svn/camera-activity/tags/48@984 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'glive.py')
-rw-r--r--glive.py33
1 files changed, 19 insertions, 14 deletions
diff --git a/glive.py b/glive.py
index 194c4c9..35e5056 100644
--- a/glive.py
+++ b/glive.py
@@ -110,6 +110,8 @@ class Glive:
def play(self):
self.pipe().set_state(gst.STATE_PLAYING)
self.playing = True
+ import time
+ print("play...", int(time.time()))
def pause(self):
@@ -127,6 +129,9 @@ class Glive:
self._nextPipe()
self._NEXT_PIPETYPE = -1
+ import time
+ print("stop...", int(time.time()))
+
def is_playing(self):
return self.playing
@@ -171,11 +176,11 @@ class Glive:
movieQueue = pipeline.get_by_name("movieQueue_"+n)
movieFilesink = pipeline.get_by_name("movieFilesink_"+n)
- movieFilepath = os.path.join(Instance.tmpPath, "output.ogg" ) #ogv
+ movieFilepath = os.path.join(Instance.instancePath, "output.ogg" ) #ogv
movieFilesink.set_property("location", movieFilepath )
audioFilesink = pipeline.get_by_name('audioFilesink_'+n)
- audioFilepath = os.path.join(Instance.tmpPath, "output.wav")
+ audioFilepath = os.path.join(Instance.instancePath, "output.wav")
audioFilesink.set_property("location", audioFilepath )
audioTee = pipeline.get_by_name('audioTee_'+n)
audioWavenc = pipeline.get_by_name('audioWavenc_'+n)
@@ -207,7 +212,7 @@ class Glive:
videoTee.unlink(picQueue)
audioFilesink = pipeline.get_by_name('audioFilesink_'+n)
- audioFilepath = os.path.join(Instance.tmpPath, "output.wav")
+ audioFilepath = os.path.join(Instance.instancePath, "output.wav")
audioFilesink.set_property("location", audioFilepath )
elif (self._PIPETYPE == self.PIPETYPE_SUGAR_JHBUILD):
@@ -243,7 +248,7 @@ class Glive:
n = str(len(self.thumbPipes)-1)
thumbline.get_by_name( "thumbFakesink_"+n ).disconnect( self.THUMB_HANDOFF )
- oggFilepath = os.path.join(Instance.tmpPath, "output.ogg" ) #ogv
+ oggFilepath = os.path.join(Instance.instancePath, "output.ogg" ) #ogv
if (not os.path.exists(oggFilepath)):
self.record = False
self.ca.m.cannotSaveVideo()
@@ -274,7 +279,7 @@ class Glive:
def stoppedRecordingAudio( self ):
record.Record.log.debug("stoppedRecordingAudio")
if (self.audioPixbuf != None):
- audioFilepath = os.path.join(Instance.tmpPath, "output.wav")#self.el("audioFilesink").get_property("location")
+ audioFilepath = os.path.join(Instance.instancePath, "output.wav")#self.el("audioFilesink").get_property("location")
if (not os.path.exists(audioFilepath)):
self.record = False
self.audio = False
@@ -302,7 +307,7 @@ class Glive:
vorbisEnc.merge_tags(taglist, gst.TAG_MERGE_KEEP)
audioFilesink = audioline.get_by_name('audioFilesink_'+n)
- audioOggFilepath = os.path.join(Instance.tmpPath, "output.ogg")
+ audioOggFilepath = os.path.join(Instance.instancePath, "output.ogg")
audioFilesink.set_property("location", audioOggFilepath )
record.Record.log.debug("post audioFilesink")
@@ -401,13 +406,13 @@ class Glive:
del pic
self.thumbEl('thumbTee').unlink(self.thumbEl('thumbQueue'))
- oggFilepath = os.path.join(Instance.tmpPath, "output.ogg") #ogv
+ oggFilepath = os.path.join(Instance.instancePath, "output.ogg") #ogv
if (self.audio):
self.ca.ui.setPostProcessPixBuf(self.thumbBuf)
- wavFilepath = os.path.join(Instance.tmpPath, "output.wav")
- muxFilepath = os.path.join(Instance.tmpPath, "mux.ogg") #ogv
+ wavFilepath = os.path.join(Instance.instancePath, "output.wav")
+ muxFilepath = os.path.join(Instance.instancePath, "mux.ogg") #ogv
n = str(len(self.muxPipes))
muxline = gst.parse_launch('filesrc location=' + str(oggFilepath) + ' name=muxVideoFilesrc_'+n+' ! oggdemux name=muxOggdemux_'+n+' ! theoradec name=muxTheoradec_'+n+' ! theoraenc name=muxTheoraenc_'+n+' ! oggmux name=muxOggmux_'+n+' ! filesink location=' + str(muxFilepath) + ' name=muxFilesink_'+n+' filesrc location=' + str(wavFilepath) + ' name=muxAudioFilesrc_'+n+' ! wavparse name=muxWavparse_'+n+' ! audioconvert name=muxAudioconvert_'+n+' ! vorbisenc name=muxVorbisenc_'+n+' ! muxOggmux_'+n+'.')
@@ -465,9 +470,9 @@ class Glive:
pipe.get_bus().disable_sync_message_emission()
pipe.get_bus().remove_signal_watch()
- wavFilepath = os.path.join(Instance.tmpPath, "output.wav")
- oggFilepath = os.path.join(Instance.tmpPath, "output.ogg") #ogv
- muxFilepath = os.path.join(Instance.tmpPath, "mux.ogg") #ogv
+ wavFilepath = os.path.join(Instance.instancePath, "output.wav")
+ oggFilepath = os.path.join(Instance.instancePath, "output.ogg") #ogv
+ muxFilepath = os.path.join(Instance.instancePath, "mux.ogg") #ogv
os.remove( wavFilepath )
os.remove( oggFilepath )
self.ca.m.saveVideo(self.thumbBuf, str(muxFilepath), self.VIDEO_WIDTH_SMALL, self.VIDEO_HEIGHT_SMALL)
@@ -492,8 +497,8 @@ class Glive:
pipe.get_bus().disable_sync_message_emission()
pipe.get_bus().remove_signal_watch()
- wavFilepath = os.path.join(Instance.tmpPath, "output.wav")
- oggFilepath = os.path.join(Instance.tmpPath, "output.ogg")
+ wavFilepath = os.path.join(Instance.instancePath, "output.wav")
+ oggFilepath = os.path.join(Instance.instancePath, "output.ogg")
os.remove( wavFilepath )
self.ca.m.saveAudio(oggFilepath, self.audioPixbuf)
return False