当前位置: 首页>>代码示例>>C++>>正文


C++ NrIceCtx类代码示例

本文整理汇总了C++中NrIceCtx的典型用法代码示例。如果您正苦于以下问题:C++ NrIceCtx类的具体用法?C++ NrIceCtx怎么用?C++ NrIceCtx使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了NrIceCtx类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: initialized_cb

void NrIceCtx::initialized_cb(NR_SOCKET s, int h, void *arg) {
  NrIceCtx *ctx = static_cast<NrIceCtx *>(arg);

  ctx->EmitAllCandidates();

  ctx->SetState(ICE_CTX_GATHERED);
}
开发者ID:Tripleman,项目名称:mozilla-central,代码行数:7,代码来源:nricectx.cpp

示例2: nr_ice_format_candidate_attribute

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);
}
开发者ID:ajkerrigan,项目名称:gecko-dev,代码行数:26,代码来源:nricectx.cpp

示例3: initialized_cb

void NrIceCtx::initialized_cb(NR_SOCKET s, int h, void *arg) {
  NrIceCtx *ctx = static_cast<NrIceCtx *>(arg);

  ctx->SetState(ICE_CTX_GATHERED);

  // Report that we are done gathering
  ctx->EmitAllCandidates();
}
开发者ID:paulojosegit,项目名称:mozilla-central,代码行数:8,代码来源:nricectx.cpp

示例4: MOZ_MTLOG

int NrIceCtx::ice_completed(void *obj, nr_ice_peer_ctx *pctx) {
  MOZ_MTLOG(PR_LOG_DEBUG, "ice_completed called");

  // Get the ICE ctx
  NrIceCtx *ctx = static_cast<NrIceCtx *>(obj);

  ctx->SetState(ICE_CTX_OPEN);

  return 0;
}
开发者ID:Tripleman,项目名称:mozilla-central,代码行数:10,代码来源:nricectx.cpp

示例5: MOZ_MTLOG

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;
}
开发者ID:ajkerrigan,项目名称:gecko-dev,代码行数:10,代码来源:nricectx.cpp

示例6: MOZ_MTLOG

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;
}
开发者ID:bitwiseworks,项目名称:mozilla-os2,代码行数:10,代码来源:nricectx.cpp

示例7: msg_recvd

int NrIceCtx::msg_recvd(void *obj, nr_ice_peer_ctx *pctx,
                        nr_ice_media_stream *stream, int component_id,
                        UCHAR *msg, int len) {
  // Get the ICE ctx
  NrIceCtx *ctx = static_cast<NrIceCtx *>(obj);
  RefPtr<NrIceMediaStream> s = ctx->FindStream(stream);

  // Streams which do not exist should never have packets.
  MOZ_ASSERT(s);

  s->SignalPacketReceived(s, component_id, msg, len);

  return 0;
}
开发者ID:Tripleman,项目名称:mozilla-central,代码行数:14,代码来源:nricectx.cpp

示例8: MOZ_ASSERT

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);
}
开发者ID:ashishrana7,项目名称:firefox,代码行数:24,代码来源:nricectx.cpp

示例9: gather_cb

void NrIceCtx::gather_cb(NR_SOCKET s, int h, void *arg) {
  NrIceCtx *ctx = static_cast<NrIceCtx *>(arg);

  ctx->SetGatheringState(ICE_CTX_GATHER_COMPLETE);
}
开发者ID:ajkerrigan,项目名称:gecko-dev,代码行数:5,代码来源:nricectx.cpp


注:本文中的NrIceCtx类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。