How can I get the current position from a pipeline?

Michel Albert michel at albert.lu
Sat Jun 23 04:22:24 PDT 2012


Hi,

I am very new to gstreamer, and I would like to implement a very basic
audio player without UI in python. It's supposed to be used as a
component in a web-application, streaming audio to an icecast server.

I have got the basics to work using a simple pipeline. The pipeline
looks like this:

     filesrc name="infile" location="{filename}" !  decodebin !
audioconvert !  vorbisenc !  oggmux !  shout2send mount="{mount}"
port={port} username={user} password={passwd}

As said, this works. But now I would need to get the current position
in the input file. I was trying to run
"pipeline.get_by_name('infile').query_position(gst.FORMAT_TIME)"  but
that gives me a "Query failed" error, without more details. I dug
through all the docs of the pipeline elements, but did not find
anything that looks promising.

For reference, I will attach my current experimental script to this mail.




Best regards,

Mich.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gstplay.py
Type: application/octet-stream
Size: 1740 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120623/c79d5a0b/attachment.obj>


More information about the gstreamer-devel mailing list