GStreamer Application Development Manual | ||
---|---|---|
<<< Previous | Bins | Next >>> |
The application programmer can create custom bins packed with elements to perform a specific task. This allow you to write an MPEG audio decoder with just the follwing lines of code:
// create the mp3player element GstElement *mp3player = gst_elementfactory_make("mp3player","mp3player"); // set the source mp3 audio file gtk_object_set(GTK_OBJECT(mp3player), "location", "helloworld.mp3", NULL); // start playback gst_element_set_state(GST_ELEMENT(mp3player),GST_STATE_PLAYING); ... // pause playback gst_element_set_state(GST_ELEMENT(mp3player),GST_STATE_PAUSED); ... // stop gst_element_set_state(GST_ELEMENT(mp3player),GST_STATE_NULL); |
<<< Previous | Home | Next >>> |
Adding elements to a bin | Up | Ghostpads |