I'm in the process of learning how to build an application in C using gstreamer, and I'm working my way through examples. In particular, I'm having an issue with the play a section of a media file example on the "Pipeline manipulation" section.
Under Ubuntu 24.04, it builds just fine, and runs - but nothing is ever played. I added some code to the cb_message()
callback to see what other messages it's getting - and there are some GST_MESSAGE_BUFFERING
messages after setting the pipeline to GST_STATE_PLAYING
. I added some debug output there, and it does eventually get to 100% - but still nothing plays, even if I add a call to gst_element_set_state(pipeline, GST_STATE_PLAYING)
there. In case it matters, the URI I've been using is the same one used in other tutorials on the gstreamer site: https://gstreamer.freedesktop.org/data/media/sintel_trailer-480p.webm
So... seems like maybe this example needs updating. Any suggestions? It's kind of frustrating when trying to learn something if the examples don't work. :) :) :)
EDIT: looks like it's only meant to be used with a local file, not a stream? The same file works fine locally. I'd love to know why this is the case, and if it's possible to play a section of a file retrieved over the network...
As Florian Zwoch commented - this example only works with a local file, not a stream. The same file works fine if retrieved then played via a file:///
URI.