pitivi r1235 - in branches/SOC_2008_SLAKSHMAN: . pitivi pitivi/ui
- From: slynux svn gnome org
- To: svn-commits-list gnome org
- Subject: pitivi r1235 - in branches/SOC_2008_SLAKSHMAN: . pitivi pitivi/ui
- Date: Thu, 21 Aug 2008 06:53:50 +0000 (UTC)
Author: slynux
Date: Thu Aug 21 06:53:50 2008
New Revision: 1235
URL: http://svn.gnome.org/viewvc/pitivi?rev=1235&view=rev
Log:
Partial Merge with rev 1231
Modified:
branches/SOC_2008_SLAKSHMAN/ChangeLog
branches/SOC_2008_SLAKSHMAN/pitivi/bin.py
branches/SOC_2008_SLAKSHMAN/pitivi/ui/webcam_managerdialog.py
Modified: branches/SOC_2008_SLAKSHMAN/pitivi/bin.py
==============================================================================
--- branches/SOC_2008_SLAKSHMAN/pitivi/bin.py (original)
+++ branches/SOC_2008_SLAKSHMAN/pitivi/bin.py Thu Aug 21 06:53:50 2008
@@ -293,6 +293,7 @@
##
ainq = gst.element_factory_make("queue", "ainq")
+ ainq.props.max_size_time = 5 * gst.SECOND
aident = gst.element_factory_make("identity", "aident")
aident.props.single_segment = True
aconv = gst.element_factory_make("audioconvert", "aconv")
@@ -554,23 +555,25 @@
def __init__(self):
gst.log("Creating new smartcapturebin")
- self.videosrc = gst.element_factory_make("v4l2src", "vsrc")
- self.audiosrc = gst.element_factory_make("alsasrc", "asrc")
-
+ self.videosrc = gst.element_factory_make("v4l2src", "webcam-vsrc")
+ self.audiosrc = gst.element_factory_make("alsasrc", "webcam-asrc")
SmartBin.__init__(self, "smartcapturebin", has_video=True, has_audio=True,
width=640, height=480)
def _addSource(self):
- self.q1 = gst.element_factory_make("queue")
- self.q2 = gst.element_factory_make("queue")
+ self.q1 = gst.element_factory_make("queue", "webcam-firstvqueue")
+ self.q1.props.max_size_time = 10 * gst.SECOND
+ self.q2 = gst.element_factory_make("queue", "webcam-firstaqueue")
+ self.q2.props.max_size_time = 30 * gst.SECOND
+ self.q2.props.max_size_buffers = 0
+ self.q2.props.max_size_bytes = 0
self.add(self.videosrc,self.audiosrc,self.q1,self.q2)
def _connectSource(self):
self.debug("connecting sources")
#vcaps = gst.caps_from_string("video/x-raw-yuv,width=320,height=240,framerate=25.0")
-
gst.element_link_many(self.videosrc,self.q1,self.vtee)
gst.element_link_many(self.audiosrc,self.q2,self.atee)
Modified: branches/SOC_2008_SLAKSHMAN/pitivi/ui/webcam_managerdialog.py
==============================================================================
--- branches/SOC_2008_SLAKSHMAN/pitivi/ui/webcam_managerdialog.py (original)
+++ branches/SOC_2008_SLAKSHMAN/pitivi/ui/webcam_managerdialog.py Thu Aug 21 06:53:50 2008
@@ -31,6 +31,7 @@
from pitivi.settings import ExportSettings
from sourcefactories import SourceFactoriesWidget
from pitivi.bin import SmartCaptureBin,SinkBin
+from pitivi.threads import CallbackThread
from pitivi.playground import PlayGround
@@ -48,7 +49,7 @@
self.close_btn = self.cam_ui.get_widget("close_btn")
self.close_btn.connect("clicked",self.close)
- self.record_btn.connect("clicked", self.do_recording)
+ self.record_btn.connect("clicked", self.threaded_recording)
self.cam_window.connect("destroy",self.close)
self.record_btn = self.record_btn.get_children()[0]
@@ -65,6 +66,11 @@
self.player.set_state(gst.STATE_PLAYING)
+ # Perform record in a seperate thread
+ def threaded_recording(self,w):
+ print "test"
+ CallbackThread(self.do_recording,w).start()
+
# Record button action callback
def do_recording(self, w):
@@ -82,8 +88,9 @@
gst.debug("recording stopped")
self.player.stopRecording()
self.sourcefactories.sourcelist.addFiles([self.filepath])
+ self.player.set_state(gst.STATE_PLAYING)
self.record_btn.set_label("Start Recording")
-
+
# For Setting up audio,video sinks
def setSinks(self):
@@ -94,7 +101,6 @@
bus.enable_sync_message_emission()
bus.connect('sync-message::element', self.on_sync_message)
-
# Close the Webcamdialog
def close(self,w):
self.cam_window.destroy()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]