#include <gst/gst.h>

#define URI "rtsp://127.0.0.1:8554/test"

int main (int argc, char *argv[])
{
  GstElement *pipeline;
  GstStateChangeReturn ret;

  gst_init (&argc, &argv);

  pipeline = gst_parse_launch ("uridecodebin uri=\""URI"\" ! glimagesink", NULL);

  ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
  g_print("Set to PAUSED returned: %s\n", gst_element_state_change_return_get_name (ret));

  ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
  g_print("Set to PLAYING returned: %s\n", gst_element_state_change_return_get_name (ret));

  while (TRUE);
}
