rockcarry / fanplayer

A portable video player based on ffmpeg for windows and android platform.
GNU Lesser General Public License v3.0
619 stars 163 forks source link

Error while building ffmpeg library for android #53

Open DaAlx opened 3 years ago

DaAlx commented 3 years ago

Hello,

first of all thank you for this awesome project. I tested the demo android application and I'm suprised with the excellent performance of the player.

Now I'm trying to build the ffmpeg library for the android application. My environment is an Ubuntu 20.04.3 (kernel: 5.11.0-37-generic). The build process results to the following error:

./fanplayer/player-android/jni/soundtouch/source/Android-lib/jni/soundtouch-lib.cpp:39:24: fatal error: soundtouch.h: No such file or directory
 #include "soundtouch.h"

I have followed the steps from the readme (https://github.com/rockcarry/fanplayer/wiki/build-ffmpeg-for-android):

I have looked in the directory ./fanplayer/player-android/jni/soundtouch/source/Android-lib/jni. There is no file named soundtouch.h.

Do I missing something?

Best Regards, DaAlx

rockcarry commented 3 years ago

git clone https://github.com/rockcarry/soundtouch.git soundtouch-lib.h and soundtouch-lib.cpp is in directoy soundtouch/source/Android-lib/jni please check the build script build_fanplayer_jni.sh.

DaAlx commented 3 years ago

This unfortunately does not fix the error. The file soundtouch/source/Android-lib/jni/soundtouch-lib.cpp includes on line 39 the header file soundtouch.h. In this directory (https://github.com/rockcarry/soundtouch/tree/master/source/Android-lib/jni) there is no file with this name.

rockcarry commented 3 years ago

image

DaAlx commented 3 years ago

During the script execution the copy command on line 99 is never reached, because the error appears on line 80 (execution of ${CROSS_PREFIX}gcc command, in this case it is arm-linux-androideabi-gcc).

Do I missing some configuration?

rockcarry commented 3 years ago

check PATH environment variable: export PATH=$PATH:$ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_PATH/prebuilt/windows-x86_64/bin on ubuntu it is differernt, not windows-x86_64, but you should use the correct value of you ndk path

DaAlx commented 3 years ago

I changed the line 54 of the script (see my first post). So my PATH variable has the following value $PATH:$ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_PATH/prebuilt/linux-x86_64/bin.

rockcarry commented 3 years ago

try command: $ANDROID_NDK_HOME/toolchains/$TOOLCHAIN_PATH/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -v

DaAlx commented 3 years ago

I tried it with -v parameter but I'm not able to see what the error could be. Maybe you can figure out what is going wrong! build.log

tangfuhao commented 2 years ago

During the script execution the copy command on line 99 is never reached, because the error appears on line 80 (execution of ${CROSS_PREFIX}gcc command, in this case it is arm-linux-androideabi-gcc).

Do I missing some configuration?

soundtouch.h, the issue is file name lowercase.

MRDHR commented 10 months ago

modify soundtouch-lib.cpp line 39

include "soundtouch.h" to #include "SoundTouch.h"