setPointMap method
Set region-of-interest mapping for video display https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setpointmapconst-float-videoroi-const-float-viewroi--nullptr-int-count--2-void-vo_opaque--nullptr
Implementation
void setPointMap({
List<double>? videoRoi,
List<double>? viewRoi,
int count = 2,
}) {
final cv = (videoRoi != null)
? () {
final p = calloc<Float>(count * 2);
for (int i = 0; i < videoRoi.length; ++i) {
p[i] = videoRoi[i];
}
return p;
}()
: nullptr;
final cw = (viewRoi != null)
? () {
final p = calloc<Float>(count * 2);
for (int i = 0; i < viewRoi.length; ++i) {
p[i] = viewRoi[i];
}
return p;
}()
: nullptr;
_player.ref.setPointMap
.asFunction<
void Function(
Pointer<mdkPlayer>,
Pointer<Float>,
Pointer<Float>,
int,
Pointer<Void>,
)
>()(_player.ref.object, cv.cast(), cw.cast(), count, _getVid());
if (cv != nullptr) {
calloc.free(cv);
}
if (cw != nullptr) {
calloc.free(cw);
}
}