haiyangwu / mediasoup-demo-android

mediasoup android demo https://demo.mediasoup.org
97 stars 65 forks source link

No implementation found for void org.webrtc.voiceengine.WebRtcAudioRecord.nativeDataIsRecorded(int, long) #23

Closed leo-wxy closed 3 years ago

leo-wxy commented 4 years ago
yinbiaos commented 3 years ago

i have get the same error, did you have any idea?

leo-wxy commented 3 years ago

i have get the same error, did you have any idea?

你可以试试重新编译对应的mediasoup-client-android,我是后来编译之后,直接集成就没问题了。应该是依赖的有问题

acoderleex commented 3 years ago

i have get the same error, did you have any idea?

你可以试试重新编译对应的mediasoup-client-android,我是后来编译之后,直接集成就没问题了。应该是依赖的有问题

大佬有对应的编译教程吗

leo-wxy commented 3 years ago

i have get the same error, did you have any idea?

你可以试试重新编译对应的mediasoup-client-android,我是后来编译之后,直接集成就没问题了。应该是依赖的有问题

大佬有对应的编译教程吗

我是基于Ubuntu 18.04版本进行编译的

编译webrtc

//编译工具下载
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATh="$PATH:${HOME}/depot_tools" //配置环境变量

//下载webrtc源码
mkdir webrtc_android
cd webrtc_android
git clone https://webrtc.googlesource.com/src
fetch --nohooks webrtc_android
gclient sync

//编译webrtc源码
cd src
./build/install-build-deps.sh

gn gen out/Debug --args='target_os="android" target_cpu="arm"'
// gn gen out/Release --args='is_debug=false is_component_build=false rtc_include_tests=false target_os="android" target_cpu="arm"'

autoninja -C out/Debug
//autoninja -C out/Release

对应文件输出目录:

./out/Debug/lib_java/sdk/android/libwebrtc.jar

./out/Debug/libjingle_peerconnection_so.so

上面这俩是Android需要用到的sdk

./out/Debug/lib.unstripped/libjingle_peerconnection_so.so

./out/Debug/obj/libwebrtc.a //静态链接

编译libmediasoupclient

下载代码

git clone https://github.com/versatica/libmediasoupclient

cd libmediasoupclient/

编译配置

cmake . -Bbuild \
-DLIBWEBRTC_INCLUDE_PATH:PATH=PATH_TO_LIBWEBRTC_SOURCES \     # src源代码目录
-DLIBWEBRTC_BINARY_PATH:PATH=PATH_TO_LIBWEBRTC_BINARY         # 编译出libwebrtc.a目录

示例配置

cmake . -Bbuild -DLIBWEBRTC_INCLUDE_PATH:PATH=/home/zaze/Desktop/webrtc_android/src -DLIBWEBRTC_BINARY_PATH:PATH=/home/XXX/Desktop/webrtc_android/src/out/Debug/obj

运行命令后,再执行

make -C build/

./build/目录下会生成libmediasoupclient.a文件取出备用

获取libmediasoupclient sdk

基于mediasoup-client-android进行编译,注意以下关键点:

我是基于Ubuntu 18.04进行编译的

acoderleex commented 3 years ago

i have get the same error, did you have any idea?

你可以试试重新编译对应的mediasoup-client-android,我是后来编译之后,直接集成就没问题了。应该是依赖的有问题

大佬有对应的编译教程吗

我是基于Ubuntu 18.04版本进行编译的

编译webrtc

//编译工具下载
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATh="$PATH:${HOME}/depot_tools" //配置环境变量

//下载webrtc源码
mkdir webrtc_android
cd webrtc_android
git clone https://webrtc.googlesource.com/src
fetch --nohooks webrtc_android
gclient sync

//编译webrtc源码
cd src
./build/install-build-deps.sh

gn gen out/Debug --args='target_os="android" target_cpu="arm"'
// gn gen out/Release --args='is_debug=false is_component_build=false rtc_include_tests=false target_os="android" target_cpu="arm"'

autoninja -C out/Debug
//autoninja -C out/Release

对应文件输出目录:

./out/Debug/lib_java/sdk/android/libwebrtc.jar

./out/Debug/libjingle_peerconnection_so.so

上面这俩是Android需要用到的sdk

./out/Debug/lib.unstripped/libjingle_peerconnection_so.so

./out/Debug/obj/libwebrtc.a //静态链接

编译libmediasoupclient

下载代码

git clone https://github.com/versatica/libmediasoupclient

cd libmediasoupclient/

编译配置

cmake . -Bbuild \
-DLIBWEBRTC_INCLUDE_PATH:PATH=PATH_TO_LIBWEBRTC_SOURCES \     # src源代码目录
-DLIBWEBRTC_BINARY_PATH:PATH=PATH_TO_LIBWEBRTC_BINARY         # 编译出libwebrtc.a目录

示例配置

cmake . -Bbuild -DLIBWEBRTC_INCLUDE_PATH:PATH=/home/zaze/Desktop/webrtc_android/src -DLIBWEBRTC_BINARY_PATH:PATH=/home/XXX/Desktop/webrtc_android/src/out/Debug/obj

运行命令后,再执行

make -C build/

./build/目录下会生成libmediasoupclient.a文件取出备用

获取libmediasoupclient sdk

基于mediasoup-client-android进行编译,注意以下关键点:

  • clone后的项目里面的mediasoup-client/deps/webrtc/lib里面的libwebrtc.a文件都是有误的,需要从https://github.com/haiyangwu/webrtc-android-build获取对应版本的文件,下载完成后替换原有的libs目录

我是基于Ubuntu 18.04进行编译的

THX.我倒是编译出来了四个版本的libmediasoupclient.a文件,但是基于mediasoup-client-android进行编译这个不清楚怎么改造了,大佬能否再次不吝赐教

haiyangwu commented 3 years ago

ref: https://github.com/haiyangwu/mediasoup-client-android/blob/dev/mediasoup-client/CMakeLists.txt