您的位置:首页 > 理论基础 > 计算机网络

android播放http流媒体时默认最低最高缓冲值在4.0.3版本上进行了修改

2014-03-11 14:55 337 查看
如题,在2.3.7版本上最低和最高值分别是512K Bytes和5M Bytes.。
enum {
        kPageSize            = 65536,
        kHighWaterThreshold  = 5 * 1024 * 1024,
        kLowWaterThreshold   = 512 * 1024,

        // Read data after a 15 sec timeout whether we're actively
        // fetching or not.
        kKeepAliveIntervalUs = 15000000,
    };
到了4.0.3上,最低和最高值分别是4M和20M Bytes。
enum {
        kPageSize                       = 65536,
        kDefaultHighWaterThreshold      = 20 * 1024 * 1024,
        kDefaultLowWaterThreshold       = 4 * 1024 * 1024,

        // Read data after a 15 sec timeout whether we're actively
        // fetching or not.
        kDefaultKeepAliveIntervalUs     = 15000000,
    };
这样会导致在4.0.3及以后的版本需要缓冲较长的时间才能开始播放。
相关问题:
Issue 29870:MediaPlayer Buffer Size in ICS 4.0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: