Wes xx mediapipe integration

This commit is contained in:
Jelle De Geest
2023-03-12 20:34:16 +00:00
parent 8349b5f149
commit b11eeb465c
975 changed files with 192230 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Diagnostics.Contracts;
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class SafeNativeMethods
{
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_CalculatorGraph__HasError(IntPtr graph);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_CalculatorGraph__HasInputStream__PKc(IntPtr graph, string name);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_CalculatorGraph__GraphInputStreamsClosed(IntPtr graph);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_CalculatorGraph__IsNodeThrottled__i(IntPtr graph, int nodeId);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_CalculatorGraph__UnthrottleSources(IntPtr graph);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4151a04c25074315f99f586059854ebe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,77 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class UnsafeNativeMethods
{
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__(out IntPtr graph);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__PKc_i(byte[] serializedConfig, int size, out IntPtr graph);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern void mp_CalculatorGraph__delete(IntPtr graph);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__Initialize__PKc_i(IntPtr graph, byte[] serializedConfig, int size, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__Initialize__PKc_i_Rsp(
IntPtr graph, byte[] serializedConfig, int size, IntPtr sidePackets, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__Config(IntPtr graph, out SerializedProto serializedProto);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__ObserveOutputStream__PKc_PF_b(IntPtr graph, string streamName, int streamId,
[MarshalAs(UnmanagedType.FunctionPtr)] CalculatorGraph.NativePacketCallback packetCallback, [MarshalAs(UnmanagedType.I1)] bool observeTimestampBounds, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__AddOutputStreamPoller__PKc_b(IntPtr graph, string streamName, [MarshalAs(UnmanagedType.I1)] bool observeTimestampBounds, out IntPtr statusOrPoller);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__Run__Rsp(IntPtr graph, IntPtr sidePackets, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__StartRun__Rsp(IntPtr graph, IntPtr sidePackets, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__WaitUntilIdle(IntPtr graph, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__WaitUntilDone(IntPtr graph, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__AddPacketToInputStream__PKc_Ppacket(
IntPtr graph, string streamName, IntPtr packet, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__SetInputStreamMaxQueueSize__PKc_i(
IntPtr graph, string streamName, int maxQueueSize, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__CloseInputStream__PKc(IntPtr graph, string streamName, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__CloseAllPacketSources(IntPtr graph, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__Cancel(IntPtr graph);
#region GPU
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__GetGpuResources(IntPtr graph, out IntPtr gpuResources);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_CalculatorGraph__SetGpuResources__SPgpu(IntPtr graph, IntPtr gpuResources, out IntPtr status);
#endregion
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9f798d37c18934402bf7aa85c095fa32
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,17 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class UnsafeNativeMethods
{
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_api__ConvertFromCalculatorGraphConfigTextFormat(string configText, out SerializedProto serializedProto);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3c7f419d9297b69f7bd4259432b3a846
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 49d82fd23aaa04643b39b7aa9f461010
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,48 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Diagnostics.Contracts;
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class SafeNativeMethods
{
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_ImageFrame__IsEmpty(IntPtr imageFrame);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_ImageFrame__IsContiguous(IntPtr imageFrame);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ImageFrame__IsAligned__ui(
IntPtr imageFrame, uint alignmentBoundary, [MarshalAs(UnmanagedType.I1)] out bool value);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern ImageFormat.Types.Format mp_ImageFrame__Format(IntPtr imageFrame);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern int mp_ImageFrame__Width(IntPtr imageFrame);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern int mp_ImageFrame__Height(IntPtr imageFrame);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern int mp_ImageFrame__WidthStep(IntPtr imageFrame);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern IntPtr mp_ImageFrame__MutablePixelData(IntPtr imageFrame);
#region StatusOr
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_StatusOrImageFrame__ok(IntPtr statusOrImageFrame);
#endregion
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 99e8da896b508c97fbfe30b3c8d1c0d9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,72 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class UnsafeNativeMethods
{
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ImageFrame__(out IntPtr imageFrame);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ImageFrame__ui_i_i_ui(
ImageFormat.Types.Format format, int width, int height, uint alignmentBoundary, out IntPtr imageFrame);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ImageFrame__ui_i_i_i_Pui8_PF(
ImageFormat.Types.Format format, int width, int height, int widthStep, IntPtr pixelData,
[MarshalAs(UnmanagedType.FunctionPtr)] ImageFrame.Deleter deleter, out IntPtr imageFrame);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern void mp_ImageFrame__delete(IntPtr imageFrame);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ImageFrame__SetToZero(IntPtr imageFrame);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ImageFrame__SetAlignmentPaddingAreas(IntPtr imageFrame);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ImageFrame__CopyToBuffer__Pui8_i(IntPtr imageFrame, IntPtr buffer, int bufferSize);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ImageFrame__CopyToBuffer__Pui16_i(IntPtr imageFrame, IntPtr buffer, int bufferSize);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ImageFrame__CopyToBuffer__Pf_i(IntPtr imageFrame, IntPtr buffer, int bufferSize);
#region StatusOr
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern void mp_StatusOrImageFrame__delete(IntPtr statusOrImageFrame);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_StatusOrImageFrame__status(IntPtr statusOrImageFrame, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_StatusOrImageFrame__value(IntPtr statusOrImageFrame, out IntPtr imageFrame);
#endregion
#region Packet
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeImageFramePacket__Pif(IntPtr imageFrame, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeImageFramePacket_At__Pif_Rt(IntPtr imageFrame, IntPtr timestamp, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__ConsumeImageFrame(IntPtr packet, out IntPtr statusOrImageFrame);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__GetImageFrame(IntPtr packet, out IntPtr imageFrame);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__ValidateAsImageFrame(IntPtr packet, out IntPtr status);
#endregion
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2f1912965dccdf052aba3a477883eb98
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,29 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class UnsafeNativeMethods
{
#region Packet
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeMatrixPacket__PKc_i(byte[] serializedMatrixData, int size, out IntPtr packet_out);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeMatrixPacket_At__PKc_i_Rt(byte[] serializedMatrixData, int size, IntPtr timestamp, out IntPtr packet_out);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__ValidateAsMatrix(IntPtr packet, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__GetMatrix(IntPtr packet, out SerializedProto serializedProto);
#endregion
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fc5345171757d2049a546634b03b8c5e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Diagnostics.Contracts;
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class SafeNativeMethods
{
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_StatusOrPoller__ok(IntPtr statusOrPoller);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 089b00baa4837fc45b59e49b3fd89708
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,42 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class UnsafeNativeMethods
{
#region OutputStreamPoller
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern void mp_OutputStreamPoller__delete(IntPtr poller);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_OutputStreamPoller__Reset(IntPtr poller);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_OutputStreamPoller__Next_Ppacket(IntPtr poller, IntPtr packet, out bool result);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_OutputStreamPoller__SetMaxQueueSize(IntPtr poller, int queueSize);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_OutputStreamPoller__QueueSize(IntPtr poller, out int queueSize);
#endregion
#region StatusOrPoller
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern void mp_StatusOrPoller__delete(IntPtr statusOrPoller);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_StatusOrPoller__status(IntPtr statusOrPoller, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_StatusOrPoller__value(IntPtr statusOrPoller, out IntPtr poller);
#endregion
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5c8eb1e2420bbdbd79777f61fa67daa5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,25 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Diagnostics.Contracts;
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class SafeNativeMethods
{
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_Packet__IsEmpty(IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern void mp_SidePacket__clear(IntPtr sidePacket);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern int mp_SidePacket__size(IntPtr sidePacket);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: aa23fae0b90d981ac997812e8d7541fc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,153 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class UnsafeNativeMethods
{
#region common
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__(out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern void mp_Packet__delete(IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__At__Rt(IntPtr packet, IntPtr timestamp, out IntPtr newPacket);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__ValidateAsProtoMessageLite(IntPtr packet, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__Timestamp(IntPtr packet, out IntPtr timestamp);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__DebugString(IntPtr packet, out IntPtr str);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__RegisteredTypeName(IntPtr packet, out IntPtr str);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__DebugTypeName(IntPtr packet, out IntPtr str);
#endregion
#region Bool
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeBoolPacket__b([MarshalAs(UnmanagedType.I1)] bool value, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeBoolPacket_At__b_Rt([MarshalAs(UnmanagedType.I1)] bool value, IntPtr timestamp, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__GetBool(IntPtr packet, [MarshalAs(UnmanagedType.I1)] out bool value);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__ValidateAsBool(IntPtr packet, out IntPtr status);
#endregion
#region Float
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeFloatPacket__f(float value, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeFloatPacket_At__f_Rt(float value, IntPtr timestamp, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__GetFloat(IntPtr packet, out float value);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__ValidateAsFloat(IntPtr packet, out IntPtr status);
#endregion
#region Int
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeIntPacket__i(int value, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeIntPacket_At__i_Rt(int value, IntPtr timestamp, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__GetInt(IntPtr packet, out int value);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__ValidateAsInt(IntPtr packet, out IntPtr status);
#endregion
#region FloatArray
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeFloatArrayPacket__Pf_i(float[] value, int size, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeFloatArrayPacket_At__Pf_i_Rt(float[] value, int size, IntPtr timestamp, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__GetFloatArray_i(IntPtr packet, int size, out IntPtr value);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__ValidateAsFloatArray(IntPtr packet, out IntPtr status);
#endregion
#region FloatVector
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeFloatVectorPacket__Pf_i(float[] value, int size, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeFloatVectorPacket_At__Pf_i_Rt(float[] value, int size, IntPtr timestamp, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__GetFloatVector(IntPtr packet, out FloatVector value);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__ValidateAsFloatVector(IntPtr packet, out IntPtr status);
#endregion
#region String
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeStringPacket__PKc(string value, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeStringPacket_At__PKc_Rt(string value, IntPtr timestamp, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeStringPacket__PKc_i(byte[] bytes, int size, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp__MakeStringPacket_At__PKc_i_Rt(byte[] bytes, int size, IntPtr timestamp, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__GetString(IntPtr packet, out IntPtr value);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__GetByteString(IntPtr packet, out IntPtr value, out int size);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__ConsumeString(IntPtr packet, out IntPtr statusOrValue);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Packet__ValidateAsString(IntPtr packet, out IntPtr status);
#endregion
#region SidePacket
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_SidePacket__(out IntPtr sidePacket);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern void mp_SidePacket__delete(IntPtr sidePacket);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_SidePacket__emplace__PKc_Rp(IntPtr sidePacket, string key, IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_SidePacket__at__PKc(IntPtr sidePacket, string key, out IntPtr packet);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_SidePacket__erase__PKc(IntPtr sidePacket, string key, out int count);
#endregion
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2f45c37386d4ecb8abb6f74475d29dc6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Diagnostics.Contracts;
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class SafeNativeMethods
{
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern long mp_Timestamp__Value(IntPtr timestamp);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern double mp_Timestamp__Seconds(IntPtr timestamp);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern long mp_Timestamp__Microseconds(IntPtr timestamp);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_Timestamp__IsSpecialValue(IntPtr timestamp);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_Timestamp__IsRangeValue(IntPtr timestamp);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_Timestamp__IsAllowedInStream(IntPtr timestamp);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cd82a3be1540e60c9ab398f1d488758c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,56 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class UnsafeNativeMethods
{
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Timestamp__l(long value, out IntPtr timestamp);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern void mp_Timestamp__delete(IntPtr timestamp);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Timestamp__DebugString(IntPtr timestamp, out IntPtr str);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Timestamp__NextAllowedInStream(IntPtr timestamp, out IntPtr nextTimestamp);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Timestamp__PreviousAllowedInStream(IntPtr timestamp, out IntPtr prevTimestamp);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Timestamp_FromSeconds__d(double seconds, out IntPtr timestamp);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Timestamp_Unset(out IntPtr timestamp);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Timestamp_Unstarted(out IntPtr timestamp);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Timestamp_PreStream(out IntPtr timestamp);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Timestamp_Min(out IntPtr timestamp);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Timestamp_Max(out IntPtr timestamp);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Timestamp_PostStream(out IntPtr timestamp);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Timestamp_OneOverPostStream(out IntPtr timestamp);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_Timestamp_Done(out IntPtr timestamp);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3552112fccbfde24b80dbe41bf72a806
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Diagnostics.Contracts;
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class SafeNativeMethods
{
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_ValidatedGraphConfig__Initialized(IntPtr config);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern int mp_ValidatedGraphConfig__OutputStreamIndex__PKc(IntPtr config, string name);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern int mp_ValidatedGraphConfig__OutputSidePacketIndex__PKc(IntPtr config, string name);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern int mp_ValidatedGraphConfig__OutputStreamToNode__PKc(IntPtr config, string name);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_ValidatedGraphConfig_IsReservedExecutorName(string name);
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool mp_ValidatedGraphConfig__IsExternalSidePacket__PKc(IntPtr config, string name);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c73850dfbc5a5d0bc9c02651552efc2c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,56 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using System;
using System.Runtime.InteropServices;
namespace Mediapipe
{
internal static partial class UnsafeNativeMethods
{
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ValidatedGraphConfig__(out IntPtr config);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern void mp_ValidatedGraphConfig__delete(IntPtr config);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ValidatedGraphConfig__Initialize__Rcgc(IntPtr config, byte[] serializedConfig, int size, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ValidatedGraphConfig__Initialize__PKc(IntPtr config, string graphType, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ValidatedGraphConfig__ValidateRequiredSidePackets__Rsp(IntPtr config, IntPtr sidePackets, out IntPtr status);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ValidatedGraphConfig__Config(IntPtr config, out SerializedProto serializedProto);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ValidatedGraphConfig__InputStreamInfos(IntPtr config, out EdgeInfoVector edgeInfoVector);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ValidatedGraphConfig__OutputStreamInfos(IntPtr config, out EdgeInfoVector edgeInfoVector);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ValidatedGraphConfig__InputSidePacketInfos(IntPtr config, out EdgeInfoVector edgeInfoVector);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ValidatedGraphConfig__OutputSidePacketInfos(IntPtr config, out EdgeInfoVector edgeInfoVector);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ValidatedGraphConfig__RegisteredSidePacketTypeName(IntPtr config, string name, out IntPtr statusOrString);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ValidatedGraphConfig__RegisteredStreamTypeName(IntPtr config, string name, out IntPtr statusOrString);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern MpReturnCode mp_ValidatedGraphConfig__Package(IntPtr config, out IntPtr str);
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
public static extern void mp_api_EdgeInfoArray__delete(IntPtr data, int size);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3178003154386ee09ae63eb0a48f386b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: