Fix usage of old libnice versions

This commit is contained in:
Marvin W 2021-04-11 15:12:26 +02:00
parent 369755781e
commit e9ff660537
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A
3 changed files with 7 additions and 6 deletions

View file

@ -176,8 +176,7 @@ public class Dino.Plugins.Ice.TransportParameters : JingleIceUdp.IceUdpTransport
SList<Nice.Candidate> candidates = new SList<Nice.Candidate>(); SList<Nice.Candidate> candidates = new SList<Nice.Candidate>();
foreach (JingleIceUdp.Candidate candidate in remote_candidates) { foreach (JingleIceUdp.Candidate candidate in remote_candidates) {
if (candidate.component == i) { if (candidate.component == i) {
Nice.Candidate nc = candidate_to_nice(candidate); candidates.append(candidate_to_nice(candidate));
candidates.append(nc);
} }
} }
int new_candidates = agent.set_remote_candidates(stream_id, i, candidates); int new_candidates = agent.set_remote_candidates(stream_id, i, candidates);
@ -203,9 +202,8 @@ public class Dino.Plugins.Ice.TransportParameters : JingleIceUdp.IceUdpTransport
foreach (JingleIceUdp.Candidate candidate in remote_candidates) { foreach (JingleIceUdp.Candidate candidate in remote_candidates) {
if (candidate.ip.has_prefix("fe80::")) continue; if (candidate.ip.has_prefix("fe80::")) continue;
if (candidate.component == i) { if (candidate.component == i) {
Nice.Candidate nc = candidate_to_nice(candidate); candidates.append(candidate_to_nice(candidate));
candidates.append(nc); debug("remote candidate: %s", agent.generate_local_candidate_sdp(candidate_to_nice(candidate)));
debug("remote candidate: %s", agent.generate_local_candidate_sdp(nc));
} }
} }
int new_candidates = agent.set_remote_candidates(stream_id, i, candidates); int new_candidates = agent.set_remote_candidates(stream_id, i, candidates);

View file

@ -6,3 +6,6 @@ Agent.send.buf type="uint8[]" array_length_idx=2
AgentRecvFunc.buf type="uint8[]" array_length_idx=3 AgentRecvFunc.buf type="uint8[]" array_length_idx=3
PseudoTcpCallbacks#record skip PseudoTcpCallbacks#record skip
PseudoTcpSocket#class skip PseudoTcpSocket#class skip
# Not yet supported by vapigen
# Candidate copy_function="nice_candidate_copy" free_function="nice_candidate_free" type_id=""

View file

@ -164,7 +164,7 @@ namespace Nice {
[Version (since = "0.1.5")] [Version (since = "0.1.5")]
public signal void streams_removed ([CCode (array_length = false, array_null_terminated = true)] uint[] stream_ids); public signal void streams_removed ([CCode (array_length = false, array_null_terminated = true)] uint[] stream_ids);
} }
[CCode (cheader_filename = "nice.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "nice_candidate_get_type ()")] [CCode (cheader_filename = "nice.h", copy_function = "nice_candidate_copy", free_function = "nice_candidate_free")]
[Compact] [Compact]
public class Candidate { public class Candidate {
public Nice.Address addr; public Nice.Address addr;