3 int main(int argc, char *argv[]) {
\r
4 GstElement *pipeline;
\r
8 /* Initialize GStreamer */
\r
9 gst_init (&argc, &argv);
\r
11 /* Build the pipeline */
\r
12 pipeline = gst_parse_launch ("playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm", NULL);
\r
15 gst_element_set_state (pipeline, GST_STATE_PLAYING);
\r
17 /* Wait until error or EOS */
\r
18 bus = gst_element_get_bus (pipeline);
\r
19 msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS);
\r
21 /* Free resources */
\r
23 gst_message_unref (msg);
\r
24 gst_object_unref (bus);
\r
25 gst_element_set_state (pipeline, GST_STATE_NULL);
\r
26 gst_object_unref (pipeline);
\r