Get current downloaded size

Damián Nohales damiannohales at gmail.com
Sat Dec 31 07:36:42 PST 2011


Hi Tim,

I'm not sure if I understand you, maybe I explained badly.
Doing a position query to the Pipeline is the same to do it to the
PlayBin2, right? since a PlayBin2 is a Pipeline because inheritance.
But doing a position query to the PlayBin2 will returns me the current
playback position, witch that I need is the current downloaded size or time.

Well... for simplicity I need the time since the range on a Scale widget
in the application is setted from 0 to n seconds of song duration, then
I need to fill the scale with the amount of downloaded time (like
YouTube or another media player). But I guess that if I play with the
downloaded size I can get the time.

Thanks for the answer!
Regards!

El 31/12/11 08:57, Tim-Philipp Müller escribió:
> On Fri, 2011-12-30 at 17:50 -0300, Damián Nohales wrote:
> 
> Hi,
> 
>> I am developing an application that must play a music file over the
>> Internet, through HTTP (remote streaming). I am using GStreamer and Python.
>>
>> Is there a way to know the current amount of time downloaded of the
>> music file? No the music file duration, but the current data downloaded
>> by GStreamer expressed in a time unit.
>>
>> If helps, the code that I using for play the remote music file is
>> [playbin]
> 
> If you're after the current playback position, do a position query on
> the pipeline/playbin once the pipeline is prerolled (i.e. you got an
> ASYNC_DONE message on the bus). However, often there may be some more
> buffering going on after the source as well. Why do you need to know the
> size of this queue in time?
> 
> Cheers
>  -Tim
> 
> PS: you should probably use playbin2 instead of plabin
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list