cisco / openh264

Open Source H.264 Codec
BSD 2-Clause "Simplified" License
5.56k stars 1.8k forks source link

build ffmpeg with openh264 on android problem #2937

Open idoit opened 6 years ago

idoit commented 6 years ago

I have build the openh264 on android use this cmd. make OS=android NDKROOT=$ANDROID_NDK TARGET=android-9 ARCH=arm NDKLEVEL=9

And then I build the ffmpeg add --enable-libopenh264 --enable-encoder=libopenh264 and link to libopenh264.a ,but the configure failed with this message: /Users/xxx/openh264/arm/lib/libopenh264.a(welsEncoderExt.o):welsEncoderExt.cpp:function WelsEnc::CWelsH264SVCEncoder::~CWelsH264SVCEncoder(): error: undefined reference to 'operator delete(void)' /Users/xxx/openh264/arm/lib/libopenh264.a(welsEncoderExt.o):welsEncoderExt.cpp:function WelsEnc::CWelsH264SVCEncoder::~CWelsH264SVCEncoder(): error: undefined reference to 'operator delete(void)' /Users/xxx/openh264/arm/lib/libopenh264.a(welsEncoderExt.o):welsEncoderExt.cpp:function WelsEnc::CWelsH264SVCEncoder::InitEncoder(): error: undefined reference to 'operator new(unsigned int)' /Users/xxx/openh264/arm/lib/libopenh264.a(welsEncoderExt.o):welsEncoderExt.cpp:function WelsCreateSVCEncoder: error: undefined reference to 'operator new(unsigned int)' /Users/xxx/openh264/arm/lib/libopenh264.a(welsEncoderExt.o):welsEncoderExt.cpp:function ISVCEncoder::~ISVCEncoder(): error: undefined reference to 'operator delete(void*)' /Users/xxx/openh264/arm/lib/libopenh264.a(welsEncoderExt.o):welsEncoderExt.cpp:vtable for ISVCEncoder: error: undefined reference to 'cxa_pure_virtual' /Users/xxx/openh264/arm/lib/libopenh264.a(welsEncoderExt.o):welsEncoderExt.cpp:vtable for ISVCEncoder: error: undefined reference to 'cxa_pure_virtual' /Users/xxx/openh264/arm/lib/libopenh264.a(welsEncoderExt.o):welsEncoderExt.cpp:vtable for ISVCEncoder: error: undefined reference to 'cxa_pure_virtual' /Users/xxx/openh264/arm/lib/libopenh264.a(welsEncoderExt.o):welsEncoderExt.cpp:vtable for ISVCEncoder: error: undefined reference to 'cxa_pure_virtual' /Users/xxx/openh264/arm/lib/libopenh264.a(encoder_ext.o):encoder_ext.cpp:function WelsEnc::WelsInitEncoderExt(WelsEnc::TagWelsEncCtx*, WelsEnc::TagWelsSvcCodingParam, TagLogContext, WelsEnc::TagExistingParasetList): error: undefined reference to 'operator new(unsigned int)' /Users/xxx/openh264/arm/lib/libopenh264.a(encoder_ext.o):encoder_ext.cpp:function WelsEnc::WelsInitEncoderExt(WelsEnc::TagWelsEncCtx*, WelsEnc::TagWelsSvcCodingParam, TagLogContext, WelsEnc::TagExistingParasetList): error: undefined reference to 'operator new(unsigned int)' /Users/xxx/openh264/arm/lib/libopenh264.a(wels_preprocess.o):wels_preprocess.cpp:function WelsEnc::CWelsPreProcess::~CWelsPreProcess(): error: undefined reference to 'operator delete(void*)'

so, can anybody give some advices,Thanks!

GuangweiWang commented 6 years ago

is this file "/Users/xxx/openh264/arm/lib/libopenh264.a" the file built by "make OS=android NDKROOT=$ANDROID_NDK TARGET=android-9 ARCH=arm NDKLEVEL=9" ?

idoit commented 6 years ago

yes.

jpxiong commented 5 years ago

Did you solve it ? @idoit

elesos commented 5 years ago

up

GuangweiWang commented 5 years ago

@idoit which is your NDK version? this may be caused by there is not android-9 on your NDK toolchain. can you help to check this path exists or not: $ANDROID_NDK/platforms/android-9 ?

alexcohn commented 4 years ago

see https://github.com/tanersener/mobile-ffmpeg. This project allows to build ffmpeg with openh264.