I'm developing a media player that streams mp3 files. I'm using the python gstreamer module to play the streams.
my player is the playbin2 element
When I want to query the position (with query_position(gst.FORMAT_TIME,None)), it always returns a gst.QueryError: Query failed.
The song is definetly playing. (state is not NULL) 
Does anyone have any experience with this?
PS: I also tried replacing gst.FORMAT_TIME with gst.Format(gst.FORMAT_TIME), but gives me the same error.
What does "you'll need to thread your own gst object" mean? And what does "wait until the query succeeds" mean?
State changes from NULL to PAUSED or PLAYING state are asynchronous. You will usually only be able to do a successful duration query once the pipeline is prerolled (so state >= PAUSED). When you get an ASYNC_DONE message on the pipeline's (playbin2's) GstBus, then you can query.
element playbin2 query_position always returns query failed