You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Isolate was being fidgety about transferring the Status over isolate
barriers.
Timestamp needs to be kept inside the graph runner and then recovered so
that when switching from camera and live image you always get the latest
timestamp.
Future<void> queueImage(String nodeName, int timestamp, Uint8List file) async {
93
+
94
+
int instanceAddress = instance.ref.value.address;
81
95
awaitIsolate.run(() {
82
96
final _data = calloc.allocate<Uint8>(file.lengthInBytes);
83
97
final _bytes = _data.asTypedList(file.lengthInBytes);
84
98
_bytes.setRange(0, file.lengthInBytes, file);
85
99
final nodeNamePtr = nodeName.toNativeUtf8();
86
-
final status = ov.graphRunnerQueueImage(instance.ref.value, nodeNamePtr, timestamp, _data, file.lengthInBytes);
100
+
final status = ov.graphRunnerQueueImage(Pointer<Void>.fromAddress(instanceAddress), nodeNamePtr, timestamp, _data, file.lengthInBytes);
87
101
calloc.free(nodeNamePtr);
88
102
89
103
if (StatusEnum.fromValue(status.ref.status) !=StatusEnum.OkStatus) {
@@ -93,9 +107,10 @@ class GraphRunner {
93
107
}
94
108
95
109
Future<void> queueSerializationOutput(String nodeName, int timestamp, SerializationOutput output) async {
110
+
int instanceAddress = instance.ref.value.address;
96
111
awaitIsolate.run(() {
97
112
final nodeNamePtr = nodeName.toNativeUtf8();
98
-
final status = ov.graphRunnerQueueSerializationOutput(instance.ref.value, nodeNamePtr, timestamp, output.json, output.csv, output.overlay);
113
+
final status = ov.graphRunnerQueueSerializationOutput(Pointer<Void>.fromAddress(instanceAddress), nodeNamePtr, timestamp, output.json, output.csv, output.overlay);
99
114
calloc.free(nodeNamePtr);
100
115
101
116
if (StatusEnum.fromValue(status.ref.status) !=StatusEnum.OkStatus) {
0 commit comments