rainyl / opencv_dart

OpenCV bindings for Dart language and Flutter. Support Asynchronous Now!
https://pub.dev/packages/opencv_dart
Apache License 2.0
109 stars 13 forks source link

video writer open (sync vs async) #197

Closed abdelaziz-mahdy closed 1 month ago

abdelaziz-mahdy commented 1 month ago

sync returns video Writer https://github.com/rainyl/opencv_dart/blob/cb044565f983a51ce3ed4923b6298df38538c2d4/lib/src/video/videoio.dart#L174 async returns bool https://github.com/rainyl/opencv_dart/blob/cb044565f983a51ce3ed4923b6298df38538c2d4/lib/src/video/videoio_async.dart#L102

cant figure which one is the correct api

rainyl commented 1 month ago

Oh, it's redundant, https://github.com/rainyl/opencv_dart/blob/cb044565f983a51ce3ed4923b6298df38538c2d4/lib/src/video/videoio.dart#L174-L218

maybe we should rename factory open() to something like openFile

rainyl commented 1 month ago

the open and openAsync should be class methods (wrapper for https://docs.opencv.org/4.x/dd/d9e/classcv_1_1VideoWriter.html#a8b44d21f9bb5a02f531b50bbb15b9527)