compatibility with libnice 0.1.16
This commit is contained in:
parent
120bcdbe7d
commit
57f78656a3
|
@ -656,7 +656,6 @@ dependencies = [
|
|||
"nice-gst-meet",
|
||||
"once_cell",
|
||||
"pem",
|
||||
"pkg-config",
|
||||
"rand",
|
||||
"rcgen",
|
||||
"ring",
|
||||
|
@ -668,6 +667,10 @@ dependencies = [
|
|||
"xmpp-parsers-gst-meet",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lib-gst-meet-c"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.99"
|
||||
|
|
|
@ -1,2 +1,8 @@
|
|||
[workspace]
|
||||
members = ["lib-gst-meet", "gst-meet", "nice-gst-meet", "nice-gst-meet-sys"]
|
||||
members = [
|
||||
"gst-meet",
|
||||
"lib-gst-meet",
|
||||
"lib-gst-meet-c",
|
||||
"nice-gst-meet",
|
||||
"nice-gst-meet-sys",
|
||||
]
|
|
@ -13,12 +13,12 @@ async-trait = { version = "0.1", default-features = false }
|
|||
bytes = { version = "1", default-features = false, features = ["std"] }
|
||||
futures = { version = "0.3", default-features = false }
|
||||
glib = { version = "0.14", default-features = false }
|
||||
gstreamer = { version = "0.17", default-features = false, features = ["v1_18"] }
|
||||
gstreamer = { version = "0.17", default-features = false, features = ["v1_16"] }
|
||||
hex = { version = "0.4", default-features = false, features = ["std"] }
|
||||
itertools = { version = "0.10", default-features = false, features = ["use_std"] }
|
||||
libc = { version = "0.2", default-features = false }
|
||||
maplit = { version = "1", default-features = false }
|
||||
nice-gst-meet = { version = "0.1", path = "../nice-gst-meet", default-features = false, features = ["v0_1_18"] }
|
||||
nice-gst-meet = { version = "0.1", path = "../nice-gst-meet", default-features = false, features = ["v0_1_16"] }
|
||||
once_cell = { version = "1", default-features = false, features = ["std"] }
|
||||
pem = { version = "0.8", default-features = false }
|
||||
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] }
|
||||
|
@ -30,6 +30,3 @@ tokio-tungstenite = { version = "0.14", default-features = false, features = ["c
|
|||
tracing = { version = "0.1", default-features = false, features = ["attributes", "std"] }
|
||||
uuid = { version = "0.8", default-features = false, features = ["v4"] }
|
||||
xmpp-parsers = { package = "xmpp-parsers-gst-meet", version = "0.18", default-features = false }
|
||||
|
||||
[build-dependencies]
|
||||
pkg-config = { version = "0.3", default-features = false }
|
||||
|
|
|
@ -338,10 +338,6 @@ impl JingleSession {
|
|||
candidate.set_foundation(&c.foundation);
|
||||
candidate.set_addr(SocketAddr::new(c.ip, c.port));
|
||||
candidate.set_priority(c.priority);
|
||||
candidate.set_transport(match c.protocol.as_str() {
|
||||
"udp" => nice::CandidateTransport::Udp,
|
||||
other => panic!("unsupported protocol: {}", other),
|
||||
});
|
||||
candidate.set_username(ufrag);
|
||||
candidate.set_password(pwd);
|
||||
debug!("candidate: {:?}", candidate);
|
||||
|
@ -757,35 +753,28 @@ impl JingleSession {
|
|||
transport.pwd = Some(ice_local_pwd.clone());
|
||||
transport.candidates = vec![];
|
||||
for c in &local_candidates {
|
||||
match c.transport() {
|
||||
nice::CandidateTransport::Udp => {
|
||||
let addr = c.addr();
|
||||
let foundation = c.foundation()?;
|
||||
transport.candidates.push(jingle_ice_udp::Candidate {
|
||||
component: c.component_id() as u8,
|
||||
foundation: foundation.to_owned(),
|
||||
generation: 0,
|
||||
id: Uuid::new_v4().to_string(),
|
||||
ip: addr.ip(),
|
||||
port: addr.port(),
|
||||
priority: c.priority(),
|
||||
protocol: "udp".to_owned(),
|
||||
type_: match c.type_() {
|
||||
nice::CandidateType::Host => jingle_ice_udp::Type::Host,
|
||||
nice::CandidateType::PeerReflexive => jingle_ice_udp::Type::Prflx,
|
||||
nice::CandidateType::ServerReflexive => jingle_ice_udp::Type::Srflx,
|
||||
nice::CandidateType::Relayed => jingle_ice_udp::Type::Relay,
|
||||
other => bail!("unsupported candidate type: {:?}", other),
|
||||
},
|
||||
rel_addr: None,
|
||||
rel_port: None,
|
||||
network: None,
|
||||
});
|
||||
let addr = c.addr();
|
||||
let foundation = c.foundation()?;
|
||||
transport.candidates.push(jingle_ice_udp::Candidate {
|
||||
component: c.component_id() as u8,
|
||||
foundation: foundation.to_owned(),
|
||||
generation: 0,
|
||||
id: Uuid::new_v4().to_string(),
|
||||
ip: addr.ip(),
|
||||
port: addr.port(),
|
||||
priority: c.priority(),
|
||||
protocol: "udp".to_owned(),
|
||||
type_: match c.type_() {
|
||||
nice::CandidateType::Host => jingle_ice_udp::Type::Host,
|
||||
nice::CandidateType::PeerReflexive => jingle_ice_udp::Type::Prflx,
|
||||
nice::CandidateType::ServerReflexive => jingle_ice_udp::Type::Srflx,
|
||||
nice::CandidateType::Relayed => jingle_ice_udp::Type::Relay,
|
||||
other => bail!("unsupported candidate type: {:?}", other),
|
||||
},
|
||||
other => {
|
||||
warn!("skipping unsupported ICE transport: {:?}", other);
|
||||
},
|
||||
}
|
||||
rel_addr: None,
|
||||
rel_port: None,
|
||||
network: None,
|
||||
});
|
||||
}
|
||||
|
||||
jingle_accept = jingle_accept.add_content(
|
||||
|
|
Loading…
Reference in New Issue