-
Notifications
You must be signed in to change notification settings - Fork 925
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
Init from background #792
Init from background #792
Conversation
@deckerst Thanks for creating this PR. We tested the changes but they didn't work for us. Is there a test-application we can use to test it? We have test-applications under the ffmpeg-kit-test repo. Modifying one of those would also work. |
Thanks for the feedback. I'll take a look at the test apps from ffmpeg kit.
Do you mean that it failed to build? Created some regression? Or simply didn't fix the issue as expected? |
No build issues. Executing commands inside an isolate still doesn't work for us. |
@tanersener The goal with arthenica/ffmpeg-kit-test#49 is for you to try the new "Background" tab, comparing running with and without the fix provided here in #792. Please note that I have only modified |
Thanks @deckerst. Let us test it on our side. |
@deckerst Today I had the chance to test this PR with your test-application. Yes, background tab works fine. However, when we go back to the other tabs e.g. command tab, video tab; they don't work anymore. I see the following error message in them.
Have you seen it in your tests? |
Hello @tanersener it would be good if this PR could go to the end. Computational operations on ffmpeg are very resource intensive and it is almost impossible to use it correctly with a single thread. Thank you. |
@tanersener I confirm I get the same issue when mixing calls from the activity and from background when using the test app. Strangely, I don't experience this in my own app, where I also mix calls. That said, in my own app I register handles and do the background plumbing myself, while for the test app I grabbed the package Anyway, I'll take a closer look, but if anybody else sees where I did wrong please feel free to pitch in. |
…on unconditionally
|
@tanersener does that work for you? |
@deckerst Flutter plugin v6.0 will be patched again. I'll test the changes as soon as the patch is published. |
I tested the changes. It seems like the functionality is there. However, the following lines are printed a lot in the startup. Moreover, I see them each time I execute an
|
Yes, that's what I explained here:
These log lines are related to the event subscription. The subscription itself is light, so these logs are not a sign of a memory/performance issue. If the existing logs are now too noisy, we could simply remove them, or lower their level to |
I'm not worried about the log messages themselves. I'm worried about their meaning. As I said, they are printed every time I call an |
It's all in my comment above.
To be honest, this issue has been fixed for me for ages. I'm happy to stay with my fork. I was willing to give back to this project with this PR, but I can't dedicate more time and effort to it, especially as I don't know the inner workings of isolates and flutter engine. You'll need a smarter person to pick up where I left off. |
Thanks for your efforts. But we don't want to risk breaking the plugin to add a new feature. Subscribing to events again on each Developing an alternative |
Any update of this PR? cause this could be game changer for better performance 🔥. Thank you |
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This PR was closed because it has been stalled for 7 days with no activity. |
Not sure whether you are talking about my fork, but if you do, check this. |
How can I make it work with the ffmpeg_kit_flutter_full_gpl version? |
Fork it and change that line. For you I believe it's something like:
|
Hello, I would like to pick this up, however I can't guarantee that it will be fast since I'm busy at the moment. Also, I'm not very experienced in native code (swift / kotlin). But I would like to try, maybe we won't be needing these forks afterwards. If I can get some pointers for what should be done, I would try to get it done. What I understood was that an init and a reset function would be the way to go, which should deal with some initation. (I'll have to dig into the code to figure out what's going on, I guess) In terms of platform support, is it a hard requirement to support every platform, or is Android and iOS enough for now? Cheers |
@mikron123 I'm also using |
@fsmdeveloper sorry I can't dedicate time to fix issues others have with this fork. It works for me, and I suppose you misuse plugins/isolates/engines. In any case, you can check out how I use it in my app, specifically this plugin. |
Description
Initialize the plugin when attaching to the engine (instead of the activity), so it can now be used from background processes without activity. I believe this fixes #718, #711, #588, #461, #367, #263 (which are currently closed for being stale, not fixed).
Type of Change
Checks
Android
,iOS
,Linux
,macOS
,tvOS
)Tests
Use the plugin from a background isolate.