Closed Ha2ryZhang closed 2 years ago
好的 谢谢
可以参考我门最近开源的 https://github.com/anyrtcIO-Community/anyRTC-RTMP-OpenSource/tree/master/Prj-Android 里面有用webrtc采集编码的demo
ninja: error: 'D:/anyRTC-RTMP-OpenSource-master/Prj-Android/liveplayer/src/main/cpp/lib/ffmpeg/arm64-v8a/libswscale.so', needed by 'D:/anyRTC-RTMP-OpenSource-master/Prj-Android/liveplayer/build/intermediates/cxx/Debug/145j3x95/obj/arm64-v8a/libanyLive.so', missing and no known rule to make it 找不到这个so
http://storage.agrtc.cn/share/GqLZRZV3
下载解压缩后将lib文件夹移至:liveplayer/src/main/cpp 目录下即可
Error while executing process C:\Users\harryzhang\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\ninja.exe with arguments {-C D:\android_dev\anyRTC-RTMP-OpenSource\Prj-Android\liveplayer\.cxx\Debug\113x5n2y\arm64-v8a anyLive}
ninja: Entering directory `D:\android_dev\anyRTC-RTMP-OpenSource\Prj-Android\liveplayer\.cxx\Debug\113x5n2y\arm64-v8a'
[1/1] Linking CXX shared library D:\android_dev\anyRTC-RTMP-OpenSource\Prj-Android\liveplayer\build\intermediates\cxx\Debug\113x5n2y\obj\arm64-v8a\libanyLive.so
FAILED: D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/build/intermediates/cxx/Debug/113x5n2y/obj/arm64-v8a/libanyLive.so
cmd.exe /C "cd . && C:\Users\harryzhang\AppData\Local\Android\Sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=C:/Users/harryzhang/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/harryzhang/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -std=c++14 -DANDROID -fno-rtti -fno-limit-debug-info -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -Wl,--gc-sections -Wl,--exclude-libs,D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libswscale.so,D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libavformat.so,D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libavcodec.so,D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libavfilter.so,D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libavutil.so,D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libswresample.so,D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libpostproc.so,D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//webrtc/arm64-v8a/libwebrtc.a -shared -Wl,-soname,libanyLive.so -o D:\android_dev\anyRTC-RTMP-OpenSource\Prj-Android\liveplayer\build\intermediates\cxx\Debug\113x5n2y\obj\arm64-v8a\libanyLive.so CMakeFiles/anyLive.dir/jni/LiveEngine.cpp.o CMakeFiles/anyLive.dir/jni/StaticThreads.cpp.o CMakeFiles/anyLive.dir/jni/android/AndroidContext.cpp.o CMakeFiles/anyLive.dir/jni/android/VideoCameraCapturer.cpp.o CMakeFiles/anyLive.dir/jni/liveEngine/ArLivePlayEvent.cpp.o CMakeFiles/anyLive.dir/jni/liveEngine/ArLivePushEvent.cpp.o CMakeFiles/anyLive.dir/jni/liveEngine/AndroidDeviceManager.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/AndroidRenderer.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/ArLive2Engine.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/PlatformImpl.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/ArLive2Player.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/ArLive2Pusher.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/codec/aacencode.cc.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/codec/AvCodec.cc.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/MgrRender.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/PlayBuffer.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/player/ARFFPlayer.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/player/FFBuffer.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/player/sonic.c.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/pusher/ARRtmpPusher.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/ArNetClient.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/ArNetTcpClient.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/RtcTick.cpp.o CMakeFiles/anyLive.dir/D_/android_dev/anyRTC-RTMP-OpenSource/ArLiveLite/H264SeiPack.cpp.o CMakeFiles/anyLive.dir/jni/util/ClassreferenceHolder.cc.o libfaac.a librtmp.a -Wl,--start-group D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libswscale.so D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libavformat.so D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libavcodec.so D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libavfilter.so D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libswresample.so D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libpostproc.so D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//ffmpeg/arm64-v8a/libavutil.so -Wl,--end-group -Wl,--whole-archive D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//webrtc/arm64-v8a/libwebrtc.a -Wl,--no-whole-archive -lOpenSLES -llog -latomic -lm && cd ."
ld: error: duplicate symbol: webrtc::CreatePeerConnectionFactory(rtc::Thread*, rtc::Thread*, rtc::Thread*, rtc::scoped_refptr<webrtc::AudioDeviceModule>, rtc::scoped_refptr<webrtc::AudioEncoderFactory>, rtc::scoped_refptr<webrtc::AudioDecoderFactory>, std::__ndk1::unique_ptr<webrtc::VideoEncoderFactory, std::__ndk1::default_delete<webrtc::VideoEncoderFactory> >, std::__ndk1::unique_ptr<webrtc::VideoDecoderFactory, std::__ndk1::default_delete<webrtc::VideoDecoderFactory> >, rtc::scoped_refptr<webrtc::AudioMixer>, rtc::scoped_refptr<webrtc::AudioProcessing>, webrtc::AudioFrameProcessor*)
>>> defined at create_peerconnection_factory.cc:41 (../../api\create_peerconnection_factory.cc:41)
>>> create_peerconnection_factory.o:(webrtc::CreatePeerConnectionFactory(rtc::Thread*, rtc::Thread*, rtc::Thread*, rtc::scoped_refptr<webrtc::AudioDeviceModule>, rtc::scoped_refptr<webrtc::AudioEncoderFactory>, rtc::scoped_refptr<webrtc::AudioDecoderFactory>, std::__ndk1::unique_ptr<webrtc::VideoEncoderFactory, std::__ndk1::default_delete<webrtc::VideoEncoderFactory> >, std::__ndk1::unique_ptr<webrtc::VideoDecoderFactory, std::__ndk1::default_delete<webrtc::VideoDecoderFactory> >, rtc::scoped_refptr<webrtc::AudioMixer>, rtc::scoped_refptr<webrtc::AudioProcessing>, webrtc::AudioFrameProcessor*)) in archive D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//webrtc/arm64-v8a/libwebrtc.a
>>> defined at create_peerconnection_factory.cc:41 (../../api\create_peerconnection_factory.cc:41)
>>> create_peerconnection_factory.o:(.text._ZN6webrtc27CreatePeerConnectionFactoryEPN3rtc6ThreadES2_S2_NS0_13scoped_refptrINS_17AudioDeviceModuleEEENS3_INS_19AudioEncoderFactoryEEENS3_INS_19AudioDecoderFactoryEEENSt6__ndk110unique_ptrINS_19VideoEncoderFactoryENSA_14default_deleteISC_EEEENSB_INS_19VideoDecoderFactoryENSD_ISG_EEEENS3_INS_10AudioMixerEEENS3_INS_15AudioProcessingEEEPNS_19AudioFrameProcessorE+0x0) in archive D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//webrtc/arm64-v8a/libwebrtc.a
ld: error: duplicate symbol: cricket::Candidate::Candidate()
>>> defined at candidate.cc:27 (../../api\candidate.cc:27)
>>> candidate.o:(cricket::Candidate::Candidate()) in archive D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//webrtc/arm64-v8a/libwebrtc.a
>>> defined at candidate.cc:27 (../../api\candidate.cc:27)
>>> candidate.o:(.text._ZN7cricket9CandidateC2Ev+0x0) in archive D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//webrtc/arm64-v8a/libwebrtc.a
ld: error: duplicate symbol: cricket::Candidate::Candidate(int, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, rtc::SocketAddress const&, unsigned int, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, unsigned int, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, unsigned short, unsigned short)
>>> defined at candidate.cc:52 (../../api\candidate.cc:52)
>>> candidate.o:(cricket::Candidate::Candidate(int, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, rtc::SocketAddress const&, unsigned int, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, unsigned int, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, unsigned short, unsigned short)) in archive D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//webrtc/arm64-v8a/libwebrtc.a
>>> defined at candidate.cc:52 (../../api\candidate.cc:52)
>>> candidate.o:(.text._ZN7cricket9CandidateC2EiRKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKN3rtc13SocketAddressEjS9_S9_S9_jS9_tt+0x0) in archive D:/android_dev/anyRTC-RTMP-OpenSource/Prj-Android/liveplayer/src/main/cpp/lib//webrtc/arm64-v8a/libwebrtc.a
//省略一样的错
@Ha2ryZhang 使用 NDK 版本:20.0.5594570 编译
可以参考我门最近开源的 https://github.com/anyrtcIO-Community/anyRTC-RTMP-OpenSource/tree/master/Prj-Android 里面有用webrtc采集编码的demo