## Problem and outcome / 问题与结果 Compatible Native receiver renegotiation rebuilt the encoded source and its playback/relay consumers. Replacement backends could also lose committed-route recovery ownership, while queued events and unfinished SFU cleanup could reach a replacement with the same logical identity. Retain compatible receivers, keep recovery on the committed route, and validate physical ownership through final control delivery. SFU activation waits for the existing retirement barrier. This phase also consumes renewed same-page invitations through the existing grant owner and avoids closing uninitialized Windows capture objects after preview failure. Camera, microphone, interaction and control redesign remain outside this patch. ## Release notes ### 中文 这是一次以连接稳定性为重点的小修复更新。 - 修复 App 接收端重新协商时不必要地中断播放和中继的问题,并保留正确的连接恢复行为。 - 修复旧连接的迟到事件及关闭时序干扰替代连接的问题。 - 修复重新打开同页邀请链接后仍沿用旧邀请的问题。 - 修复 Windows 选源预览失败时的一处异常退出。 更新 App 并刷新网页即可使用这些修复,无需修改配置。 ### English This maintenance update focuses on connection stability. - Preserve App playback, relay connections and recovery behavior during compatible renegotiation. - Prevent delayed events and cleanup from retired connections from disrupting their replacements. - Use the new invitation when another invite link opens in the same page. - Fix a Windows crash during failed source-preview cleanup. Update Piik App and refresh the page to use these fixes. No configuration changes are required. ## Verification / 验证 - TypeScript type checking, 71 Vitest files / 1,015 tests and Web production build. - Go core tests, vet and supported cross-target builds; receiver tests exercise H.264/VP8/Opus, ICE restart, fresh gathering and retained downstream media. - Windows native compile/probe and deterministic capture checks, including failed-preview cleanup. - Documentation and repository hygiene checks; independent review of the extracted patch and old/new Web/App capability negotiation. - Local full-suite runs reached the unchanged Git fixture's 5-second timeout; that suite passed alone. The complete suite was rerun with two workers and a 15-second test deadline. ## Impact / 影响 Planned version: v1.5.6. Existing public wire versions and configuration are retained. Receiver reuse is capability-negotiated: old Apps receive no new request field, and old pages receive no new answer field. Room authority, routing policy and retry budgets are unchanged. The established-viewing interruption report still lacks paired diagnostics; these reproduced defects do not establish that reporter's exact cause. Physical device/network endurance remains outside local deterministic acceptance. Git/PRs retain this repair history; the TODO ledger retains outstanding reports and separate feature candidates.
31 lines
1.5 KiB
C++
31 lines
1.5 KiB
C++
#include "capture_target.h"
|
|
|
|
#include <cassert>
|
|
#include <iostream>
|
|
|
|
int main() {
|
|
// Enumeration and preview are separate operations. A once-listed window may
|
|
// become hidden before WGC creates its item. Unsupported capture may return
|
|
// an advisory error or a fallback preview, but cleanup must never crash.
|
|
HWND window = CreateWindowExW(0, L"STATIC", L"Piik hidden preview fixture",
|
|
WS_OVERLAPPEDWINDOW, 0, 0, 320, 180, nullptr,
|
|
nullptr, GetModuleHandleW(nullptr), nullptr);
|
|
assert(window != nullptr);
|
|
FILETIME created{}, exited{}, kernel{}, user{};
|
|
assert(GetProcessTimes(GetCurrentProcess(), &created, &exited, &kernel, &user));
|
|
const UINT64 creation_time = (static_cast<UINT64>(created.dwHighDateTime) << 32) |
|
|
created.dwLowDateTime;
|
|
HANDLE previous_output = GetStdHandle(STD_OUTPUT_HANDLE);
|
|
HANDLE sink = CreateFileW(L"NUL", GENERIC_WRITE, FILE_SHARE_WRITE, nullptr,
|
|
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
|
|
assert(sink != INVALID_HANDLE_VALUE);
|
|
assert(SetStdHandle(STD_OUTPUT_HANDLE, sink));
|
|
piik::capture::WriteSourcePreview(piik::capture::TargetKind::window,
|
|
static_cast<UINT64>(reinterpret_cast<UINT_PTR>(window)),
|
|
GetCurrentProcessId(), creation_time);
|
|
SetStdHandle(STD_OUTPUT_HANDLE, previous_output);
|
|
CloseHandle(sink);
|
|
DestroyWindow(window);
|
|
std::cout << "Capture preview failure cleanup passed.\n";
|
|
}
|