[Android] LibVLC: use bogoMIPS as last resort

Edward Wang git at videolan.org
Thu Jul 24 16:52:51 CEST 2014


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Thu Jul 24 10:48:41 2014 -0400| [0b8dff96e0360360f76483d35768cd623e69f633] | committer: Edward Wang

LibVLC: use bogoMIPS as last resort

It is not accurate but it works as a last resort when real frequency is unavailable.

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=0b8dff96e0360360f76483d35768cd623e69f633
---

 vlc-android/src/org/videolan/libvlc/LibVLC.java |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/libvlc/LibVLC.java b/vlc-android/src/org/videolan/libvlc/LibVLC.java
index 589fe8e..c1ebefe 100644
--- a/vlc-android/src/org/videolan/libvlc/LibVLC.java
+++ b/vlc-android/src/org/videolan/libvlc/LibVLC.java
@@ -300,9 +300,12 @@ public class LibVLC {
             LibVlcUtil.MachineSpecs m = LibVlcUtil.getMachineSpecs();
             if( (m.hasArmV6 && !(m.hasArmV7)) || m.hasMips )
                 ret = 4;
-            else if(m.frequency > 1200 && m.processors > 2)
+            else if(m.frequency >= 1200 && m.processors > 2)
                 ret = 1;
-            else
+            else if(m.bogoMIPS >= 1200 && m.processors > 2) {
+                ret = 1;
+                Log.d(TAG, "Used bogoMIPS due to lack of frequency info");
+            } else
                 ret = 3;
         } else if(deblocking > 4) { // sanity check
             ret = 3;



More information about the Android mailing list