This commit is contained in:
2025-10-03 19:00:15 +09:00
parent ef7fd02a8a
commit 7968c7e0be
29 changed files with 455 additions and 4617 deletions

View File

@@ -298,7 +298,18 @@ namespace winrt::Vav2Player::implementation
// 2. Load the video file. VavCore will now see the pending D3D device
// and initialize the decoder in the correct GPU-accelerated mode.
std::wstring filePathStr(filePath.c_str());
LogMgr::GetInstance().LogInfo(L"VideoPlayerControl2", L"About to call LoadVideo with path: " + std::wstring(filePath));
// Safety check: Verify m_playbackController is valid
if (!m_playbackController) {
LogMgr::GetInstance().LogError(L"VideoPlayerControl2", L"CRITICAL: m_playbackController is nullptr!");
UpdateStatus(L"Load failed - internal error");
return;
}
bool success = m_playbackController->LoadVideo(filePathStr);
LogMgr::GetInstance().LogInfo(L"VideoPlayerControl2",
success ? L"LoadVideo returned TRUE" : L"LoadVideo returned FALSE");
if (success) {
// 3. Get video dimensions (which are now available).
@@ -550,7 +561,8 @@ namespace winrt::Vav2Player::implementation
return;
}
processor->ProcessFrame(player, [weakThis = get_weak(), &consecutiveErrors](bool success) {
processor->ProcessFrame(player, [weakThis = get_weak()](bool success) {
// Static variable is already in function scope, no need to capture
if (auto strongThis = weakThis.get()) {
if (!success) {
consecutiveErrors++;