feat(windows-nui): log consume-side (ImageStream/Skeleton GetNextFrame), shutdown, producer-exit
ci / Linux C++ core (cmake + ctest) (push) Canceled after 0s
ci / Python root tests (pytest, no tracker deps) (push) Canceled after 0s
ci / Python tracker (pytest, tracker/.venv) (push) Canceled after 0s

This commit is contained in:
kinect-bot committed 2026-11-25 15:41:36 -05:00
1 parent dbc75f12e1
commit f98cba70aa
1 file changed
+18 -2
+18 -2
View File
@@ -147,6 +147,7 @@ void VirtualKinectSensor::Shutdown() {
if (!initialized_) {
return;
}
ShimLog("NuiShutdown called");
initialized_ = false;
if (stop_event_ != nullptr) {
SetEvent(stop_event_);
@@ -228,6 +229,12 @@ HRESULT VirtualKinectSensor::SkeletonGetNextFrame(
}
EnterCriticalSection(&lock_);
static unsigned skel_calls = 0;
if (skel_calls < 6 || (skel_calls % 150u) == 0u) {
ShimLog("SkeletonGetNextFrame call#%u has_skeleton=%d", skel_calls,
has_skeleton_ ? 1 : 0);
}
++skel_calls;
if (!has_skeleton_) {
LeaveCriticalSection(&lock_);
return E_NUI_FRAME_NO_DATA;
@@ -360,7 +367,15 @@ HRESULT VirtualKinectSensor::ImageStreamGetNextFrame(
}
EnterCriticalSection(&lock_);
if (!stream->has_frame) {
static unsigned img_calls = 0;
const bool has = stream->has_frame;
const int stype = static_cast<int>(stream->type);
if (img_calls < 6 || (img_calls % 150u) == 0u) {
ShimLog("ImageStreamGetNextFrame call#%u type=%d has_frame=%d", img_calls,
stype, has ? 1 : 0);
}
++img_calls;
if (!has) {
LeaveCriticalSection(&lock_);
return E_NUI_FRAME_NO_DATA;
}
@@ -511,7 +526,7 @@ void VirtualKinectSensor::ProducerLoop() {
SourceFrame src;
const bool got = source_.is_open() && source_.read_latest(src);
if ((frame_number % 60u) == 0u) {
if (frame_number < 10u || (frame_number % 60u) == 0u) {
std::size_t depth_nonzero = 0;
if (got) {
for (uint16_t p : src.depth_pixels) {
@@ -556,6 +571,7 @@ void VirtualKinectSensor::ProducerLoop() {
WaitForSingleObject(stop_event_, kFramePeriodMs);
}
ShimLog("producer loop EXIT at tick=%u (stop_event signalled)", frame_number);
}
DWORD WINAPI VirtualKinectSensor::ProducerThunk(LPVOID param) {