Discussion:
[FFmpeg-user] Android NDK r18b support
Taner Sener
2018-12-06 21:38:11 UTC
Permalink
Hello,

I’m trying to compile git master with Android NDK r18b but having the
following errors. The same method works on the older NDK releases, so it
looks like something has changed in the new NDK r18b. Do you have any ideas
how to resolve it? Also I don’t need v4l2 actually, disabling the
compilation of libavdevice/v4l2.c will also help me but I guess it is not
possible.

I'm using the following steps to cross-compile ffmpeg:



cd $ANDROID_NDK_ROOT/build/tools

./make_standalone_toolchain.py --arch arm --api 21 --stl libc++
--install-dir $ANDROID_NDK_ROOT/toolchains/test-arm

./configure
--cross-prefix=$ANDROID_NDK_ROOT/toolchains/test-arm/bin/arm-linux-androideabi-
--sysroot=$ANDROID_NDK_ROOT/toolchains/test-arm/sysroot --arch=arm
--target-os=android

make

---------------------------------------------

...

libavdevice/v4l2.c:135:9: error: assigning to 'int (*)(int, unsigned long,
...)' from incompatible type

'<overloaded function type>'

SET_WRAPPERS();

^~~~~~~~~~~~~~

libavdevice/v4l2.c:121:17: note: expanded from macro 'SET_WRAPPERS'

s->ioctl_f = prefix ## ioctl; \

^ ~~~~~

/Users/taner/Library/Android/sdk/ndk-bundle/toolchains/test-arm/sysroot/usr/include/bits/ioctl.h:56:5:
note: candidate function

has type mismatch at 2nd parameter (expected 'unsigned long' but has
'unsigned int')

int ioctl(int __fd, unsigned __request, ...) __overloadable __enable_if(1,
"") __RENAME(ioctl);

^

/Users/taner/Library/Android/sdk/ndk-bundle/toolchains/test-arm/sysroot/usr/include/bits/ioctl.h:36:5:
note: candidate function

has type mismatch at 2nd parameter (expected 'unsigned long' but has
'int')

int ioctl(int __fd, int __request, ...);

^

1 error generated.

make: *** [libavdevice/v4l2.o] Error 1



Thanks
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject
Davood Falahati
2018-12-06 21:52:24 UTC
Permalink
Post by Taner Sener
I'm using the following steps to cross-compile ffmpeg
Follow this:
https://github.com/falahati1987/ffmpeg4Android

Hope it would help


- Davood Falahati
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subject "
Carl Eugen Hoyos
2018-12-06 22:22:21 UTC
Permalink
Post by Davood Falahati
Post by Taner Sener
I'm using the following steps to cross-compile ffmpeg
https://github.com/falahati1987/ffmpeg4Android
--extra-cflags="-DANDROID -fPIC
-I$HOME/work/FFMPEG/ffmpeg-build/armeabi-v7a/include
-ffunction-sections -funwind-tables -fstack-protector -march=arm
-mfloat-abi=softfp -mfpu=vfpv3-d16 -fomit-frame-pointer
-fstrict-aliasing -funswitch-loops -finline-limit=300" \
--extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib
-L$HOME/work/FFMPEG/ffmpeg-build/armeabi-v7a/lib -lx264
-L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog " \
Are any of those useful?
If yes, why shouldn't we add them to our configure script?

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with sub
Carl Eugen Hoyos
2018-12-06 22:19:38 UTC
Permalink
Post by Taner Sener
Hello,
I’m trying to compile git master with Android NDK r18b but having the
following errors. The same method works on the older NDK releases, so it
looks like something has changed in the new NDK r18b. Do you have any ideas
how to resolve it? Also I don’t need v4l2 actually, disabling the
compilation of libavdevice/v4l2.c will also help me but I guess it is not
possible.
cd $ANDROID_NDK_ROOT/build/tools
./make_standalone_toolchain.py --arch arm --api 21 --stl libc++
--install-dir $ANDROID_NDK_ROOT/toolchains/test-arm
./configure
--cross-prefix=$ANDROID_NDK_ROOT/toolchains/test-arm/bin/arm-linux-androideabi-
--sysroot=$ANDROID_NDK_ROOT/toolchains/test-arm/sysroot --arch=arm
--target-os=android
Work-around is to add: --disable-indev=v4l2

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpe
Taner Sener
2018-12-06 22:43:56 UTC
Permalink
Post by Carl Eugen Hoyos
Work-around is to add: --disable-indev=v4l2
Thanks Carl, this flag saved my day.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-re
Carl Eugen Hoyos
2018-12-06 22:51:21 UTC
Permalink
Post by Taner Sener
Post by Carl Eugen Hoyos
Work-around is to add: --disable-indev=v4l2
Thanks Carl, this flag saved my day.
Patch (ugly) sent:
http://ffmpeg.org/pipermail/ffmpeg-devel/2018-December/237289.html

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-reques
Carl Eugen Hoyos
2018-12-10 23:59:45 UTC
Permalink
Post by Taner Sener
I’m trying to compile git master with Android NDK r18b but having the
following errors. The same method works on the older NDK releases,
so it looks like something has changed in the new NDK r18b. Do you
have any ideas how to resolve it?
v4l2 compilation error should be fixed in current FFmpeg git head.

Thank you for the report, Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@f
Taner Sener
2018-12-11 06:19:10 UTC
Permalink
Post by Carl Eugen Hoyos
v4l2 compilation error should be fixed in current FFmpeg git head.
Thank you for the report, Carl Eugen
You're welcome. Thank you for the fix too.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
f

Loading...