mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
Fix ice status check error
This commit is contained in:
@@ -504,8 +504,6 @@ int main() {
|
|||||||
rect, 60,
|
rect, 60,
|
||||||
[](unsigned char *data, int size, int width,
|
[](unsigned char *data, int size, int width,
|
||||||
int height) -> void {
|
int height) -> void {
|
||||||
// std::cout << "Send" << std::endl;
|
|
||||||
|
|
||||||
auto now_time = std::chrono::high_resolution_clock::now();
|
auto now_time = std::chrono::high_resolution_clock::now();
|
||||||
std::chrono::duration<double> duration =
|
std::chrono::duration<double> duration =
|
||||||
now_time - last_frame_time_;
|
now_time - last_frame_time_;
|
||||||
@@ -516,6 +514,7 @@ int main() {
|
|||||||
(unsigned char *)nv12_buffer_);
|
(unsigned char *)nv12_buffer_);
|
||||||
SendData(peer_server, DATA_TYPE::VIDEO,
|
SendData(peer_server, DATA_TYPE::VIDEO,
|
||||||
(const char *)nv12_buffer_, NV12_BUFFER_SIZE);
|
(const char *)nv12_buffer_, NV12_BUFFER_SIZE);
|
||||||
|
// std::cout << "Send" << std::endl;
|
||||||
last_frame_time_ = now_time;
|
last_frame_time_ = now_time;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ int PeerConnection::Init(PeerConnectionParams params,
|
|||||||
};
|
};
|
||||||
|
|
||||||
on_ice_status_change_ = [this](std::string ice_status) {
|
on_ice_status_change_ = [this](std::string ice_status) {
|
||||||
if ("JUICE_STATE_COMPLETED" == ice_status) {
|
if ("completed" == ice_status) {
|
||||||
ice_ready_ = true;
|
ice_ready_ = true;
|
||||||
b_force_i_frame_ = true;
|
b_force_i_frame_ = true;
|
||||||
LOG_INFO("Ice finish");
|
LOG_INFO("Ice finish");
|
||||||
@@ -209,7 +209,7 @@ int PeerConnection::Leave() {
|
|||||||
{"transmission_id", transmission_id_}};
|
{"transmission_id", transmission_id_}};
|
||||||
if (ws_transport_) {
|
if (ws_transport_) {
|
||||||
ws_transport_->Send(message.dump());
|
ws_transport_->Send(message.dump());
|
||||||
LOG_INFO("[{}] sends leave transmission [{}] notification ",
|
LOG_INFO("[{}] sends leave transmission [{}] notification ", user_id_,
|
||||||
transmission_id_);
|
transmission_id_);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -11,11 +11,6 @@
|
|||||||
|
|
||||||
using nlohmann::json;
|
using nlohmann::json;
|
||||||
|
|
||||||
const std::vector<std::string> ice_status = {
|
|
||||||
"JUICE_STATE_DISCONNECTED", "JUICE_STATE_GATHERING",
|
|
||||||
"JUICE_STATE_CONNECTING", "JUICE_STATE_CONNECTED",
|
|
||||||
"JUICE_STATE_COMPLETED", "JUICE_STATE_FAILED"};
|
|
||||||
|
|
||||||
IceTransmission::IceTransmission(
|
IceTransmission::IceTransmission(
|
||||||
bool offer_peer, std::string &transmission_id, std::string &user_id,
|
bool offer_peer, std::string &transmission_id, std::string &user_id,
|
||||||
std::string &remote_user_id,
|
std::string &remote_user_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user