Get current downloaded size
Damián Nohales
damiannohales at gmail.com
Fri Dec 30 12:50:14 PST 2011
Hi there!
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 the
following:
---
player = gst.element_factory_make("playbin", "player")
player.set_property('uri', "http://www.example.com/myfile.mp3")
player.set_state(gst.STATE_PLAYING)
player.get_bus()
bus.enable_sync_message_emission()
bus.add_signal_watch()
# The on_stopped callback updates the UI when the file playback
# ends.
bus.connect('message::eos', self.on_stopped)
---
Thanks in advance!
Regards!
More information about the gstreamer-devel
mailing list