#include <gst/gst.h>
#include <unistd.h>

int
main (int argc, char **argv)
{
  GstElement * pipeline;
  
  gst_init (&argc, &argv);

  while (1) {
    pipeline = gst_parse_launch ("playbin uri=file:///home/nicolas/Videos/big_buck_bunny_720p_stereo.ogg", NULL);
    gst_element_set_state (pipeline, GST_STATE_PLAYING);
    usleep (25000);
    gst_element_set_state (pipeline, GST_STATE_NULL);
    gst_object_unref (pipeline);
  }
  
  return 0;
}

