Route desktop codec diagnostics through the shared log

Quiet capability probes, preserve runtime errors, and register the desktop portal application. Add logging and desktop launcher regression coverage.
This commit is contained in:
evgeny committed 2026-10-21 15:45:40 +02:00
1 parent 9ba78c084b
commit 7c814f5cb9
17 files changed
+349 -44

No files matched your search

+8 -2
View File
@@ -3,6 +3,7 @@
#include "call_video_decoder.h"
#include "call_video_wake.h"
#include "call_video_queue.h"
#include "video_codec_log.h"
#include "call_camera_capture.h"
#include "../../../src/call/call_video_port.h"
#include "../../../src/call/call_video_playout.h"
@@ -270,6 +271,7 @@ call_video_caps CallVideoEngine::capabilities(const std::atomic<bool>* running)
return verified;
}
DEBUG_INFO(DEBUG_CATEGORY_CALL, "video codec preparation begin; camera and network unused");
VideoCodecProbe diagnostics;
call_video_caps caps = CallVideoDecoder::capabilities(running);
// Не связываем приём с наличием собственного encoder.
for (unsigned codec = 1; codec <= 2; ++codec) {
@@ -286,7 +288,7 @@ call_video_caps CallVideoEngine::capabilities(const std::atomic<bool>* running)
probe.width = portrait ? size.height() : size.width(); probe.height = portrait ? size.width() : size.height();
CallVideoEncoder encoder;
bothOrientations = encoder.open(probe, 1000000);
if (!bothOrientations) DEBUG_WARN(DEBUG_CATEGORY_CALL, "call codec probe unavailable codec=%u size=%ux%u: %s",
if (!bothOrientations) DEBUG_DEBUG(DEBUG_CATEGORY_CALL, "call codec probe unavailable codec=%u size=%ux%u: %s",
codec, probe.width, probe.height, qPrintable(encoder.error()));
}
if (bothOrientations) {
@@ -295,7 +297,7 @@ call_video_caps CallVideoEngine::capabilities(const std::atomic<bool>* running)
limit.fps = std::max<unsigned>(limit.fps, fps);
limit.pixels_per_second = std::max<unsigned>(limit.pixels_per_second, size.width() * size.height() * fps);
limit.maximum_bps = 4000000; limit.profiles = probe.profile; limit.level = std::max(limit.level, probe.level);
DEBUG_INFO(DEBUG_CATEGORY_CALL, "call encoder probe codec=%u size=%dx%d fps=%u level=%u verified=1",
DEBUG_DEBUG(DEBUG_CATEGORY_CALL, "call encoder probe codec=%u size=%dx%d fps=%u level=%u verified=1",
codec, size.width(), size.height(), fps, probe.level);
}
}
@@ -304,6 +306,10 @@ call_video_caps CallVideoEngine::capabilities(const std::atomic<bool>* running)
}
if (cancelled()) return {};
verified = caps; initialized = true;
if (!caps.encode[0].profiles && !caps.encode[1].profiles)
DEBUG_WARN(DEBUG_CATEGORY_CALL, "video codec preparation: no usable encoder; details require call=debug,video=debug");
if (!caps.decode[0].profiles && !caps.decode[1].profiles)
DEBUG_WARN(DEBUG_CATEGORY_CALL, "video codec preparation: no usable decoder; details require call=debug,video=debug");
DEBUG_INFO(DEBUG_CATEGORY_CALL, "video codec preparation complete elapsed_us=%lld encode=%u/%u decode=%u/%u",
(long long)(nowUs() - started), caps.encode[0].profiles, caps.encode[1].profiles,
caps.decode[0].profiles, caps.decode[1].profiles);