mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge remote-tracking branch 'john/rtc' into feature/rtc
This commit is contained in:
commit
0ff3ce7464
4 changed files with 64 additions and 10 deletions
|
@ -89,6 +89,9 @@ SrsStunPacket::SrsStunPacket()
|
|||
message_type = 0;
|
||||
local_ufrag = "";
|
||||
remote_ufrag = "";
|
||||
use_candidate = false;
|
||||
ice_controlled = false;
|
||||
ice_controlling = false;
|
||||
}
|
||||
|
||||
SrsStunPacket::~SrsStunPacket()
|
||||
|
@ -140,8 +143,32 @@ srs_error_t SrsStunPacket::decode(const char* buf, const int nb_buf)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case UseCandidate: {
|
||||
use_candidate = true;
|
||||
srs_verbose("stun use-candidate");
|
||||
break;
|
||||
}
|
||||
|
||||
// @see: https://tools.ietf.org/html/draft-ietf-ice-rfc5245bis-00#section-5.1.2
|
||||
// One agent full, one lite: The full agent MUST take the controlling
|
||||
// role, and the lite agent MUST take the controlled role. The full
|
||||
// agent will form check lists, run the ICE state machines, and
|
||||
// generate connectivity checks.
|
||||
case IceControlled: {
|
||||
ice_controlled = true;
|
||||
srs_verbose("stun ice-controlled");
|
||||
break;
|
||||
}
|
||||
|
||||
case IceControlling: {
|
||||
ice_controlling = true;
|
||||
srs_verbose("stun ice-controlling");
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
srs_verbose("stun type=%u, no process", type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue