WIP
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user