/* Build the pipeline, please change the URI to the correct one */ pipeline = gst_parse_launch("playbin uri=file:///root/video.mp4", NULL);
/* Start playing */ gst_element_set_state(pipeline, GST_STATE_PLAYING);
/* Wait until error or EOS */ bus = gst_element_get_bus(pipeline); msg = gst_bus_timed_pop_filtered(bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS);