Route desktop call and PTT diagnostics to their categories

This commit is contained in:
evgeny committed 2026-10-18 15:08:57 +02:00
1 parent 74e2238b7f
commit b40ba9308f
3 files changed
+7 -7

No files matched your search

+4 -4
View File
@@ -99,7 +99,7 @@ void CallVideoEngine::publishImage(const QImage& image, int64_t pts) {
image = m->shown; pts = m->shownPts; selected = m->shownAt; m->publicationPending = false; } image = m->shown; pts = m->shownPts; selected = m->shownAt; m->publicationPending = false; }
emit imageChanged(image); emit imageChanged(image);
if (!image.isNull() && pts >= 0 && pts % 1000000 < 34000) if (!image.isNull() && pts >= 0 && pts % 1000000 < 34000)
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "video timing stage=publish call=%llu pts=%lld mono_us=%lld ui_wait_us=%lld", DEBUG_DEBUG(DEBUG_CATEGORY_CALL, "video timing stage=publish call=%llu pts=%lld mono_us=%lld ui_wait_us=%lld",
(unsigned long long)m->id, (long long)pts, (long long)nowUs(), (long long)(nowUs() - selected)); (unsigned long long)m->id, (long long)pts, (long long)nowUs(), (long long)(nowUs() - selected));
}, Qt::QueuedConnection); }, Qt::QueuedConnection);
} }
@@ -264,7 +264,7 @@ void CallVideoEngine::transmit() {
forceKey = call_video_port_send(&packet) != 1; } forceKey = call_video_port_send(&packet) != 1; }
// Одинаковое окно исходного PTS на всех этапах: примерно один кадр в секунду, без трассы каждого кадра. // Одинаковое окно исходного PTS на всех этапах: примерно один кадр в секунду, без трассы каждого кадра.
if (pts % 1000000 < 34000) if (pts % 1000000 < 34000)
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, DEBUG_DEBUG(DEBUG_CATEGORY_CALL,
"video timing stage=encode call=%llu frame=%llu pts=%lld mono_us=%lld encode_us=%lld accepted=%d", "video timing stage=encode call=%llu frame=%llu pts=%lld mono_us=%lld encode_us=%lld accepted=%d",
(unsigned long long)m->id, (unsigned long long)frameId, (long long)pts, (long long)nowUs(), (unsigned long long)m->id, (unsigned long long)frameId, (long long)pts, (long long)nowUs(),
(long long)(nowUs() - encodeStarted), !forceKey); (long long)(nowUs() - encodeStarted), !forceKey);
@@ -293,7 +293,7 @@ void CallVideoEngine::receive() {
if (decoder.decode(packet, image)) { if (decoder.decode(packet, image)) {
pictures.push_back({{packet.pts_us, packet.received_us}, image}); pictures.push_back({{packet.pts_us, packet.received_us}, image});
if (packet.pts_us % 1000000 < 34000) if (packet.pts_us % 1000000 < 34000)
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, DEBUG_DEBUG(DEBUG_CATEGORY_CALL,
"video timing stage=decode call=%llu frame=%llu pts=%lld mono_us=%lld decode_us=%lld queue=%zu", "video timing stage=decode call=%llu frame=%llu pts=%lld mono_us=%lld decode_us=%lld queue=%zu",
(unsigned long long)m->id, (unsigned long long)packet.frame_id, (long long)packet.pts_us, (unsigned long long)m->id, (unsigned long long)packet.frame_id, (long long)packet.pts_us,
(long long)nowUs(), (long long)(nowUs() - decodeStarted), pictures.size()); (long long)nowUs(), (long long)(nowUs() - decodeStarted), pictures.size());
@@ -314,7 +314,7 @@ void CallVideoEngine::receive() {
if (action == CALL_VIDEO_PLAYOUT_SHOW) { if (action == CALL_VIDEO_PLAYOUT_SHOW) {
const auto& f = pictures.front(); publishImage(f.image, f.timing.pts_us); lastPictureAt = now; const auto& f = pictures.front(); publishImage(f.image, f.timing.pts_us); lastPictureAt = now;
if (f.timing.pts_us % 1000000 < 34000) if (f.timing.pts_us % 1000000 < 34000)
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "video timing stage=select call=%llu pts=%lld mono_us=%lld audio_pts=%lld", DEBUG_DEBUG(DEBUG_CATEGORY_CALL, "video timing stage=select call=%llu pts=%lld mono_us=%lld audio_pts=%lld",
(unsigned long long)m->id, (long long)f.timing.pts_us, (long long)now, (long long)clock.pts_us); (unsigned long long)m->id, (long long)f.timing.pts_us, (long long)now, (long long)clock.pts_us);
} }
pictures.pop_front(); pictures.pop_front();
+1 -1
View File
@@ -136,7 +136,7 @@ void PttHotkeyManager::pollKeys() {
bool changed = held != m_held; bool changed = held != m_held;
m_held = held; m_held = held;
if (m_capturing && changed) { if (m_capturing && changed) {
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "PTT: capture poll armed=%d held=[%s] codes=[%s] application_state=%d", DEBUG_DEBUG(DEBUG_CATEGORY_RADIO, "PTT: capture poll armed=%d held=[%s] codes=[%s] application_state=%d",
m_captureArmed, qPrintable(describe(held)), qPrintable(pttEncodeChord(held)), int(QGuiApplication::applicationState())); m_captureArmed, qPrintable(describe(held)), qPrintable(pttEncodeChord(held)), int(QGuiApplication::applicationState()));
} }
bool talking = false; bool talking = false;
+2 -2
View File
@@ -323,7 +323,7 @@ bool RadioSettingsPage::eventFilter(QObject* object, QEvent* event) {
auto* key = static_cast<QKeyEvent*>(event); auto* key = static_cast<QKeyEvent*>(event);
// Только ручная запись: сравниваем доставку событий окну с независимым опросом ОС. // Только ручная запись: сравниваем доставку событий окну с независимым опросом ОС.
if (!key->isAutoRepeat()) { if (!key->isAutoRepeat()) {
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "PTT: capture window event=%s slot=%d qt=0x%x native_vk=%u scan=%u modifiers=0x%x", DEBUG_DEBUG(DEBUG_CATEGORY_RADIO, "PTT: capture window event=%s slot=%d qt=0x%x native_vk=%u scan=%u modifiers=0x%x",
event->type() == QEvent::KeyPress ? "press" : "release", m_captureIndex + 1, event->type() == QEvent::KeyPress ? "press" : "release", m_captureIndex + 1,
unsigned(key->key()), unsigned(key->nativeVirtualKey()), unsigned(key->nativeScanCode()), unsigned(key->key()), unsigned(key->nativeVirtualKey()), unsigned(key->nativeScanCode()),
unsigned(key->nativeModifiers())); unsigned(key->nativeModifiers()));
@@ -332,7 +332,7 @@ bool RadioSettingsPage::eventFilter(QObject* object, QEvent* event) {
if (vk > 0 && vk < 256) { if (vk > 0 && vk < 256) {
unsigned asyncState = static_cast<unsigned short>(GetAsyncKeyState(vk)); unsigned asyncState = static_cast<unsigned short>(GetAsyncKeyState(vk));
unsigned queueState = static_cast<unsigned short>(GetKeyState(vk)); unsigned queueState = static_cast<unsigned short>(GetKeyState(vk));
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "PTT: capture Windows vk=%d async=0x%04x queue=0x%04x remote_session=%d", DEBUG_DEBUG(DEBUG_CATEGORY_RADIO, "PTT: capture Windows vk=%d async=0x%04x queue=0x%04x remote_session=%d",
vk, asyncState, queueState, GetSystemMetrics(SM_REMOTESESSION)); vk, asyncState, queueState, GetSystemMetrics(SM_REMOTESESSION));
} }
#endif #endif