mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 12:15:34 +08:00
Check ice status by using ice_transmission::state_ instead of nice_agent_get_component_state() method
This commit is contained in:
@@ -228,11 +228,11 @@ int IceAgent::Send(const char *data, size_t size) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (NiceComponentState::NICE_COMPONENT_STATE_READY !=
|
||||
nice_agent_get_component_state(agent_, stream_id_, 1)) {
|
||||
LOG_ERROR("Nice agent not ready");
|
||||
return -1;
|
||||
}
|
||||
// if (NiceComponentState::NICE_COMPONENT_STATE_READY !=
|
||||
// nice_agent_get_component_state(agent_, stream_id_, 1)) {
|
||||
// LOG_ERROR("Nice agent not ready");
|
||||
// return -1;
|
||||
// }
|
||||
|
||||
nice_agent_send(agent_, stream_id_, 1, size, data);
|
||||
return 0;
|
||||
|
||||
@@ -53,6 +53,10 @@ int IceTransmission::InitIceTransmission(
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (state_ != NICE_COMPONENT_STATE_READY) {
|
||||
return -2;
|
||||
}
|
||||
|
||||
return ice_agent_->Send(data, size);
|
||||
});
|
||||
rtp_video_receiver_->SetOnReceiveCompleteFrame(
|
||||
@@ -73,6 +77,10 @@ int IceTransmission::InitIceTransmission(
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (state_ != NICE_COMPONENT_STATE_READY) {
|
||||
return -2;
|
||||
}
|
||||
|
||||
return ice_agent_->Send(data, size);
|
||||
});
|
||||
|
||||
@@ -93,6 +101,10 @@ int IceTransmission::InitIceTransmission(
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (state_ != NICE_COMPONENT_STATE_READY) {
|
||||
return -2;
|
||||
}
|
||||
|
||||
return ice_agent_->Send(data, size);
|
||||
});
|
||||
|
||||
@@ -106,6 +118,10 @@ int IceTransmission::InitIceTransmission(
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (state_ != NICE_COMPONENT_STATE_READY) {
|
||||
return -2;
|
||||
}
|
||||
|
||||
return ice_agent_->Send(data, size);
|
||||
});
|
||||
|
||||
@@ -119,6 +135,10 @@ int IceTransmission::InitIceTransmission(
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (state_ != NICE_COMPONENT_STATE_READY) {
|
||||
return -2;
|
||||
}
|
||||
|
||||
return ice_agent_->Send(data, size);
|
||||
});
|
||||
rtp_data_receiver_->SetOnReceiveData(
|
||||
|
||||
Reference in New Issue
Block a user