本文整理汇总了C++中NrIceCtx::SetConnectionState方法的典型用法代码示例。如果您正苦于以下问题:C++ NrIceCtx::SetConnectionState方法的具体用法?C++ NrIceCtx::SetConnectionState怎么用?C++ NrIceCtx::SetConnectionState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NrIceCtx
的用法示例。
在下文中一共展示了NrIceCtx::SetConnectionState方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ice_checking
int NrIceCtx::ice_checking(void *obj, nr_ice_peer_ctx *pctx) {
MOZ_MTLOG(ML_DEBUG, "ice_checking called");
// Get the ICE ctx
NrIceCtx *ctx = static_cast<NrIceCtx *>(obj);
ctx->SetConnectionState(ICE_CTX_CHECKING);
return 0;
}
示例2: ice_disconnected
int NrIceCtx::ice_disconnected(void *obj, nr_ice_peer_ctx *pctx) {
MOZ_MTLOG(ML_DEBUG, "ice_disconnected called");
// Get the ICE ctx
NrIceCtx *ctx = static_cast<NrIceCtx *>(obj);
ctx->SetConnectionState(ICE_CTX_DISCONNECTED);
return 0;
}
示例3: ice_completed
int NrIceCtx::ice_completed(void *obj, nr_ice_peer_ctx *pctx) {
MOZ_MTLOG(ML_DEBUG, "ice_completed called");
// Get the ICE ctx
NrIceCtx *ctx = static_cast<NrIceCtx *>(obj);
// This is called even on failed contexts.
if (ctx->connection_state() != ICE_CTX_FAILED) {
ctx->SetConnectionState(ICE_CTX_OPEN);
}
return 0;
}
示例4: stream_failed
int NrIceCtx::stream_failed(void *obj, nr_ice_media_stream *stream) {
MOZ_MTLOG(ML_DEBUG, "stream_failed called");
// Get the ICE ctx
NrIceCtx *ctx = static_cast<NrIceCtx *>(obj);
RefPtr<NrIceMediaStream> s = ctx->FindStream(stream);
// Streams which do not exist should never fail.
MOZ_ASSERT(s);
ctx->SetConnectionState(ICE_CTX_FAILED);
s -> SignalFailed(s);
return 0;
}