How can I get the current position from a pipeline?

Stefan Sauer ensonic at hora-obscura.de
Sun Jun 24 12:18:13 PDT 2012


On 06/23/2012 01:22 PM, Michel Albert wrote:
> 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.
Just send the query to the pipeline, it will dispatch it to the right
element.

"pipeline.query_position(gst.FORMAT_TIME)"

Stefan

>
> For reference, I will attach my current experimental script to this mail.
>
>
>
>
> Best regards,
>
> Mich.
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120624/d612cca9/attachment.html>


More information about the gstreamer-devel mailing list