• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/python
2import gobject; gobject.threads_init()
3import pygst; pygst.require("0.10")
4import gst
5
6p = gst.parse_launch ("""
7   v4l2src !
8   videoconvert ! queue ! video/x-raw,width=320,height=240,framerate=30/1 !  gaussianblur qos=true name=vf ! videoconvert !  timeoverlay ! xvimagesink
9   """)
10
11m = p.get_by_name ("vf")
12m.set_property ("sigma", 0.5)
13
14control = gst.Controller(m, "sigma")
15control.set_interpolation_mode("sigma", gst.INTERPOLATE_LINEAR)
16control.set("sigma", 0 * gst.SECOND, 0.5)
17control.set("sigma", 5 * gst.SECOND, 10.0)
18control.set("sigma", 25 * gst.SECOND, -5.0)
19
20p.set_state (gst.STATE_PLAYING)
21
22gobject.MainLoop().run()
23