pitivi r1239 - in branches/SOC_2008_SLAKSHMAN: . pitivi pitivi/ui
- From: slynux svn gnome org
- To: svn-commits-list gnome org
- Subject: pitivi r1239 - in branches/SOC_2008_SLAKSHMAN: . pitivi pitivi/ui
- Date: Mon, 25 Aug 2008 16:20:58 +0000 (UTC)
Author: slynux
Date: Mon Aug 25 16:20:58 2008
New Revision: 1239
URL: http://svn.gnome.org/viewvc/pitivi?rev=1239&view=rev
Log:
SinkBin timeoverlay Bug fix, set Sources: NULL->READY
Modified:
branches/SOC_2008_SLAKSHMAN/ChangeLog
branches/SOC_2008_SLAKSHMAN/pitivi/bin.py
branches/SOC_2008_SLAKSHMAN/pitivi/ui/cam_capture.glade
Modified: branches/SOC_2008_SLAKSHMAN/pitivi/bin.py
==============================================================================
--- branches/SOC_2008_SLAKSHMAN/pitivi/bin.py (original)
+++ branches/SOC_2008_SLAKSHMAN/pitivi/bin.py Mon Aug 25 16:20:58 2008
@@ -527,10 +527,12 @@
vqueue = gst.element_factory_make('queue')
timeoverlay = gst.element_factory_make('timeoverlay')
cspace = gst.element_factory_make('ffmpegcolorspace')
+ cspace2 = gst.element_factory_make('ffmpegcolorspace')
vscale = gst.element_factory_make('videoscale')
vscale.props.method = 1
- self.vsinkthread.add(self.videosink,timeoverlay, vqueue, vscale, cspace)
- vqueue.link(timeoverlay)
+ self.vsinkthread.add(self.videosink,timeoverlay, vqueue, vscale, cspace,cspace2)
+ vqueue.link(cspace2)
+ cspace2.link(timeoverlay)
timeoverlay.link(self.videosink)
timeoverlay.set_property("halign","right")
timeoverlay.set_property("valign","bottom")
@@ -610,7 +612,7 @@
self.audiosrc = gst.element_factory_make("alsasrc", "webcam-asrc")
SmartBin.__init__(self, "smartcapturebin", has_video=True, has_audio=True,
- width=640, height=480)
+ width=640, height=490)
def _addSource(self):
@@ -633,6 +635,31 @@
self.debug("finished connecting sources")
+ '''
+ # It makes the recording video lag
+ def record(self, uri, settings=None):
+
+ # FIXME : This is maybe a temporary hack.
+ #
+ # EXPLANATION : The problem is that alsasrc (or any other audio source) will
+ # not reset the timestamps when going down to READY, but v4l2src (or any
+ # other element that resets itself in READY) will properly reset the
+ # timestamps.
+ # The resulting behaviour (without this fix) is that v4l2src will output
+ # buffers starting from 0 whereas alsasrc will output buffers starting from
+ # the last outputted buffer timestamp
+
+ # Made threaded to resolve video/audio lag issue.
+
+ self.debug("Setting sources to NULL again to reset their timestamps !")
+ CallbackThread(self.videosrc.set_state,gst.STATE_NULL).start()
+ CallbackThread(self.videosrc.set_state,gst.STATE_READY).start()
+ CallbackThread(self.audiosrc.set_state,gst.STATE_NULL).start()
+ CallbackThread(self.audiosrc.set_state,gst.STATE_READY).start()
+
+ SmartBin.record(self,uri, settings)
+ '''
+
class Discover:
"""
A Pipeline which return audio/video info about the uri stream
Modified: branches/SOC_2008_SLAKSHMAN/pitivi/ui/cam_capture.glade
==============================================================================
--- branches/SOC_2008_SLAKSHMAN/pitivi/ui/cam_capture.glade (original)
+++ branches/SOC_2008_SLAKSHMAN/pitivi/ui/cam_capture.glade Mon Aug 25 16:20:58 2008
@@ -5,7 +5,7 @@
<widget class="GtkDialog" id="cam_capture">
<property name="width_request">530</property>
- <property name="height_request">480</property>
+ <property name="height_request">500</property>
<property name="visible">True</property>
<property name="title" translatable="yes">Record from Webcam</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]