frankandrobot / GLWallpaperVideoDemo

Live wallpaper with video (thanks to FFmpeg)
http://ikaruga2.wordpress.com/2011/06/15/video-live-wallpaper-part-1/
28 stars 25 forks source link

Crashes #1

Closed ghost closed 12 years ago

ghost commented 12 years ago

Thank you very much for sharing your code! When opening/building in eclipse the wallpaper loads onto the emulator and then crashes, with a not responding error, The logcat shows the issue to be 'could not load avcore: find library returned null' however everything seems normal

Many Thanks for your help

frankandrobot commented 12 years ago

Sounds like eclipse isn't finding the compiled JNI code (.so library files). I originally didn't use Eclipse for that project.

You should have a LIBS folder with at least one subfolder ARMABI and possibly also ARMEABI-V7A. You should see the precompiled .so files in there. That's how I set up the git repo. If not then you'll have to drop down to the command line and compile the JNI code.

If the files are there and it still doesn't work, try adding an Application.mk file to the JNI folder containing this:

APP_ABI := armeabi

Refresh the Eclipse project and compile.

--Thanks!

On Tue, 3 Jan 2012 09:40:02 -0800 cotda reply@reply.github.com wrote:

Thank you very much for sharing your code! When opening/building in eclipse the wallpaper loads onto the emulator and then crashes, with a not responding error, The logcat shows the issue to be 'could not load avcore: find library returned null' Many Thanks for your help


Reply to this email directly or view it on GitHub: https://github.com/frankandrobot/GLWallpaperVideoDemo/issues/1

Uriel Avalos uri@frankandrobot.com

ghost commented 12 years ago

Hi, I have followed the instructions on your website and recompiled everything which at first removed the problems and now logcat gives me the following problems:

01-03 19:59:56.902: E/AndroidRuntime(479): FATAL EXCEPTION: main 01-03 19:59:56.902: E/AndroidRuntime(479): java.lang.UnsatisfiedLinkError: initVideo 01-03 19:59:56.902: E/AndroidRuntime(479): at com.danielcotton.tabletlwp.NativeCalls.initVideo(Native Method) 01-03 19:59:56.902: E/AndroidRuntime(479): at com.danielcotton.tabletlwp.GLWallpaperVideoDemo.onCreate(GLWallpaperVideoDemo.java:68) 01-03 19:59:56.902: E/AndroidRuntime(479): at android.app.ActivityThread.handleCreateService(ActivityThread.java:1945) 01-03 19:59:56.902: E/AndroidRuntime(479): at android.app.ActivityThread.access$2500(ActivityThread.java:117) 01-03 19:59:56.902: E/AndroidRuntime(479): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:985) 01-03 19:59:56.902: E/AndroidRuntime(479): at android.os.Handler.dispatchMessage(Handler.java:99) 01-03 19:59:56.902: E/AndroidRuntime(479): at android.os.Looper.loop(Looper.java:130) 01-03 19:59:56.902: E/AndroidRuntime(479): at android.app.ActivityThread.main(ActivityThread.java:3683) 01-03 19:59:56.902: E/AndroidRuntime(479): at java.lang.reflect.Method.invokeNative(Native Method) 01-03 19:59:56.902: E/AndroidRuntime(479): at java.lang.reflect.Method.invoke(Method.java:507) 01-03 19:59:56.902: E/AndroidRuntime(479): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 01-03 19:59:56.902: E/AndroidRuntime(479): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 01-03 19:59:56.902: E/AndroidRuntime(479): at dalvik.system.NativeStart.main(Native Method)

frankandrobot commented 12 years ago

Yeah, you're gonna have to drop to the command line and compile the JNI code.

The package name is hardcoded in the JNI code. So open video.c and update every function call with your package name. Make sure to follow the JNI style. So for example,

Java_ffvideolivewallpaper_frankandrobot_com_NativeCalls_initVideo

becomes

Java_com_danielcotton_tabletlpw_NativeCalls_initVideo

Then recompile:

ndk-build clean ndk-build

If it still doesn't work, you may also have to recompile FFMPEG. Take a look at README-COMPILE-FFMPEG. Of particular importance is the --soname-prefix flag in build.sh. It's also hardcoded with the package name. Update this flag with your package name and run build.sh to compile FFMPEG.

On Tue, 3 Jan 2012 12:03:14 -0800 cotda reply@reply.github.com wrote:

Hi, I have followed the instructions and now logcat gives me the following problems:

01-03 19:59:56.902: E/AndroidRuntime(479): FATAL EXCEPTION: main 01-03 19:59:56.902: E/AndroidRuntime(479): java.lang.UnsatisfiedLinkError: initVideo 01-03 19:59:56.902: E/AndroidRuntime(479): at com.danielcotton.tabletlwp.NativeCalls.initVideo(Native Method) 01-03 19:59:56.902: E/AndroidRuntime(479): at com.danielcotton.tabletlwp.GLWallpaperVideoDemo.onCreate(GLWallpaperVideoDemo.java:68) 01-03 19:59:56.902: E/AndroidRuntime(479): at android.app.ActivityThread.handleCreateService(ActivityThread.java:1945) 01-03 19:59:56.902: E/AndroidRuntime(479): at android.app.ActivityThread.access$2500(ActivityThread.java:117) 01-03 19:59:56.902: E/AndroidRuntime(479): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:985) 01-03 19:59:56.902: E/AndroidRuntime(479): at android.os.Handler.dispatchMessage(Handler.java:99) 01-03 19:59:56.902: E/AndroidRuntime(479): at android.os.Looper.loop(Looper.java:130) 01-03 19:59:56.902: E/AndroidRuntime(479): at android.app.ActivityThread.main(ActivityThread.java:3683) 01-03 19:59:56.902: E/AndroidRuntime(479): at java.lang.reflect.Method.invokeNative(Native Method) 01-03 19:59:56.902: E/AndroidRuntime(479): at java.lang.reflect.Method.invoke(Method.java:507) 01-03 19:59:56.902: E/AndroidRuntime(479): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 01-03 19:59:56.902: E/AndroidRuntime(479): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 01-03 19:59:56.902: E/AndroidRuntime(479): at dalvik.system.NativeStart.main(Native Method)


Reply to this email directly or view it on GitHub: https://github.com/frankandrobot/GLWallpaperVideoDemo/issues/1#issuecomment-3345260

Uriel Avalos uri@frankandrobot.com

ghost commented 12 years ago

Thankyou very much! That fixed the issue

frankandrobot commented 12 years ago

i also just realized that a quicker way is to compile my project as a library then include it in your project. everything works auto magically. you just override my wall paper class.

Sent from my Android phone with K-9 Mail. Please excuse my brevity.

cotda reply@reply.github.com wrote:

Thankyou very much! That fixed the issue --- Reply to this email directly or view it on GitHub: https://github.com/frankandrobot/GLWallpaperVideoDemo/issues/1#issuecomment-3346649

ghost commented 12 years ago

Sorry, a couple more questions, are Quicktime files compatable and does it have Alpha support

Thanks

frankandrobot commented 12 years ago

if ffmpeg supporta it then yes. i believe so. check the list of supported codecs when you run .configure in the ffmpeg folder. not sure what alpha is.

Sent from my Android phone with K-9 Mail. Please excuse my brevity.

cotda reply@reply.github.com wrote:

Sorry, a couple more questions, are Quicktime files compatable and does it have Alpha support Thanks --- Reply to this email directly or view it on GitHub: https://github.com/frankandrobot/GLWallpaperVideoDemo/issues/1#issuecomment-3360668

ghost commented 12 years ago

Alpha as in transparency, ie the frames compressed as .png within a quicktime codec

vinayseasia commented 12 years ago

Hi Frankandrobot

Thank you very much for sharing your code FFvideoLiveWallpaper. I want to rename application package name. I have followed the instructions on your website and recompiled everything. I have updated every function call in video.c with my package name to follow the JNI style and clean the ndk-build and then recompile. But still I am not able to call Native Method and my application crashes. Log cat gives me the following problems:

java.lang.UnsatisfiedLinkError: initVideo at com.danielcotton.tabletlwp.NativeCalls.initVideo(Native Method). And I want to span the video on whole screens but video is spanning only on two or three screens. Please tell me how to span the video on whole screens. I’ll be really thankful, if you would help me in this.

Thanks and regards Vinay

SagarRaiyani commented 11 years ago

another issue in this project..

10-01 09:37:53.381: E/AndroidRuntime(3564): FATAL EXCEPTION: main 10-01 09:37:53.381: E/AndroidRuntime(3564): java.lang.ExceptionInInitializerError 10-01 09:37:53.381: E/AndroidRuntime(3564): at frankandrobot.glwallpapervideodemo.com.GLWallpaperVideoDemo.onCreate(GLWallpaperVideoDemo.java:67) 10-01 09:37:53.381: E/AndroidRuntime(3564): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2529) 10-01 09:37:53.381: E/AndroidRuntime(3564): at android.app.ActivityThread.access$1600(ActivityThread.java:141) 10-01 09:37:53.381: E/AndroidRuntime(3564): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 10-01 09:37:53.381: E/AndroidRuntime(3564): at android.os.Handler.dispatchMessage(Handler.java:99) 10-01 09:37:53.381: E/AndroidRuntime(3564): at android.os.Looper.loop(Looper.java:137) 10-01 09:37:53.381: E/AndroidRuntime(3564): at android.app.ActivityThread.main(ActivityThread.java:5039) 10-01 09:37:53.381: E/AndroidRuntime(3564): at java.lang.reflect.Method.invokeNative(Native Method) 10-01 09:37:53.381: E/AndroidRuntime(3564): at java.lang.reflect.Method.invoke(Method.java:511) 10-01 09:37:53.381: E/AndroidRuntime(3564): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 10-01 09:37:53.381: E/AndroidRuntime(3564): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 10-01 09:37:53.381: E/AndroidRuntime(3564): at dalvik.system.NativeStart.main(Native Method) 10-01 09:37:53.381: E/AndroidRuntime(3564): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load avcore from loader dalvik.system.PathClassLoader[dexPath=/data/app/frankandrobot.glwallpapervideodemo.com-1.apk,libraryPath=/data/app-lib/frankandrobot.glwallpapervideodemo.com-1]: findLibrary returned null 10-01 09:37:53.381: E/AndroidRuntime(3564): at java.lang.Runtime.loadLibrary(Runtime.java:365) 10-01 09:37:53.381: E/AndroidRuntime(3564): at java.lang.System.loadLibrary(System.java:535) 10-01 09:37:53.381: E/AndroidRuntime(3564): at frankandrobot.glwallpapervideodemo.com.NativeCalls.(NativeCalls.java:26) 10-01 09:37:53.381: E/AndroidRuntime(3564): ... 12 more