diff options
author | Jan Schmidt <thaytan@noraisin.net> | 2010-08-02 20:41:12 +1000 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2010-08-02 20:46:48 +1000 |
commit | 2f1899cd31e5aa666ff31d99f1c4b2b09d927fc6 (patch) | |
tree | 5c9135c87831bd0a8f3f5ddb081034a9f087ce59 /gst/gaudieffects/blur-example.py | |
parent | fc9cfb0c0036d4ff8432d6b5880eb377dabf465b (diff) | |
download | gstreamer-plugins-bad-2f1899cd31e5aa666ff31d99f1c4b2b09d927fc6.tar.gz |
gaudieffects: Add Gaussian Blur effect, and brief example.
Diffstat (limited to 'gst/gaudieffects/blur-example.py')
-rw-r--r-- | gst/gaudieffects/blur-example.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gst/gaudieffects/blur-example.py b/gst/gaudieffects/blur-example.py new file mode 100644 index 000000000..63920ec84 --- /dev/null +++ b/gst/gaudieffects/blur-example.py @@ -0,0 +1,23 @@ +#!/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() |