Code Monkey home page Code Monkey logo

mediasoup-sfu-cpp's Introduction

Project Description:

This project is a C + + version based on the JS version of SFU in mediasoup V3, webrtc M77

It supports the same complete demo function as the JS version, but this project directly integrates the worker process code into the demo, which can be called directly at the code level;

Support the development environment of vc2019, Xcode and clion, and can directly debug the worker code at breakpoints;

The project supports all cross platform systems win, Linux, MAC, embedded arm and other systems, domestic Kirin system and embedded system compilation;

The compiled script supports cross platform compilation, win, Linux, MAC, embedded arm and other systems, and domestic Kirin system

1、Compile with vc2019 and update to the latest version

Under win, compile with the compiler llvm clang CL installed with vc2019

Directly execute the following command to generate vc2019 project file

.\genvs2019.bat

Note: right click all projects, select properties, and select the compiler llvm clang CL compiler installed with vc2019 to compile

Generate a project file to open the project compilation

Then copy

lib\win\x64\libssl-1_1-x64.dll
lib\win\x64\libcrypto-1_1-x64.dll

Go to the debug directory where the execution file is located

2、 Xcode compilation under mac

1). Establish dependency Library

./builddeps.sh

Generated executable

Release /bin directory

2). Compile and debug with Xcode development environment

./genxcode.sh

3、 Compiling under Linux gcc >= 8.4.0

./builddeps.sh
./build.sh

4、 Set config

Directory where the compiled executable file of the configuration file copy is located

The configuration file is in the root directory of the source code, demo / config Copy JSON to the Xcode / debug directory and the same directory as the execution file

Vc2019 needs to be copied to the corresponding debug directory, which is the same directory as the execution file

For detailed configuration, please refer to the configuration of the official mediasoup demo

The IP address in the configuration file needs to be configured with the intranet address and extranet address of the corresponding server

"IP": "192.168.1.192"
"Announcedip": "192.168.1.192" / / public network address

5、 Test client input address

At present, the client code has not been sorted out yet, and it will be open source in the future

Test client download address

Win download address:

test win client download

Mac download address:

test mac client download

Enter any number for the conference number, such as

Conference No.: 123456

User name: Test 1

The address bar is modified as follows: change the IP address to your own local address ws://192.168. 3.19:8001/

design sketch

image

6、Communication and technical support

Add wechat: James yhua, note: join the group, I'll pull you into the wechat group

image

7、Discord discussion group

https://discord.gg/f55DnczkEx

mediasoup-sfu-cpp's People

Contributors

ebird99 avatar gabys999 avatar james133 avatar pcgpcgpcg avatar shengqiangliu avatar yanhua133 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mediasoup-sfu-cpp's Issues

ubuntu22.04编译报错

  • ubuntu22.04编译报错
make[2]: *** No rule to make target '../release/lib/libabsl_bad_variant_access.a', needed by 'sfu-demo'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:232: demo/CMakeFiles/sfu-demo.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Consolidate compiler generated dependencies of target libwebrtc
[ 23%] Built target libwebrtc
Consolidate compiler generated dependencies of target worker
[ 83%] Built target worker
Consolidate compiler generated dependencies of target mediasoup
[ 94%] Built target mediasoup
Consolidate compiler generated dependencies of target sfu-demo
make[2]: *** No rule to make target '../release/lib/libabsl_bad_variant_access.a', needed by 'sfu-demo'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:232: demo/CMakeFiles/sfu-demo.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

编译问题centos8

[ 23%] Built target libwebrtc
[ 83%] Built target worker
[ 94%] Built target mediasoup
[ 95%] Linking CXX executable ../sfu-demo
../../release/lib/liboatpp-websocket.a(Handshaker.cpp.o): In function oatpp::websocket::Handshaker::serversideHandshake(oatpp::data::share::LazyStringMapTemplate<oatpp::data::share::StringKeyLabelCI_FAST, std::multimap<oatpp::data::share::StringKeyLabelCI_FAST, oatpp::data::share::StringKeyLabel, std::less<oatpp::data::share::StringKeyLabelCI_FAST>, std::allocator<std::pair<oatpp::data::share::StringKeyLabelCI_FAST const, oatpp::data::share::StringKeyLabel> > > > const&, std::shared_ptr<oatpp::network::ConnectionHandler> const&)': Handshaker.cpp:(.text+0x31e): undefined reference to oatpp::encoding::Base64::ALPHABET_BASE64'
Handshaker.cpp:(.text+0x353): undefined reference to oatpp::encoding::Base64::encode(oatpp::data::mapping::type::String const&, char const*)' ../../release/lib/liboatpp-websocket.a(Handshaker.cpp.o): In function oatpp::websocket::Handshaker::clientsideConfirmHandshake(oatpp::data::share::LazyStringMapTemplate<oatpp::data::share::StringKeyLabelCI_FAST, std::multimap<oatpp::data::share::StringKeyLabelCI_FAST, oatpp::data::share::StringKeyLabel, std::lessoatpp::data::share::StringKeyLabelCI_FAST, std::allocator<std::pair<oatpp::data::share::StringKeyLabelCI_FAST const, oatpp::data::share::StringKeyLabel> > > > const&, std::shared_ptroatpp::web::protocol::http::incoming::Response const&)':
Handshaker.cpp:(.text+0xbdf): undefined reference to oatpp::web::protocol::http::incoming::Response::getStatusCode() const' Handshaker.cpp:(.text+0xc04): undefined reference to oatpp::web::protocol::http::incoming::Response::getHeaders() const'
Handshaker.cpp:(.text+0xe3a): undefined reference to oatpp::encoding::Base64::ALPHABET_BASE64' Handshaker.cpp:(.text+0xe69): undefined reference to oatpp::encoding::Base64::encode(oatpp::data::mapping::type::String const&, char const*)'
../../release/lib/liboatpp-websocket.a(Utils.cpp.o): In function oatpp::websocket::Utils::generateMaskForFrame(oatpp::websocket::Frame::Header&)': Utils.cpp:(.text+0x33): undefined reference to oatpp::utils::random::Random::randomBytes(unsigned char*, long)'
../../release/lib/liboatpp-websocket.a(Utils.cpp.o): In function oatpp::websocket::Utils::generateKey()': Utils.cpp:(.text+0x8a): undefined reference to oatpp::utils::random::Random::randomBytes(unsigned char*, long)'
Utils.cpp:(.text+0x91): undefined reference to oatpp::encoding::Base64::ALPHABET_BASE64' Utils.cpp:(.text+0xa4): undefined reference to oatpp::encoding::Base64::encode(oatpp::data::mapping::type::String const&, char const*)'
collect2: error: ld returned 1 exit status
make[2]: *** [demo/CMakeFiles/sfu-demo.dir/build.make:272: sfu-demo] Error 1
make[1]: *** [CMakeFiles/Makefile2:232: demo/CMakeFiles/sfu-demo.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

oatpp相关的三个库都成功编译了。生成了.a。不知道为什么显示undefined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.