Gst Parse Launch Properties

Tim-Philipp Müller t.i.m at zen.co.uk
Sun Jan 13 06:28:16 PST 2013


On Sun, 2013-01-13 at 06:17 -0800, iesx wrote:
> This is example i got from Internet 
> ......................................................................................................................................................
> #!/usr/bin/python
> import gobject; gobject.threads_init()
> import pygst; pygst.require("0.10")
> import gst
> 
> p = gst.parse_launch ("""videomixer name=mix ! ffmpegcolorspace !
> xvimagesink
> videotestsrc pattern="snow" ! video/x-raw-yuv, framerate=10/1, width=200,
> height=150 ! mix.sink_0
> videotestsrc ! video/x-raw-yuv, framerate=10/1, width=640, height=360 !
> mix.sink_1
> """)
> 
> m = p.get_by_name ("mix")
> s0 = m.get_pad ("sink_0")
> s0.set_property ("xpos", 100)
> 
> control = gst.Controller(s0, "ypos", "alpha")
> control.set_interpolation_mode("ypos", gst.INTERPOLATE_LINEAR)
> control.set_interpolation_mode("alpha", gst.INTERPOLATE_LINEAR)
> control.set("ypos", 0, 0); control.set("ypos", 5 * gst.SECOND, 200)
> control.set("alpha", 0, 0); control.set("alpha", 5 * gst.SECOND, 1.0)
> 
> p.set_state (gst.STATE_PLAYING)
> 
> gobject.MainLoop().run()
> -..................................................................................................................................
> 
> i want to do almost same with the above example but i going to use C. 
> Is there any method/way to do like that especially on " m = p.get_by_name
> ("mix") "?
> what is the command line in C that same as get_by_name in python?

m = gst_bin_get_by_name (GST_BIN (p), "mix");

Cheers
 -Tim




More information about the gstreamer-devel mailing list