コード例 #1
0
ファイル: NiceConnection.cpp プロジェクト: peili/licode
void cb_nice_recv(NiceAgent* agent, guint stream_id, guint component_id,
                  guint len, gchar* buf, gpointer user_data) {

    NiceConnection* nicecon = (NiceConnection*) user_data;
    nicecon->getNiceListener()->onNiceData(component_id, reinterpret_cast<char*> (buf), static_cast<unsigned int> (len),
                                           (NiceConnection*) user_data);
}
コード例 #2
0
ファイル: NiceConnection.cpp プロジェクト: K-GmbH/licode
  void cb_nice_recv(NiceAgent* agent, guint stream_id, guint component_id,
      guint len, gchar* buf, gpointer user_data) {
    if (user_data==NULL||len==0)return;

    NiceConnection* nicecon = (NiceConnection*) user_data;
    nicecon->queueData(component_id, reinterpret_cast<char*> (buf), static_cast<unsigned int> (len));
  }
コード例 #3
0
ファイル: NiceConnection.cpp プロジェクト: zevarito/licode
void cb_component_state_changed(NiceAgent *agent, guint stream_id,
    guint component_id, guint state, gpointer user_data) {
  if (state == NICE_COMPONENT_STATE_CONNECTED) {
  } else if (state == NICE_COMPONENT_STATE_FAILED) {
    NiceConnection *conn = reinterpret_cast<NiceConnection*>(user_data);
    conn->updateComponentState(component_id, NICE_FAILED);
  }
}
コード例 #4
0
ファイル: NiceConnection.cpp プロジェクト: K-GmbH/licode
  void cb_component_state_changed(NiceAgent *agent, guint stream_id,
      guint component_id, guint state, gpointer user_data) {
    if (state == NICE_COMPONENT_STATE_READY) {
      NiceConnection *conn = (NiceConnection*) user_data;
      conn->updateComponentState(component_id, NICE_READY);
    } else if (state == NICE_COMPONENT_STATE_FAILED) {
      NiceConnection *conn = (NiceConnection*) user_data;
      conn->updateIceState(NICE_FAILED);
    }

  }
コード例 #5
0
ファイル: NiceConnection.cpp プロジェクト: peili/licode
void cb_new_selected_pair(NiceAgent *agent, guint stream_id, guint component_id,
                          gchar *lfoundation, gchar *rfoundation, gpointer user_data) {
    NiceConnection *conn = (NiceConnection*) user_data;
    conn->updateComponentState(component_id, NICE_READY);
}
コード例 #6
0
ファイル: NiceConnection.cpp プロジェクト: peili/licode
void cb_candidate_gathering_done(NiceAgent *agent, guint stream_id,
                                 gpointer user_data) {

    NiceConnection *conn = (NiceConnection*) user_data;
    conn->gatheringDone(stream_id);
}
コード例 #7
0
ファイル: NiceConnection.cpp プロジェクト: zevarito/licode
void cb_candidate_gathering_done(NiceAgent *agent, guint stream_id, gpointer user_data) {
  NiceConnection *conn = reinterpret_cast<NiceConnection*>(user_data);
  conn->gatheringDone(stream_id);
}
コード例 #8
0
ファイル: NiceConnection.cpp プロジェクト: zevarito/licode
void cb_new_candidate(NiceAgent *agent, guint stream_id, guint component_id, gchar *foundation,
    gpointer user_data) {
  NiceConnection *conn = reinterpret_cast<NiceConnection*>(user_data);
  std::string found(foundation);
  conn->getCandidate(stream_id, component_id, found);
}