New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Hybrid composition support for Android #314
Conversation
Hey, @mitchross @alr2413 what do you think about this PR? |
@XuanTung95 - looks great, thanks! Could you please also update CHANGELOG.md for both plugins? |
Looks fine to me. |
What is the use case for this? Edit - I see #313 @XuanTung95 what are implications for iOS? |
As the doc
flutter_vlc_player uses Virtual display as default so min SDK 20 seems fair.
iOS only uses Hybrid composition as the doc. So there is nothing to do for iOS. |
I updated CHANGELOG and bump version of flutter_vlc_player to 7.1.2 |
Why not have Hybrid Composition default if it is more performant? |
It would be a breaking change and need to be tested carefully. And there are different behaviors between them as they take different approaches. |
Hmm if its a breaking change to use it, then this flutter_vlc_lib needs to be updated to major version as this is no longer a minor or patch change. |
I think it's not a breaking change because the default still uses Virtual display as before. Changing the default to Hybrid Composition may affect other apps. |
I think there should be a disclaimer/documentation when to use hybrid composition vs virtual display. It appears your original issue is addressing performance issues, wouldn't that affect all? |
The doc of Flutter team above already describes what is Virtual Display/Hybrid and their performance. I think we can add it in Readme.
Yes. But it only occurs when creating the platform view. I did not see lag after they are created. I'm not sure about when to use hybrid composition vs virtual display, their behavior is complex. Forks can try to use hybrid composition if there are lags. libvlc also causes frame delay when calling init() and stop() as I see. |
Are we good to merge this one? |
The instructions are unclear when you need this. Is it fine to merge? Yes Will average users of flutter who are using this package know when to use hybrid vs virtual display? I highly doubt it. These are implementation details deep into Flutter's framework. Personally, Id like a very well-documented reason when to use each as it relates to VLC not to the generic flutter doc linked. |
I think I'm fine with the way it's now, as it in some cases improves performance. So let's get this in. |
minSdkVersion should be 19 as a lot of tv devices are Android 4.4. |
Are there any reason why this package is not using Texture? |
bool virtualDisplay
to specify whether Virtual displays or Hybrid composition is used on Android. Default is Virtual displays.