WEB开发网
开发学院手机开发Android 开发 Android JNI详述 阅读

Android JNI详述

 2010-07-15 20:31:00 来源:WEB开发网   
核心提示:的/system/lib/libmedia_jni.so 档案里的代码段如下://#define LOG_NDEBUG 0#define LOG_TAG "MediaPlayer-JNI"static JNINativeMethod gMethods[] = {{"setDataSourc
的/system/lib/libmedia_jni.so 档案里的代码段如下:

//#define LOG_NDEBUG 0

#define LOG_TAG "MediaPlayer-JNI"

static JNINativeMethod gMethods[] = {

{"setDataSource", "(Ljava/lang/String;)V",

(void *)android_media_MediaPlayer_setDataSource},

{"setDataSource", "(Ljava/io/FileDescriptor;JJ)V",

(void *)android_media_MediaPlayer_setDataSourceFD},

{"prepare", "()V", (void *)android_media_MediaPlayer_prepare},

{"prepareAsync", "()V", (void *)android_media_MediaPlayer_prepareAsync},

{"_start", "()V", (void *)android_media_MediaPlayer_start},

{"_stop", "()V", (void *)android_media_MediaPlayer_stop},

{"getVideoWidth", "()I", (void *)android_media_MediaPlayer_getVideoWidth},

{"getVideoHeight", "()I", (void *)android_media_MediaPlayer_getVideoHeight},

{"seekTo", "(I)V", (void *)android_media_MediaPlayer_seekTo},

{"_pause", "()V", (void *)android_media_MediaPlayer_pause},

{"isPlaying", "()Z", (void *)android_media_MediaPlayer_isPlaying},

{"getCurrentPosition", "()I", (void *)android_media_MediaPlayer_getCurrentPosition},

{"getDuration", "()I", (void *)android_media_MediaPlayer_getDuration},

{"_release", "()V", (void *)android_media_MediaPlayer_release},

{"_reset", "()V", (void *)android_media_MediaPlayer_reset},

{"setAudioStreamType","(I)V", (void *)android_media_MediaPlayer_setAudioStreamType},

{"setLooping", "(Z)V", (void *)android_media_MediaPlayer_setLooping},

{"setVolume", "(FF)V", (void *)android_media_MediaPlayer_setVolume},

{"getFrameAt", "(I)Landroid/graphics/Bitmap;",

(void *)android_media_MediaPlayer_getFrameAt},

{"native_setup", "(Ljava/lang/Object;)V",

(void *)android_media_MediaPlayer_native_setup},

{"native_finalize", "()V", (void

上一页  1 2 3 4 5 6 7 8 9  下一页

Tags:Android JNI 详述

编辑录入:coldstar [复制链接] [打 印]
赞助商链接