Skip to content

Refactor Media Foundation initialization for clarity and async handling#56

Merged
kdroidFilter merged 1 commit into
masterfrom
windowsfix
May 30, 2025
Merged

Refactor Media Foundation initialization for clarity and async handling#56
kdroidFilter merged 1 commit into
masterfrom
windowsfix

Conversation

@kdroidFilter
Copy link
Copy Markdown
Owner

@kdroidFilter kdroidFilter commented May 30, 2025

Summary

This pull request refactors the initialization logic for WindowsVideoPlayerState, focusing on improved clarity, maintainability, and async handling. Fix #39

Changes

  • Renamed and simplified Media Foundation initialization methods.
  • Replaced the isInitialized flag with a readyForPlayback check.
  • Introduced CompletableDeferred for cleaner and more reliable async player initialization.
  • Added a timeout mechanism to prevent indefinite initialization hangs.
  • Improved code structure and added detailed comments for better maintainability.

Notes

The changes streamline the initialization process, enhance reliability, and improve error handling. This ensures the player's readiness for playback and simplifies asynchronous state management.

Renamed and simplified Media Foundation initialization methods for better clarity. Removed redundant `isInitialized` flag and introduced `readyForPlayback` check to ensure readiness for playback. Improved code structure and comments to streamline initialization and enhance maintainability.
@kdroidFilter kdroidFilter merged commit c9ee955 into master May 30, 2025
@kdroidFilter kdroidFilter deleted the windowsfix branch July 29, 2025 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when using ComposeMediaPlayer in Windows 11

1 participant