From 81de8747e24b274315cdb0afd91ee1f6b673b716 Mon Sep 17 00:00:00 2001 From: evgeny Date: Sun, 18 Oct 2026 15:06:16 +0200 Subject: [PATCH] Move video call and stream diagnostics to module categories --- src/call/call_video_transport.c | 4 ++-- src/stream/stream_network.c | 2 +- src/stream/stream_optimizer.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/call/call_video_transport.c b/src/call/call_video_transport.c index a11d39b1..fd3d7e99 100644 --- a/src/call/call_video_transport.c +++ b/src/call/call_video_transport.c @@ -239,7 +239,7 @@ static void flush(struct call_video_transport *v) { f->offset += f->length; if (f->offset == f->size) { if (f->pts_us % 1000000 < 34000) - DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, + DEBUG_DEBUG(DEBUG_CATEGORY_CALL, "video timing stage=send call=%llu frame=%llu pts=%lld boot_us=%llu bytes=%u queue_age_us=%llu budget_yields=%u", (unsigned long long)f->call_id, (unsigned long long)f->frame_id, (long long)f->pts_us, (unsigned long long)get_time_us(), f->size, (unsigned long long)((get_time_tb() - head->started_tb) * 100), @@ -510,7 +510,7 @@ static void receive(struct ETCP_CONN *conn, struct ll_entry *entry) { int result = call_video_receiver_push(v->receiver, &f, get_time_us(), &complete); if (result == 1) { if (complete.pts_us % 1000000 < 34000) - DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "video timing stage=receive call=%llu frame=%llu pts=%lld boot_us=%llu bytes=%u", + DEBUG_DEBUG(DEBUG_CATEGORY_CALL, "video timing stage=receive call=%llu frame=%llu pts=%lld boot_us=%llu bytes=%u", (unsigned long long)id, (unsigned long long)complete.frame_id, (long long)complete.pts_us, (unsigned long long)get_time_us(), complete.size); v->received_generation = complete.format.generation; v->ops.frame(v->arg, &complete); diff --git a/src/stream/stream_network.c b/src/stream/stream_network.c index c86b1214..221735dd 100644 --- a/src/stream/stream_network.c +++ b/src/stream/stream_network.c @@ -969,7 +969,7 @@ static void transport_changed(struct ETCP_CONN *conn, int status, void *arg) { if (status != ETCP_CONN_STATUS_REINIT || net->stopping) return; struct stream_peer *p = peer_find(net, conn->peer_node_id); if (p) { - DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "stream transport REINIT peer=%llx up=%d local_epoch=%llx peer_epoch=%llx control_queued=%d", + DEBUG_DEBUG(DEBUG_CATEGORY_STREAM, "stream transport REINIT peer=%llx up=%d local_epoch=%llx peer_epoch=%llx control_queued=%d", (unsigned long long)p->node_id, p->up, (unsigned long long)p->own_epoch, (unsigned long long)p->other_epoch, p->control->count); peer_reset(p, STREAM_REASON_TRANSPORT, STREAM_RESET_ROTATE | STREAM_RESET_KEEP_PENDING, NULL); diff --git a/src/stream/stream_optimizer.c b/src/stream/stream_optimizer.c index 8e1f4c8f..b7120e35 100644 --- a/src/stream/stream_optimizer.c +++ b/src/stream/stream_optimizer.c @@ -587,7 +587,7 @@ void stream_optimizer_tick(struct stream_optimizer *o, struct STREAM_HANDLE *h, /* Пока нет первого блока, раз в секунду показываем причину ожидания каждого поставщика. */ if (!local.anchored && now >= o->diagnostic_ms) { o->diagnostic_ms = now + STREAM_PROBE_PERIOD_MS; - DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "stream bootstrap waits group=%llx source=%llx epoch=%llx candidates=%u probes=%u" + DEBUG_DEBUG(DEBUG_CATEGORY_STREAM, "stream bootstrap waits group=%llx source=%llx epoch=%llx candidates=%u probes=%u" " subflows=%u cycle=%llu cycle_age_ms=%llu", (unsigned long long)o->descriptor.group_id, (unsigned long long)o->descriptor.source_node_id, (unsigned long long)o->descriptor.source_epoch, o->info.candidates, o->info.probes_active, o->info.subflows, @@ -595,7 +595,7 @@ void stream_optimizer_tick(struct stream_optimizer *o, struct STREAM_HANDLE *h, for (struct stream_supplier *s = o->suppliers; s; s = s->next) { struct stream_receive_info probe = {0}; if (s->probe) stream_receive_get_info(s->probe, &probe); - DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "stream bootstrap supplier source=%llx peer=%llx online=%d compatible=%d source_peer=%d" + DEBUG_TRACE(DEBUG_CATEGORY_STREAM, "stream bootstrap supplier source=%llx peer=%llx online=%d compatible=%d source_peer=%d" " cycle=%llu failures=%u retry_in_ms=%llu probe=%d sub=%u state=%d info_ready=%d reason=%d", (unsigned long long)o->descriptor.source_node_id, (unsigned long long)s->node, s->online, s->compatible, s->source, (unsigned long long)s->cycle, s->failures, (unsigned long long)(s->retry_ms > now ? s->retry_ms - now : 0),