versatica / libmediasoupclient

mediasoup client side C++ library
https://mediasoup.org
ISC License
288 stars 178 forks source link

upgrade to webrtc m120-6099。 #179

Closed janreyho closed 4 months ago

janreyho commented 5 months ago

I've upgraded libmediasoupclient to WebRTC m120-6099 and also updated the corresponding test demo, mediasoup-broadcaster-demo, to the same version.

This upgrade allows for successful room entry and video stream publishing.

Testing on a Mac with an M3 Max chip has been successful.

jmillan commented 4 months ago

Hi @janreyho,

The PR looks good, but the tests are still failing as in PR, which is what is blocking us from merging.

Would you please take a look at it so we make the test pass?

janreyho commented 4 months ago
/Users/hejiayi/Desktop/8_haoxinyun/gitlab/hxSDK/mediasoup/libmediasoupclient/.clang-tidy:5:1: error: unknown key 'AnalyzeTemporaryDtors'
AnalyzeTemporaryDtors: false
^~~~~~~~~~~~~~~~~~~~~
Error parsing /Users/hejiayi/Desktop/8_haoxinyun/gitlab/hxSDK/mediasoup/libmediasoupclient/.clang-tidy: Invalid argument
Enabled checks:
...
^~~~~~~~~~~~~~~~~~~~~
Error parsing /Users/hejiayi/Desktop/8_haoxinyun/gitlab/hxSDK/mediasoup/libmediasoupclient/.clang-tidy: Invalid argument
/Users/hejiayi/Desktop/8_haoxinyun/gitlab/hxSDK/mediasoup/libmediasoupclient/.clang-tidy:5:1: error: unknown key 'AnalyzeTemporaryDtors'
AnalyzeTemporaryDtors: false
^~~~~~~~~~~~~~~~~~~~~
Error parsing /Users/hejiayi/Desktop/8_haoxinyun/gitlab/hxSDK/mediasoup/libmediasoupclient/.clang-tidy: Invalid argument

clang-tidy -header-filter=^/Users/hejiayi/Desktop/8_haoxinyun/gitlab/hxSDK/mediasoup/libmediasoupclient/.* -p=/Users/hejiayi/Desktop/8_haoxinyun/gitlab/hxSDK/mediasoup/libmediasoupclient /Users/hejiayi/Desktop/8_haoxinyun/gitlab/hxSDK/mediasoup/libmediasoupclient/src/DataConsumer.cpp

/Users/hejiayi/Desktop/8_haoxinyun/gitlab/hxSDK/mediasoup/libmediasoupclient/.clang-tidy:5:1: error: unknown key 'AnalyzeTemporaryDtors'
AnalyzeTemporaryDtors: false

python scripts/clang-tidy.py generates many above errors

I use libmediasoupclient in mediasoup-broadcaster-demo is OK, and joining a room and publishing a stream is successfully。

jmillan commented 4 months ago

@janreyho, as I commented in your PR the current problem is that libmediasoupclient tests are failing, so very likely is the tests that need changes.

jmillan commented 4 months ago

In order to build the tests you need to set the -DMEDIASOUPCLIENT_BUILD_TESTS:BOOLEAN=ON flag.

cmake . -Bbuild \
  -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
  -DMEDIASOUPCLIENT_BUILD_TESTS:BOOLEAN=ON \
  -DMEDIASOUPCLIENT_LOG_TRACE:BOOLEAN=ON \
  -DMEDIASOUPCLIENT_LOG_DEV:BOOLEAN=ON \
  -DLIBWEBRTC_INCLUDE_PATH:PATH=${PATH_TO_LIBWEBRTC_SOURCES} \
  -DLIBWEBRTC_BINARY_PATH:PATH=${PATH_TO_LIBWEBRTC_BINARY} \
  -DCMAKE_CXX_FLAGS="-fvisibility=hidden" \
  -DCLANG_TIDY_FIX=ON

make -C build/
janreyho commented 4 months ago

@jmillan After modifying the three test case files:

test/src/Handler.test.cpp
test/src/MediaStreamTrackFactory.cpp
test/src/mediasoupclient.test.cpp

The individual TEST_CASE tests have all passed:

(base) ➜  libmediasoupclient git:(m120) ✗ ./build/test/test_mediasoupclient.app/Contents/MacOS/test_mediasoupclient mediasoupclient
Filters: mediasoupclient mediasoupclient
===============================================================================
All tests passed (189 assertions in 1 test case)

(base) ➜  libmediasoupclient git:(m120) ✗ ./build/test/test_mediasoupclient.app/Contents/MacOS/test_mediasoupclient Handler
Filters: Handler Handler
===============================================================================
All tests passed (4 assertions in 1 test case)

(base) ➜  libmediasoupclient git:(m120) ✗
(base) ➜  libmediasoupclient git:(m120) ./build/test/test_mediasoupclient.app/Contents/MacOS/test_mediasoupclient Device
Filters: Device Device
===============================================================================
All tests passed (15 assertions in 1 test case)

(base) ➜  libmediasoupclient git:(m120) ./build/test/test_mediasoupclient.app/Contents/MacOS/test_mediasoupclient PeerConnection
Filters: PeerConnection PeerConnection
===============================================================================
All tests passed (8 assertions in 1 test case)

(base) ➜  libmediasoupclient git:(m120) ./build/test/test_mediasoupclient.app/Contents/MacOS/test_mediasoupclient SendHandler
Filters: SendHandler SendHandler
===============================================================================
All tests passed (16 assertions in 1 test case)

(base) ➜  libmediasoupclient git:(m120)

Other test cases are also OK, but the overall test reports:segmentation fault

(base) ➜  libmediasoupclient git:(m120) ./build/test/test_mediasoupclient.app/Contents/MacOS/test_mediasoupclient
===============================================================================
All tests passed (338 assertions in 15 test cases)

[1]    45251 segmentation fault  ./build/test/test_mediasoupclient.app/Contents/MacOS/test_mediasoupclient
(base) ➜  libmediasoupclient git:(m120)

I still don't know how to locate the problem。