Buffering issues with MediaPlayer

518 views
Skip to first unread message

ud...@redux.com

unread,
Jan 3, 2012, 2:30:58 PM1/3/12
to Google TV Android Forum
There are a couple discrepancies I noticed between the android
documentation for MediaPlayer, and what I actually see happening on
android on GoogleTV.

For instance, the MEDIA_INFO_BUFFERING_START -
http://developer.android.com/reference/android/media/MediaPlayer.html#MEDIA_INFO_BUFFERING_START
doesn't ever seem to be called, even when it definitely is buffering
and playback is paused - this is on GoogleTV's that are already on
honeycomb, so this should be fired in the OnInfoListener.

The second discrepancy, that I've been seeing is on the
OnBufferingUpdateListener -
http://developer.android.com/reference/android/media/MediaPlayer.OnBufferingUpdateListener.html.
According to the docs, it should give you a percent in terms of how
much the video has finished downloading (i.e. - when it hits 100%, it
should have the whole video downloaded). However, what I end up
seeing, is that OnBufferingUpdateListener returns 100 when it has
enough of the video buffered to start playback, and not when the
entire video has finished downloading.

I'm trying to figure out when the MediaPlayer is paused due to
buffering (exactly what MEDIA_INFO_BUFFERING_START should provide).
Right now, I'm going with an ad-hoc solution that basically says the
video is buffering if OnBufferingUpdateListener return a percent that
is not 100, which is working because of the quirks that I seem to be
seeing in the GoogleTV MediaPlayer. However, this isn't correct
according to the documentation, and I am wondering what the correct
behavior really should be (are the docs wrong? or is there a bug in
the android MediaPlayer implementation relating to buffering). Does
anybody have any further insight into this?

Thanks.

Robin Bailleul

unread,
Mar 1, 2012, 6:56:24 AM3/1/12
to googletv...@googlegroups.com
I need the same functionality from the MediaPlayer, and after a couple of tests, I have come to the same conclusions:
- setting an OnInfoListener to catch the MEDIA_INFO_BUFFERING_START etc. seems to have no effect what so ever: the function onInfo(...) is never called
- the OnBufferingUpdateListener does not provide the information it is supposed to according to the documentation.

Can anybody shed some light on these problems please?

ud...@redux.com

unread,
Mar 1, 2012, 5:51:59 PM3/1/12
to Google TV Android Forum
Hi Robin,

I created a ticket on google TV issues. Here is the link to the
ticket:
http://code.google.com/p/googletv-issues/issues/detail?id=2&colspec=ID%20Stars%20Type%20Status%20Summary
Reply all
Reply to author
Forward
0 new messages