mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +00:00
24 lines
662 B
Python
24 lines
662 B
Python
|
#!/usr/bin/python
|
||
|
import gobject; gobject.threads_init()
|
||
|
import pygst; pygst.require("0.10")
|
||
|
import gst
|
||
|
|
||
|
p = gst.parse_launch ("""
|
||
|
v4l2src !
|
||
|
ffmpegcolorspace ! queue ! video/x-raw-yuv,width=320,height=240,framerate=30/1 ! gaussianblur qos=true name=vf ! ffmpegcolorspace !
|
||
|
timeoverlay ! xvimagesink
|
||
|
""")
|
||
|
|
||
|
m = p.get_by_name ("vf")
|
||
|
m.set_property ("sigma", 0.5)
|
||
|
|
||
|
control = gst.Controller(m, "sigma")
|
||
|
control.set_interpolation_mode("sigma", gst.INTERPOLATE_LINEAR)
|
||
|
control.set("sigma", 0 * gst.SECOND, 0.5)
|
||
|
control.set("sigma", 5 * gst.SECOND, 10.0)
|
||
|
control.set("sigma", 25 * gst.SECOND, -5.0)
|
||
|
|
||
|
p.set_state (gst.STATE_PLAYING)
|
||
|
|
||
|
gobject.MainLoop().run()
|