alexmercerind/dart_vlc

How to get videoDimissions when using NativeVideo widget

yi0128 opened this issue · 1 comments

These codes work when using the Video widget, but they don't work when using the NativeVideo widget.
player.videoDimensionsStream.listen((videoDimensions) { setState(() => this.videoDimensions = videoDimensions); });
what should i do?

Hi @yi0128, 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!