Comments (3)
Hi @lycstar !
Current implementation extracts RAW frame and sends back it to Dart through platform channel for rendering it using RawImage
and decodeImageFromPixels
.
For more detail, a single buffer is allocated on the heap of size videoHeight * videoWidth * 4 bytes as uint8_t[]
in which frame data is stored. Recently its been informed to me (here), that the data sent through platform channels is being retained in memory & seems a new buffer is being allocated everytime (maybe some deepcopying is happening somewhere). So, it needs to be figured out by me first of all as a priority.
You are exactly right, this isn't the best in terms of performance but I don't think there is anything else we can do for showing a video inside Widget tree. Even official video_player plugin does so. Although, it is hard on CPU & does not use GPU.
A native viewport directly from libVLC will be shown if you pass videoHeight
and videoWidth
as 0, while instantiating Player
class. But it will be a separate window & will not be shown inside Widget tree. This native viewport is more performant as its direct libVLC doing its thing & is GPU accelerated.
Apart from all above, I've started to work on FFI based implementation of this plugin so that I can bring this library to Android or mac or console dart applications. Considering that, there will be no need to transfer frame data in that case for console apps.
Thanks.
I'll be willing to improve the implementation, but I believe showing RAW frames is the best that we can have right now.
from dart_vlc.
The memory leak issue is fixed & considering its a question, I feel my answer gives you enough reasoning of things.
from dart_vlc.
@alexmercerind Thank you for your anwser.
from dart_vlc.
Related Issues (20)
- Flutter 3.3.10 not working HOT 1
- LateError (LateInitializationError: Field 'dynamicLibrary' has not been initialized.) HOT 1
- terminate called after throwing an instance of 'std::runtime_error' HOT 1
- Same video not playing second time.
- 'filesystem' file not found HOT 1
- playOrPause method not working HOT 1
- how to get the resource duration
- Trying to create a realse app in windows using Inno, HOT 1
- when the music playback is completed?
- app rash du to Libaccess_output_srt_plugin.dll
- HEVC Video
- main vout display error: Failed to set on top
- Recording on Windows not able to play
- setVolume not working at all
- windows 7 support
- player.dispose() crashes or freezes my app
- package:media_kit
- DirectShor parameter args is not working
- MacOs dart_vlc not such file HOT 4
- Window Problems encountered playing locally encrypted m3u8 files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart_vlc.