[farsight2/master] Add time ovrelay to videotestsrc

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:24:11 PST 2008


---
 tests/gui/fs2-gui.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/gui/fs2-gui.py b/tests/gui/fs2-gui.py
index fcec0a2..9831fd9 100644
--- a/tests/gui/fs2-gui.py
+++ b/tests/gui/fs2-gui.py
@@ -311,11 +311,16 @@ class FsUIVideoSource(FsUISource):
         if CAMERA:
             source = gst.element_factory_make("v4l2src")
             source.set_property("device", CAMERA)
+            bin.add(source)
         else:
             source = gst.element_factory_make("videotestsrc")
             source.set_property("is-live", 1)
-            
-        bin.add(source)
+            bin.add(source)
+            overlay = gst.element_factory_make("timeoverlay")
+            overlay.set_property("font-desc", "Sans 32")
+            bin.add(overlay)
+            source.link(overlay)
+            source=overlay
 
         filter = gst.element_factory_make("capsfilter")
         filter.set_property("caps", gst.Caps("video/x-raw-yuv , width=[300,500] , height=[200,500], framerate=[20/1,30/1]"))
-- 
1.5.6.5




More information about the farsight-commits mailing list