上的MediaPlayer(机器人)更改缓冲区的大小? [英] Changing buffer size on MediaPlayer(android)?
问题描述
有没有办法在流媒体的MediaPlayer更改默认的缓冲区大小?
Is there any way to change default buffer size on streaming MediaPlayer?
推荐答案
在标准Android分布,输入数据源
通过缓存在 NuCachedSource2
实施所看到的这里。
In standard android distribution, the input DataSource
is cached through a NuCachedSource2
implementation as seen here.
的 NuCachedSource2
通过与较低和4 MB更高的门槛和20 MB页面缓存机制来实现,如图<一个href=\"http://androidxref.com/4.2.2_r1/xref/frameworks/av/media/libstagefright/include/NuCachedSource2.h#75\"相对=nofollow>这里。
The NuCachedSource2
is implemented through a page-cache mechanism with a lower and higher thresholds of 4 MB and 20 MB as shown here.
我presume你可以调整这些参数,重建 libstagefright.so
和更换相同测试它在你的系统中。
I presume you could tweak these parameters, rebuild libstagefright.so
and replace the same to test it in your system.
这篇关于上的MediaPlayer(机器人)更改缓冲区的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!