Delete invalid code

This commit is contained in:
xiongziliang 2024-03-23 22:52:40 +08:00
parent 029813402d
commit d8893877b2
3 changed files with 3 additions and 5 deletions

View File

@ -304,7 +304,7 @@ API_EXPORT void API_CALL mk_webrtc_get_answer_sdp2(void *user_data, on_user_data
std::string offer_str = offer; std::string offer_str = offer;
std::shared_ptr<void> ptr(user_data, user_data_free ? user_data_free : [](void *) {}); std::shared_ptr<void> ptr(user_data, user_data_free ? user_data_free : [](void *) {});
auto args = std::make_shared<WebRtcArgsUrl>(url); auto args = std::make_shared<WebRtcArgsUrl>(url);
WebRtcPluginManager::Instance().negotiateSdp(*session, type, *args, [offer_str, session, ptr, cb, args](const WebRtcInterface &exchanger) mutable { WebRtcPluginManager::Instance().negotiateSdp(*session, type, *args, [offer_str, session, ptr, cb](const WebRtcInterface &exchanger) mutable {
auto &handler = const_cast<WebRtcInterface &>(exchanger); auto &handler = const_cast<WebRtcInterface &>(exchanger);
try { try {
auto sdp_answer = handler.getAnswerSdp(offer_str); auto sdp_answer = handler.getAnswerSdp(offer_str);

View File

@ -1770,7 +1770,7 @@ void installWebApi() {
auto &session = static_cast<Session&>(sender); auto &session = static_cast<Session&>(sender);
auto args = std::make_shared<WebRtcArgsImp>(allArgs, sender.getIdentifier()); auto args = std::make_shared<WebRtcArgsImp>(allArgs, sender.getIdentifier());
WebRtcPluginManager::Instance().negotiateSdp(session, type, *args, [invoker, val, offer, headerOut, args](const WebRtcInterface &exchanger) mutable { WebRtcPluginManager::Instance().negotiateSdp(session, type, *args, [invoker, val, offer, headerOut](const WebRtcInterface &exchanger) mutable {
auto &handler = const_cast<WebRtcInterface &>(exchanger); auto &handler = const_cast<WebRtcInterface &>(exchanger);
try { try {
val["sdp"] = handler.getAnswerSdp(offer); val["sdp"] = handler.getAnswerSdp(offer);
@ -1793,7 +1793,7 @@ void installWebApi() {
auto &session = static_cast<Session&>(sender); auto &session = static_cast<Session&>(sender);
auto location = std::string(session.overSsl() ? "https://" : "http://") + allArgs["host"] + delete_webrtc_url; auto location = std::string(session.overSsl() ? "https://" : "http://") + allArgs["host"] + delete_webrtc_url;
auto args = std::make_shared<WebRtcArgsImp>(allArgs, sender.getIdentifier()); auto args = std::make_shared<WebRtcArgsImp>(allArgs, sender.getIdentifier());
WebRtcPluginManager::Instance().negotiateSdp(session, type, *args, [invoker, offer, headerOut, location, args](const WebRtcInterface &exchanger) mutable { WebRtcPluginManager::Instance().negotiateSdp(session, type, *args, [invoker, offer, headerOut, location](const WebRtcInterface &exchanger) mutable {
auto &handler = const_cast<WebRtcInterface &>(exchanger); auto &handler = const_cast<WebRtcInterface &>(exchanger);
try { try {
// 设置返回类型 // 设置返回类型

View File

@ -35,8 +35,6 @@ extern const std::string kTcpPort;
extern const std::string kTimeOutSec; extern const std::string kTimeOutSec;
}//namespace RTC }//namespace RTC
class WebRtcArgs;
class WebRtcInterface { class WebRtcInterface {
public: public:
virtual ~WebRtcInterface() = default; virtual ~WebRtcInterface() = default;