mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
Add Qos module
This commit is contained in:
5
src/qos/congestion_control.cpp
Normal file
5
src/qos/congestion_control.cpp
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#include "congestion_control.h"
|
||||||
|
|
||||||
|
CongestionControl::CongestionControl() {}
|
||||||
|
|
||||||
|
CongestionControl::~CongestionControl() {}
|
||||||
12
src/qos/congestion_control.h
Normal file
12
src/qos/congestion_control.h
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#ifndef _CONGESTION_CONTROL_H_
|
||||||
|
#define _CONGESTION_CONTROL_H_
|
||||||
|
|
||||||
|
class CongestionControl {
|
||||||
|
public:
|
||||||
|
CongestionControl();
|
||||||
|
~CongestionControl();
|
||||||
|
|
||||||
|
private:
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -80,7 +80,7 @@ int IceTransmission::InitIceTransmission(std::string &ip, int port) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int IceTransmission::DestroyIceTransmission() {
|
int IceTransmission::DestroyIceTransmission() {
|
||||||
LOG_INFO("[{}] Destroy ice transmission", user_id_);
|
LOG_INFO("[{}->{}] Destroy ice transmission", user_id_, remote_user_id_);
|
||||||
return ice_agent_->DestoryIceAgent();
|
return ice_agent_->DestoryIceAgent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "congestion_control.h"
|
||||||
#include "ice_agent.h"
|
#include "ice_agent.h"
|
||||||
#include "ws_transmission.h"
|
#include "ws_transmission.h"
|
||||||
|
|
||||||
@@ -56,6 +57,7 @@ class IceTransmission {
|
|||||||
private:
|
private:
|
||||||
IceAgent *ice_agent_ = nullptr;
|
IceAgent *ice_agent_ = nullptr;
|
||||||
WsTransmission *ice_ws_transport_ = nullptr;
|
WsTransmission *ice_ws_transport_ = nullptr;
|
||||||
|
CongestionControl *congestion_control_ = nullptr;
|
||||||
std::function<void(const char *, size_t)> on_receive_ice_msg_cb_ = nullptr;
|
std::function<void(const char *, size_t)> on_receive_ice_msg_cb_ = nullptr;
|
||||||
std::string local_sdp_;
|
std::string local_sdp_;
|
||||||
std::string remote_sdp_;
|
std::string remote_sdp_;
|
||||||
22
xmake.lua
22
xmake.lua
@@ -46,7 +46,7 @@ target("ice")
|
|||||||
add_deps("log", "common", "ws")
|
add_deps("log", "common", "ws")
|
||||||
add_packages("asio", "nlohmann_json", "libjuice")
|
add_packages("asio", "nlohmann_json", "libjuice")
|
||||||
add_files("src/ice/*.cpp")
|
add_files("src/ice/*.cpp")
|
||||||
add_includedirs("src/ws")
|
add_includedirs("src/ws", {public = true})
|
||||||
add_includedirs("thirdparty/libjuice/include", {public = true})
|
add_includedirs("thirdparty/libjuice/include", {public = true})
|
||||||
|
|
||||||
target("ws")
|
target("ws")
|
||||||
@@ -56,21 +56,33 @@ target("ws")
|
|||||||
add_packages("asio")
|
add_packages("asio")
|
||||||
add_includedirs("thirdparty/websocketpp/include", {public = true})
|
add_includedirs("thirdparty/websocketpp/include", {public = true})
|
||||||
|
|
||||||
|
target("qos")
|
||||||
|
set_kind("static")
|
||||||
|
add_deps("log")
|
||||||
|
add_files("src/qos/*.cpp")
|
||||||
|
|
||||||
|
target("transmission")
|
||||||
|
set_kind("static")
|
||||||
|
add_deps("log", "ws", "ice", "qos")
|
||||||
|
add_files("src/transmission/*.cpp")
|
||||||
|
add_packages("asio", "nlohmann_json")
|
||||||
|
add_includedirs("src/ws", "src/ice", "src/qos", {public = true})
|
||||||
|
|
||||||
target("pc")
|
target("pc")
|
||||||
set_kind("static")
|
set_kind("static")
|
||||||
add_deps("log")
|
add_deps("log")
|
||||||
add_deps("ws", "ice", "inih", "common")
|
add_deps("ws", "ice", "transmission", "inih", "common")
|
||||||
add_files("src/pc/*.cpp")
|
add_files("src/pc/*.cpp")
|
||||||
add_packages("asio", "nlohmann_json")
|
add_packages("asio", "nlohmann_json")
|
||||||
add_includedirs("src/ws", "src/ice")
|
add_includedirs("src/transmission", {public = true})
|
||||||
|
|
||||||
target("projectx")
|
target("projectx")
|
||||||
set_kind("shared")
|
set_kind("shared")
|
||||||
add_deps("log")
|
add_deps("log")
|
||||||
add_deps("ice", "ws", "pc")
|
add_deps("pc")
|
||||||
add_files("src/rtc/*.cpp")
|
add_files("src/rtc/*.cpp")
|
||||||
add_packages("asio", "nlohmann_json")
|
add_packages("asio", "nlohmann_json")
|
||||||
add_includedirs("src/rtc", "src/ice", "src/ws", "src/pc", "src/interface")
|
add_includedirs("src/rtc", "src/pc", "src/interface")
|
||||||
add_rules("utils.symbols.export_all", {export_classes = true})
|
add_rules("utils.symbols.export_all", {export_classes = true})
|
||||||
-- set_policy("build.merge_archive", true)
|
-- set_policy("build.merge_archive", true)
|
||||||
-- set_targetdir("$(projectdir)/libdrtc/lib")
|
-- set_targetdir("$(projectdir)/libdrtc/lib")
|
||||||
|
|||||||
Reference in New Issue
Block a user