Support local build, support ffmpeg for windows, linux, macos, android
- local build, download opencv sdk from opencv.full
- support ffmpeg for windows, linux, android, macos (ios can't embed dylib, which will conflict with LGPL 2.0 license)
- add DartCvMacOS dependency for macos
- add DartCvIOS for ios
- move all dart code to independent plugin
dartcv - move all C wrappers code to dartcv https://github.com/rainyl/dartcv
- macos: support 10.15 and above
- android: API level 24 and above
- ios: 12.0 and above
may i ask why the separation needed? like will we need android and windows and linux libs too?
same as done in media_kit?
are you planning to have configuration with ffmpeg and without it? will that help with the vulkan stuff?
may i ask why the separation needed? like will we need android and windows and linux libs too?
same as done in media_kit?
- like i said before, i want to support
ffmpeg for all platforms, better with same version. - the previous building of
opencv.fullrelies onsystem-wide ffmpeg, especially on macos, brew updates ffmpeg actively, soopencv.fullhas to be recompiled every time they update ffmpeg. - thus, i want to compile opencv with custom linked ffmpeg, for this, i collected/forked some repos, including https://github.com/rainyl/FFmpeg-Builds and https://github.com/wang-bin/avbuild
- and, considering the increased app size and the fact that many users doesnt need it, it's better to provide a package without ffmpeg, so
opencv_corewas born. - considering that the only difference between opencv_dart and opencv_core is the ffmpeg, both for dart and c codes, extracting the dart code and C code seems to be a good choice, right?
- so the dart codes were extracted to
dartcv, this also benefits those who work without flutter, i.e., pure dart users, since the dependency of flutter is totally removed. - As for C code, it's not necessary to extract them to an independent repo, BUT, CocoaPods requires it, so I have to, oh, and the CocoaPods, I didn't find any elegant way to integrate CMake inside
podspec, like detecting the target platform and archtecture dynamically and tell CMake what to do, so I spent much time on developing two packages (DartCvIOSandDartCvMacOS) and published them to CocoaPods, in this way, we can just adds.dependency DartCvIOStoios/opencv_dart.podspecto introduce the package and let flutter to do the rest things, e.g., produce the correctInfo.plist.
To summarize, we do not need platform specific packages like media_kit, but 2 new packages for different users.
are you planning to have configuration with ffmpeg and without it? will that help with the vulkan stuff?
- For those who need videoio, use
opencv_dart - For pure dart users, use
dartcv - For others, use
opencv_core - Cons. For those who want to use platform specific backends ONLY, i.e., MSMF on windows, AVFoundation on macos and ios, MediaNDK on android, it's impossible for now, they have to compile opencv by themselves.
I am not sure about the vulkan, but I think it's no difference than before.
Ok thank you for the explanation
Were the specific backends supported before?
Were the specific backends supported before?
Yes, but they are very limited, there are several issues about this.
- #159
- #213
- #245
After seeing the issues, I think your approach is the right approach
Since ffmpeg is heavy and not needed for most cases, let me know If you need any assistance in anything
After seeing the issues, I think your approach is the right approach
Since ffmpeg is heavy and not needed for most cases, let me know If you need any assistance in anything
Thanks! ffmpeg related works have almost been finished, but I am still working on universal APIs, i.e., merge sync and async C wrappers, for better maintainability and uniform dart APIs, by adding empty callbacks to the wrappers needed to be called asynchronously.
- https://github.com/rainyl/dartcv/issues/2
this is almost finished too, however, some tests were failed and needs to be fixed. it would be helpful if you can help to fix them.
i will look into it, is there is any new steps to running the tests locally?
i will look into it, is there is any new steps to running the tests locally?
for macos, a manually built library is needed, I will add another action to build it in https://github.com/rainyl/dartcv
All tests passed now.
@abdelaziz-mahdy You can download prebuilt libs from https://github.com/rainyl/dartcv/releases/tag/4.10.0%2B2 now.