Top Picks

   
March 16, 2013

 

Changing buffer size on MediaPlayer(android)?

 

Is there any way to change default buffer size on streaming MediaPlayer?

 

Answer

In standard android distribution, the input

DataSource

is cached through a

NuCachedSource2

implementation as seen here.

The

NuCachedSource2

is implemented through a page-cache mechanism with a lower and higher thresholds of 4 MB and 20 MB as shown here.

I presume you could tweak these parameters, rebuild

libstagefright.so

and replace the same to test it in your system.

Professional Hosting fro Just Host

Filed under: Android Coding FAQ

Tags:

Comments

No Comments

Leave a reply