Closed HedgeHao closed 1 year ago
That's odd. I thought this was fixed after Flutter 3.0.0.
Seems like ShapeDecoration is interfering. When I change ShapeDecoration to BoxDecoration, the flicker goes away.
Hi @HedgeHao, I have decided to remove NativeVideo
widget for now in the latest version v0.4.0. Since it is no more, this is no longer a concern. Below I have discussed the future plans:
First of all, sorry for being inactive. I've been occupied with my exams & college. Maintaining open-source packages requires consistent work & time out of daily life. Writing C++ & native code is even more tedious.
There are a number of issues with this package, both in regard of performance & stability which I would like to fix. I'm not quite satisfied with the current state of the package, though I believe it is still usable. Hardware acceleration is a big concern. Currently, a substantial amount of load is caused on the CPU when using package:dart_vlc. This is because every video frame is copied from GPU to RAM buffer (which is a CPU process & CPU isn't made for rendering) for drawing it into Flutter's texture widget, both due to Flutter & libvlc's limitations at that time.
I made NativeVideo
widget for bringing hardware-acceleration but as it turns out, it is not exactly good & stable alternative i.e. it uses undocumented API from Windows, has other issues while rendering inside widget tree (like you shared). It simply worked by creating another window under actual Flutter window & making a section of Flutter app transparent to display video through it. Thus, a hacky solution.
Now, my work is sponsored by Stream. I can now proceed my work with peace & build the best-ever performant & stable video library for Flutter Desktop. I attempted to render using OpenGL the other day: flutter-windows-ANGLE-OpenGL-Direct3D-Interop. I will continue this work.
Thanks!
Describe the bug When using Native Player on WIndows with some certain widgets. The player keeps flicker.
When using both widget 1 and 2. The flicker happened. https://user-images.githubusercontent.com/8536950/177518800-beae3297-1666-443a-8a49-d2de8381022b.mp4
When comment out widget 1. The video is playing fine. https://user-images.githubusercontent.com/8536950/177518403-847e7e56-c48c-4544-aeb3-c451ca76148f.mp4
Media Media is download from here
Minimal reproducible code
Flutter logs
Operating system: Windows 10 Pro, 21H1, 19043.1645
Other details:
dart_vlc
.dart_vlc
.