Commit f01d607b authored by DanmeiChen's avatar DanmeiChen Committed by DanmeiChen
Browse files

notify callbacks later

parent 9c5012b1
......@@ -5705,8 +5705,10 @@ static void video_filter_callback(void *userdata, struct _MSFilter *f, unsigned
LinphoneCore *lc = (LinphoneCore *)userdata;
if (linphone_core_cbs_get_qrcode_found(linphone_core_get_current_callbacks(lc)) != NULL) {
char* result = ms_strdup((const char*)arg);
linphone_core_notify_qrcode_found(lc, result);
ms_free(result);
L_GET_CPP_PTR_FROM_C_OBJECT(lc)->doLater([lc, result]() {
linphone_core_notify_qrcode_found(lc, result);
ms_free(result);
});
}
break;
}
......
......@@ -657,8 +657,13 @@ void Call::onTmmbrReceived (const shared_ptr<CallSession> &session, int streamIn
linphone_call_notify_tmmbr_received(this->toC(), streamIndex, tmmbr);
}
void Call::onSnapshotTaken(const shared_ptr<CallSession> &session, const char *file_path) {
linphone_call_notify_snapshot_taken(this->toC(), file_path);
char* file = ms_strdup((const char*)file_path);
getCore()->doLater([this, file](){
linphone_call_notify_snapshot_taken(this->toC(), file);
ms_free(file);
});
}
// =============================================================================
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment