From: <en...@ke...> - 2008-01-31 19:57:36
|
CVS Root: /cvs/gstreamer Module: gst-python Changes by: ensonic Date: Thu Jan 31 2008 19:57:41 UTC Log message: * examples/video-controller.py: Demo how to use the controller on videomixer. Modified files: . : ChangeLog Added files: examples : video-controller.py Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/ChangeLog.diff?r1=1.647&r2=1.648 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/examples/video-controller.py?rev=1.1&content-type=text/vnd.viewcvs-markup ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-python/ChangeLog,v retrieving revision 1.647 retrieving revision 1.648 diff -u -d -r1.647 -r1.648 --- ChangeLog 31 Jan 2008 14:14:49 -0000 1.647 +++ ChangeLog 31 Jan 2008 19:57:26 -0000 1.648 @@ -1,3 +1,8 @@ +2008-01-31 Stefan Kost <en...@us...> + + * examples/video-controller.py: + Demo how to use the controller on videomixer. 2008-01-31 Jan Schmidt <Jan...@su...> * gst/.cvsignore: --- NEW FILE: video-controller.py --- #!/usr/bin/env python # -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # videomixer-controller.py # (c) 2008 Stefan Kost <en...@us...> # Test case for the GstController using videomixer and videotestsrc import pygst pygst.require('0.10') import gst import time def main(): pipeline = gst.Pipeline("videocontroller") src = gst.element_factory_make("videotestsrc", "src") mix = gst.element_factory_make("videomixer", "mix") conv = gst.element_factory_make("ffmpegcolorspace", "conv") sink = gst.element_factory_make("autovideosink", "sink") pipeline.add(src, mix, conv, sink) spad = src.get_static_pad('src') dpad = mix.get_request_pad('sink_%d') spad.link(dpad) mix.link(conv) conv.link(sink) control = gst.Controller(dpad, "xpos", "ypos") control.set_interpolation_mode("xpos", gst.INTERPOLATE_LINEAR) control.set_interpolation_mode("ypos", gst.INTERPOLATE_LINEAR) control.set("xpos", 0, 0) control.set("xpos", 5 * gst.SECOND, 200) control.set("ypos", 0, 0) control.set("ypos", 5 * gst.SECOND, 200) pipeline.set_state(gst.STATE_PLAYING) time.sleep(7) if __name__ == "__main__": main() |