public override NormalizedRect GetValue() { var rectPtr = UnsafeNativeMethods.MpPacketGetNormalizedRect(ptr); var rect = SerializedProto.FromPtr <NormalizedRect>(rectPtr, NormalizedRect.Parser); UnsafeNativeMethods.MpSerializedProtoDestroy(rectPtr); return(rect); }
public override Detection GetValue() { var detectionPtr = UnsafeNativeMethods.MpPacketGetDetection(ptr); var detection = SerializedProto.FromPtr <Detection>(detectionPtr, Detection.Parser); UnsafeNativeMethods.MpSerializedProtoDestroy(detectionPtr); return(detection); }
public override ClassificationList GetValue() { var classificationListPtr = UnsafeNativeMethods.MpPacketGetClassificationList(ptr); var rect = SerializedProto.FromPtr <ClassificationList>(classificationListPtr, ClassificationList.Parser); UnsafeNativeMethods.MpSerializedProtoDestroy(classificationListPtr); return(rect); }
public static List <T> FromPtr <T>(IntPtr ptr, pb::MessageParser <T> parser) where T : pb::IMessage <T> { var inner = Marshal.PtrToStructure <SerializedProtoVectorInner>(ptr); var protos = new List <T>(inner.size); unsafe { var arr = inner.data; for (var i = 0; i < inner.size; i++) { protos.Add(SerializedProto.FromPtr <T>((IntPtr)(*arr++), parser)); } } return(protos); }
public static extern MpReturnCode mp_ValidatedGraphConfig__Config(IntPtr config, out SerializedProto serializedProto);
public static extern bool mp_api__ConvertFromCalculatorGraphConfigTextFormat(string configText, out SerializedProto serializedProto);
public static extern MpReturnCode mp_CalculatorGraph__Config(IntPtr graph, out SerializedProto serializedProto);
public static extern MpReturnCode mp_Packet__GetTimedModelMatrixProtoList(IntPtr packet, out SerializedProto serializedProto);
public static extern MpReturnCode mp_Packet__GetRect(IntPtr packet, out SerializedProto serializedProto);
public static extern MpReturnCode mp_Packet__GetNormalizedLandmarkList(IntPtr packet, out SerializedProto serializedProto);
public static extern MpReturnCode mp_Packet__GetFrameAnnotation(IntPtr packet, out SerializedProto serializedProto);
public static extern MpReturnCode mp_Packet__GetFaceGeometry(IntPtr packet, out SerializedProto serializedProto);
public static extern MpReturnCode mp_Packet__GetClassificationList(IntPtr packet, out SerializedProto serializedProto);