jakky1 / video_player_win

Flutter video player for Windows, lightweight, using Windows built-in Media Foundation API. Windows implementation of the video_player plugin.
BSD 3-Clause "New" or "Revised" License
35 stars 11 forks source link

Does 3.0.0 work on Windows 10 ? #43

Closed czw299 closed 1 month ago

czw299 commented 1 month ago

I tested it fine on Windows 11, and after installing Windows 10 22H2(19045.2846) on the same computer, it crashed. The crash may have been caused by ucrtbase.dll. I'm not sure. Maybe need some dll?

jakky1 commented 1 month ago

Version 3.0.0 should be able to run normally on windows 8 or above.

I only tested it on Windows 11.

According to what you said, it seems that this package does not currently work properly on win10.

But, I have no win10 PC to debug on it...:(

HELP WANTED! I hope someone can help me solve the problem of this package crashing in win10 !!!

jakky1 commented 1 month ago

After some study, this dll file is part of "Microsoft Visual C++ Redistributable".

Could you try to install "Microsoft Visual C++ Redistributable" and test again ?

czw299 commented 1 month ago

After some study, this dll file is part of "Microsoft Visual C++ Redistributable".

Could you try to install "Microsoft Visual C++ Redistributable" and test again ?

I tried it and it didn't work. I'll try to debug on Windows 10 later.

jakky1 commented 1 month ago

Thanks for help. I think it maybe caused by string copy operation in the end of OpenURL() function, which may need ucrtbase.dll file.

czw299 commented 1 month ago

Thanks for help. I think it maybe caused by string copy operation in the end of OpenURL() function, which may need ucrtbase.dll file.

I'm not very good at C++, try my best and find this. This is debug in WMware Virtual machine. I fixed the crash, but it is not clear why it failed and the video did not play. 20241012-184957

jakky1 commented 1 month ago

I push a patch onto github. Please try in on your Windows 10 and let me know if it still crash.

Remember modify your pubspec.yaml:

dependencies:
  video_player_win:
    git:
      url: https://github.com/jakky1/video_player_win.git
      ref: master
czw299 commented 1 month ago

I push a patch onto github. Please try in on your Windows 10 and let me know if it still crash.

Remember modify your pubspec.yaml:

dependencies:
  video_player_win:
    git:
      url: https://github.com/jakky1/video_player_win.git
      ref: master

Still crash. Remove some code as shown in the image, and it works. But the video won't play image

czw299 commented 1 month ago

hr is E_INVALIDARG

屏幕截图 2024-10-12 205238

czw299 commented 1 month ago

image

😂😂😂Ohhhhhhhhhhhhhhhhhhhh, it works.

jakky1 commented 1 month ago

@czw299 , Good Job :)

It seems that it crash on PC that without DirectX 12, And unfortunately, the version of DirectX on my PC is version 12 ... :(

I modify the source code according to your comment, and push a new version 3.1.0 to pub.dev.

Could you please help try it on your Windows 10 again? Thanks.

dependencies:
  video_player_win: ^3.1.0
czw299 commented 1 month ago

3.1.0 Works fine. Thanks😊