call: P2P аудиозвонки — сигналинг, релей медиа, аудио-контур, headless/desktop/android
- src/call/: сигналинг (call.c, call_proto.h, ETCP_RT_ID_CALL 0x36) + релей медиа + headless аудио-сокет (call_headless.c, call_audio_bind) + Opus/jitter/тоны - chat: события CHAT_EVT_CALL_* (34–40), CHAT_EVT_DM_MESSAGES (41), DM-трамплины - chatgui: call window, miniaudio I/O, audio_frame_ring, test_audio_jitter - chatgui-android: CallScreen/IncomingCallDialog, аудио-роутинг, JNI, рингтон - tests: test_call, test_call_headless
This commit is contained in:
1 parent
0157f7f96b
commit
b11e77e4c0
78 files changed
+7053
-70
No files matched your search
@@ -20,6 +20,8 @@
|
||||
#include "chat/chat_headless_control.h"
|
||||
#include "dm/dm_core.h"
|
||||
#include "dm/dm_mailbox.h"
|
||||
#include "call/call.h"
|
||||
#include "call/call_headless.h"
|
||||
#include "broadcast.h"
|
||||
#include "stcp_server.h"
|
||||
#include "control_server.h"
|
||||
@@ -490,6 +492,8 @@ void utun_instance_destroy(struct UTUN_INSTANCE *instance) {
|
||||
chat_media_startup_backfill_destroy(instance);
|
||||
dm_mailbox_destroy(instance);
|
||||
dm_core_destroy(instance);
|
||||
call_headless_destroy(instance);
|
||||
call_destroy(instance);
|
||||
chat_sync_destroy(instance);
|
||||
chat_core_destroy(instance);
|
||||
DEBUG_INFO(DEBUG_CATEGORY_SYS, "[DESTROY] H done — chat");
|
||||
@@ -686,6 +690,7 @@ int utun_instance_init(struct UTUN_INSTANCE *instance) {
|
||||
/* dm_mailbox до dm_core: dm_core_init ставит deliver-cb в mailbox */
|
||||
dm_mailbox_init(instance);
|
||||
dm_core_init(instance);
|
||||
call_init(instance);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -758,6 +763,20 @@ int utun_instance_init(struct UTUN_INSTANCE *instance) {
|
||||
if (chat_headless_control_init(instance->ua, instance, ip_str, port) != 0)
|
||||
DEBUG_WARN(DEBUG_CATEGORY_GENERAL, "Failed to init headless chat control (non-fatal)");
|
||||
}
|
||||
|
||||
// Initialize headless call audio socket if configured in [chatserver]
|
||||
if (instance->config->global.call_audio_bind[0] != '\0') {
|
||||
char ip_str[64] = "127.0.0.1"; int port = 10001;
|
||||
const char* colon = strrchr(instance->config->global.call_audio_bind, ':');
|
||||
if (colon) {
|
||||
size_t ip_len = (size_t)(colon - instance->config->global.call_audio_bind);
|
||||
if (ip_len < sizeof(ip_str)) { memcpy(ip_str, instance->config->global.call_audio_bind, ip_len); ip_str[ip_len] = '\0'; }
|
||||
port = atoi(colon + 1);
|
||||
if (port <= 0 || port > 65535) port = 10001;
|
||||
}
|
||||
if (call_headless_init(instance->ua, instance, ip_str, port) != 0)
|
||||
DEBUG_WARN(DEBUG_CATEGORY_GENERAL, "Failed to init headless call audio socket (non-fatal)");
|
||||
}
|
||||
|
||||
// Start the main loop
|
||||
instance->running = 1;
|
||||
|
||||
Reference in new issue
Block a user