void NrIceCtx::trickle_cb(void *arg, nr_ice_ctx *ice_ctx, nr_ice_media_stream *stream, int component_id, nr_ice_candidate *candidate) { // Get the ICE ctx NrIceCtx *ctx = static_cast<NrIceCtx *>(arg); RefPtr<NrIceMediaStream> s = ctx->FindStream(stream); if (!s) { // This stream has been removed because it is inactive return; } // Format the candidate. char candidate_str[NR_ICE_MAX_ATTRIBUTE_SIZE]; int r = nr_ice_format_candidate_attribute(candidate, candidate_str, sizeof(candidate_str)); MOZ_ASSERT(!r); if (r) return; MOZ_MTLOG(ML_INFO, "NrIceCtx(" << ctx->name_ << "): trickling candidate " << candidate_str); s->SignalCandidate(s, candidate_str); }
void NrIceCtx::trickle_cb(void *arg, nr_ice_ctx *ice_ctx, nr_ice_media_stream *stream, int component_id, nr_ice_candidate *candidate) { // Get the ICE ctx NrIceCtx *ctx = static_cast<NrIceCtx *>(arg); RefPtr<NrIceMediaStream> s = ctx->FindStream(stream); // Streams which do not exist shouldn't have candidates. MOZ_ASSERT(s); // Format the candidate. char candidate_str[NR_ICE_MAX_ATTRIBUTE_SIZE]; int r = nr_ice_format_candidate_attribute(candidate, candidate_str, sizeof(candidate_str)); MOZ_ASSERT(!r); if (r) return; MOZ_MTLOG(ML_INFO, "NrIceCtx(" << ctx->name_ << "): trickling candidate " << candidate_str); s->SignalCandidate(s, candidate_str); }