def METHOD_NAME(argv):
  Gst.init(argv)
  pipe = Gst.Pipeline()
  bus = pipe.get_bus()
  bus.add_watch(GLib.PRIORITY_DEFAULT, bus_callback, None)
  videotest = Gst.ElementFactory.make("videotestsrc", None)
  encoder = Gst.ElementFactory.make("vp8enc", None)
  agnostic = Gst.ElementFactory.make("agnosticbin", "agnostic")
  decoder = Gst.ElementFactory.make("vp8dec", None)
  videosink2 = Gst.ElementFactory.make("xvimagesink", None)
  videosink = Gst.ElementFactory.make("xvimagesink", "videosink0")
  videotest.set_property("pattern", "ball")
  videotest.set_property("is-live", True)
  pipe.add(videotest)
  pipe.add(encoder)
  pipe.add(agnostic)
  pipe.add(videosink)
  pipe.add(decoder)
  pipe.add(videosink2)
  videotest.link(encoder)
  encoder.link(agnostic)
  agnostic.link(videosink)
  agnostic.link(decoder)
  decoder.link(videosink2)
  pipe.set_state(Gst.State.PLAYING)
  Gst.debug_bin_to_dot_file_with_ts(pipe, Gst.DebugGraphDetails.ALL, "playing")
  GLib.timeout_add_seconds(2, connect_videosink, pipe, "videosink1", 4)
  GLib.timeout_add_seconds(2, connect_enc_videosink, pipe)
  GLib.timeout_add_seconds(4, connect_audiosink, pipe)
  GLib.timeout_add_seconds(10, disconnect_videosink, pipe, "videosink0")
  GLib.timeout_add_seconds(16, connect_videosink, pipe, "videosink3", 0)
  GLib.timeout_add_seconds(18, connect_enc_videosink, pipe)
  try:
    loop.run()
  except:
    pass
  Gst.debug_bin_to_dot_file_with_ts(pipe, Gst.DebugGraphDetails.ALL, "end")
  pipe.set_state(Gst.State.NULL)