Untangle MediaPlayer, MediaRecorder, MediaScanner and MediaMetadataRetriever JNI

code, so that creating one of those doesn't initialize all the others. Shaves
a hundred milliseconds or so off music app startup time.
This commit is contained in:
Marco Nelissen
2009-08-03 11:12:58 -07:00
parent f2beab58f3
commit 4935d05eaa
10 changed files with 167 additions and 135 deletions

View File

@@ -99,6 +99,7 @@ public class MediaScanner
{
static {
System.loadLibrary("media_jni");
native_init();
}
private final static String TAG = "MediaScanner";
@@ -1404,6 +1405,7 @@ public class MediaScanner
public native byte[] extractAlbumArt(FileDescriptor fd);
private static native final void native_init();
private native final void native_setup();
private native final void native_finalize();
@Override