VideoWriter.fromFile constructor
VideoWriter.fromFile(})
Implementation
factory VideoWriter.fromFile(
String filename,
String codec,
double fps,
(int, int) frameSize, {
int? apiPreference,
bool isColor = true,
}) {
final p = calloc<cvg.VideoWriter>();
final cname = filename.toNativeUtf8();
final codec_ = VideoWriter.fourcc(codec);
apiPreference == null
? cvRun(
() => cffi.VideoWriter_NewFromFile(
cname.cast(),
codec_,
fps,
frameSize.$1,
frameSize.$2,
isColor,
p,
),
)
: cvRun(
() => cffi.VideoWriter_NewFromFile_1(
cname.cast(),
apiPreference,
codec_,
fps,
frameSize.$1,
frameSize.$2,
isColor,
p,
),
);
calloc.free(cname);
return VideoWriter._(p);
}