本文整理汇总了C++中NiceConnection类的典型用法代码示例。如果您正苦于以下问题:C++ NiceConnection类的具体用法?C++ NiceConnection怎么用?C++ NiceConnection使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了NiceConnection类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cb_nice_recv
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: cb_nice_recv
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: cb_component_state_changed
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: cb_component_state_changed
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: cb_new_selected_pair
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: cb_candidate_gathering_done
void cb_candidate_gathering_done(NiceAgent *agent, guint stream_id,
gpointer user_data) {
NiceConnection *conn = (NiceConnection*) user_data;
conn->gatheringDone(stream_id);
}
示例7: cb_candidate_gathering_done
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: cb_new_candidate
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);
}