WIP - Playback timing jerky

This commit is contained in:
2025-10-07 14:53:33 +09:00
parent 5a6f4137fe
commit 37aa32eaa1
15 changed files with 1992 additions and 56 deletions

View File

@@ -49,7 +49,8 @@ namespace winrt::Vav2Player::implementation
VideoPlayerControl2::~VideoPlayerControl2()
{
LogMgr::GetInstance().LogInfo(L"VideoPlayerControl2", L"Destructor called");
// DO NOT LOG in destructor - DispatcherQueue may already be shut down
// This causes crashes when LogMessagePage tries to access UI thread
// Stop playback and cleanup
if (m_playbackController) {
@@ -319,8 +320,9 @@ namespace winrt::Vav2Player::implementation
LogMgr::GetInstance().LogInfo(L"VideoPlayerControl2",
L"Video loaded: " + std::to_wstring(videoWidth) + L"x" + std::to_wstring(videoHeight));
// Prepare video texture before decoding (via FrameProcessor)
// Link FrameProcessor to PlaybackController for timing synchronization
if (m_frameProcessor) {
m_playbackController->SetFrameProcessor(m_frameProcessor.get());
m_frameProcessor->PrepareVideoTexture(videoWidth, videoHeight);
}