havlenapetr/FFMpeg — Issue #54: Unable to find JNI Methods
Author: KobaltRo
Created: 2012-02-27 09:39:20+00:00
State: open

Hi. I have managed to compile FFMpeg, using your prebuilt libjniaudio and libjnivideo. When trying to open a video i receive the following error:

D/dalvikvm( 2165): No JNI_OnLoad found in /system/lib/libjniaudio.so 0x43b5b348, skipping init
D/dalvikvm( 2165): No JNI_OnLoad found in /system/lib/libjnivideo.so 0x43b5b348, skipping init
I/ffmpeg_onLoad( 2165): loading . . .
I/ffmpeg_onLoad( 2165): Registering com/media/ffmpeg/FFMpeg natives
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_init ()V
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_parse_options ([Ljava/lang/String;)V
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_convert ()V
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_release (I)I
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_setInputFile (Ljava/lang/String;)Lcom/media/ffmpeg/FFMpegAVFormatContext;
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_setOutputFile (Ljava/lang/String;)Lcom/media/ffmpeg/FFMpegAVFormatContext;
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_setBitrate (Ljava/lang/String;Ljava/lang/String;)I
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_newVideoStream (I)V
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_setAudioRate (I)V
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_setAudioChannels (I)V
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_setVideoChannel (I)V
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_setFrameRate (I)Lcom/media/ffmpeg/FFMpegAVRational;
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_setFrameAspectRatio (II)V
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_setFrameSize (II)V
W/dalvikvm( 2165): ERROR: Unable to find decl for native Lcom/media/ffmpeg/FFMpeg;.native_av_setVideoCodec (Ljava/lang/String;)V
E/ffmpeg_onLoad( 2165): Registering method native_avcodec_register_all
E/ffmpeg_onLoad( 2165): Unable to register a number of 17 methods
E/ffmpeg_onLoad( 2165): RegisterNatives failed for 'com/media/ffmpeg/FFMpeg'
E/ffmpeg_onLoad( 2165): can't load android_media_FFMpeg
W/dalvikvm( 2165): JNI_OnLoad returned bad version (-1) in /system/lib/libffmpeg_jni.so 0x43b5b348
D/FFMpeg ( 2165): Couldn't load lib: ffmpeg_jni - Library ffmpeg_jni not found
D/FFMpegPlayerActivity( 2165): Error when inicializing ffmpeg: Couldn't load native libs

Please advice on how to fix this. Will recompiling libjniaudio and libjnivideo fix this issue?
Thank you.