flet icon indicating copy to clipboard operation
flet copied to clipboard

Make VideoController using 'gpu' vo

Open bl1nch opened this issue 10 months ago • 6 comments

https://github.com/media-kit/media-kit/issues/614 https://github.com/flet-dev/flet/issues/3072

bl1nch avatar Apr 21 '24 19:04 bl1nch

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 21 '24 19:04 CLAassistant

Thanks!

I guess we have to merge this before you can try it, right?

ndonkoHenri avatar Apr 21 '24 22:04 ndonkoHenri

You can try PR without merging:

image

FeodorFitsner avatar Apr 21 '24 22:04 FeodorFitsner

I meant @bl1nch, not me. 😉

ndonkoHenri avatar Apr 22 '24 00:04 ndonkoHenri

@ndonkoHenri sorry I'm new in this project, how I can build apk with these changes to test it?

Tried to install cloned flet with poetry but when I build apk with flet_video I get:

(test-client-py3.11) PS C:\Users\bl1nc\PycharmProjects\test-client> flet build apk --include-packages flet_video
Creating Flutter bootstrap project...OK
Customizing app icons and splash images...OK
Generating app icons...Because flet_video <0.20.1 depends on flet ^0.20.0 and flet_video >=0.20.1 <0.20.2 depends on flet ^0.20.1, flet_video <0.20.2 requires flet ^0.20.0.
And because flet_video ^0.20.2 depends on flet ^0.20.2, flet_video <0.21.0 requires flet ^0.20.0.
And because flet_video >=0.21.0 <0.21.1 depends on flet ^0.21.0 and flet_video >=0.21.1 <0.21.2 depends on flet ^0.21.1, flet_video <0.21.2 requires flet ^0.20.0
or >=0.21.0 <0.22.0.
And because flet_video ^0.21.2 depends on flet ^0.21.2 and flet_video >=0.22.0 depends on flet ^0.22.0, every version of flet_video requires flet ^0.20.0 or     
>=0.21.0 <0.22.0 or ^0.22.0.
So, because test-client depends on both flet ^0.19.0 and flet_video any, version solving failed.

bl1nch avatar Apr 22 '24 01:04 bl1nch

Will let you know when you can test it.

ndonkoHenri avatar Apr 23 '24 17:04 ndonkoHenri

Maybe we should implement VideoControllerConfiguration as a property in Video control? I read there could be issues when playing video in simulator. It would be great to control that depending on the platform. I'm afraid we could break something with this PR for other users.

FeodorFitsner avatar Apr 30 '24 17:04 FeodorFitsner

Maybe we should implement VideoControllerConfiguration as a property in Video control

Nice idea!

ndonkoHenri avatar Apr 30 '24 18:04 ndonkoHenri

Maybe we should implement VideoControllerConfiguration as a property in Video control

Nice idea!

Sorry, have you already started implementing this? I haven't written in flutter or dart before, I'm afraid I won't be able to implement it in the near future.

bl1nch avatar May 04 '24 07:05 bl1nch

I'm afraid I won't be able to implement it in the near future.

No worries, thanks for your contribution! Will wrap this up :)

ndonkoHenri avatar May 04 '24 12:05 ndonkoHenri

Created VideoConfiguration class, and added a new parameter to the Video control named configuration. @FeodorFitsner, Thanks again for your suggestion! On macOS, when output_backend="gpu", a new window pops up with video (window at the top in image below) 😬 Bildschirmfoto 2024-05-08 um 13 37 49

ndonkoHenri avatar May 08 '24 11:05 ndonkoHenri