Wes xx mediapipe integration
This commit is contained in:
@@ -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
|
||||
{
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern uint mp_GlCalculatorHelper__framebuffer(IntPtr glCalculatorHelper);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern IntPtr mp_GlCalculatorHelper__GetGlContext(IntPtr glCalculatorHelper);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public static extern bool mp_GlCalculatorHelper__Initialized(IntPtr glCalculatorHelper);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e564c364aa8fc108c952c34bd5708e49
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,52 @@
|
||||
// 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_GlCalculatorHelper__(out IntPtr glCalculatorHelper);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern void mp_GlCalculatorHelper__delete(IntPtr glCalculatorHelper);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlCalculatorHelper__InitializeForTest__Pgr(IntPtr glCalculatorHelper, IntPtr gpuResources);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlCalculatorHelper__RunInGlContext__PF(
|
||||
IntPtr glCalculatorHelper, [MarshalAs(UnmanagedType.FunctionPtr)] GlCalculatorHelper.NativeGlStatusFunction glFunc, out IntPtr status);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlCalculatorHelper__CreateSourceTexture__Rif(
|
||||
IntPtr glCalculatorHelper, IntPtr imageFrame, out IntPtr glTexture);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlCalculatorHelper__CreateSourceTexture__Rgb(
|
||||
IntPtr glCalculatorHelper, IntPtr gpuBuffer, out IntPtr glTexture);
|
||||
|
||||
#if UNITY_IOS
|
||||
[DllImport (MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlCalculatorHelper__CreateSourceTexture__Rgb_i(
|
||||
IntPtr glCalculatorHelper, IntPtr gpuBuffer, int plane, out IntPtr glTexture);
|
||||
#endif
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlCalculatorHelper__CreateDestinationTexture__i_i_ui(
|
||||
IntPtr glCalculatorHelper, int outputWidth, int outputHeight, GpuBufferFormat formatCode, out IntPtr glTexture);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlCalculatorHelper__CreateDestinationTexture__Rgb(
|
||||
IntPtr glCalculatorHelper, IntPtr gpuBuffer, out IntPtr glTexture);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlCalculatorHelper__BindFrameBuffer__Rtexture(IntPtr glCalculatorHelper, IntPtr glTexture);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 82da240322adcf754810db201ec3bb6d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,60 @@
|
||||
// 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
|
||||
{
|
||||
#region GlContext
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern IntPtr mp_SharedGlContext__get(IntPtr sharedGlContext);
|
||||
|
||||
#if UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX || UNITY_ANDROID
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern IntPtr mp_GlContext__egl_display(IntPtr glContext);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern IntPtr mp_GlContext__egl_config(IntPtr glContext);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern IntPtr mp_GlContext__egl_context(IntPtr glContext);
|
||||
#endif
|
||||
|
||||
#if UNITY_IOS
|
||||
[Pure, DllImport (MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern IntPtr mp_GlContext__eagl_context(IntPtr glContext);
|
||||
#elif UNITY_STANDALONE_OSX
|
||||
[Pure, DllImport (MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern IntPtr mp_GlContext__nsgl_context(IntPtr glContext);
|
||||
|
||||
[Pure, DllImport (MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern IntPtr mp_GlContext__nsgl_pixel_format(IntPtr glContext);
|
||||
#endif
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public static extern bool mp_GlContext__IsCurrent(IntPtr glContext);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern int mp_GlContext__gl_major_version(IntPtr glContext);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern int mp_GlContext__gl_minor_version(IntPtr glContext);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern long mp_GlContext__gl_finish_count(IntPtr glContext);
|
||||
#endregion
|
||||
|
||||
#region GlSyncToken
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern IntPtr mp_GlSyncToken__get(IntPtr glSyncToken);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6d0d1aa759d4722881c31504ff7f2b7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,62 @@
|
||||
// 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 GlContext
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern void mp_SharedGlContext__delete(IntPtr sharedGlContext);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern void mp_SharedGlContext__reset(IntPtr sharedGlContext);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlContext_GetCurrent(out IntPtr sharedGlContext);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlContext_Create__P_b([MarshalAs(UnmanagedType.I1)] bool createThread, out IntPtr statusOrSharedGlContext);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlContext_Create__Rgc_b(
|
||||
IntPtr shareContext, [MarshalAs(UnmanagedType.I1)] bool createThread, out IntPtr statusOrSharedGlContext);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlContext_Create__ui_b(
|
||||
uint shareContext, [MarshalAs(UnmanagedType.I1)] bool createThread, out IntPtr statusOrSharedGlContext);
|
||||
|
||||
#if UNITY_IOS
|
||||
[DllImport (MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlContext_Create__Pes_b(
|
||||
IntPtr sharegroup, [MarshalAs(UnmanagedType.I1)]bool createThread, out IntPtr statusOrSharedGlContext);
|
||||
#endif
|
||||
#endregion
|
||||
|
||||
#region GlSyncToken
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern void mp_GlSyncToken__delete(IntPtr glSyncToken);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern void mp_GlSyncToken__reset(IntPtr glSyncToken);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlSyncPoint__Wait(IntPtr glSyncPoint);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlSyncPoint__WaitOnGpu(IntPtr glSyncPoint);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlSyncPoint__IsReady(IntPtr glSyncPoint, out bool value);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlSyncPoint__GetContext(IntPtr glSyncPoint, out IntPtr sharedGlContext);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 07ecf4eb645a5867f8fd99c199334778
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,40 @@
|
||||
// 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
|
||||
{
|
||||
#region GlTextureBuffer
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern uint mp_GlTextureBuffer__name(IntPtr glTextureBuffer);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern uint mp_GlTextureBuffer__target(IntPtr glTextureBuffer);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern int mp_GlTextureBuffer__width(IntPtr glTextureBuffer);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern int mp_GlTextureBuffer__height(IntPtr glTextureBuffer);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern GpuBufferFormat mp_GlTextureBuffer__format(IntPtr glTextureBuffer);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern IntPtr mp_GlTextureBuffer__GetProducerContext(IntPtr glTextureBuffer);
|
||||
#endregion
|
||||
|
||||
#region SharedGlTextureBuffer
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern IntPtr mp_SharedGlTextureBuffer__get(IntPtr glTextureBuffer);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 94158874b636c7c1c86afcec7fca108e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,51 @@
|
||||
// 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 GlTextureBuffer
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlTextureBuffer__WaitUntilComplete(IntPtr glTextureBuffer);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlTextureBuffer__WaitOnGpu(IntPtr glTextureBuffer);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlTextureBuffer__Reuse(IntPtr glTextureBuffer);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlTextureBuffer__Updated__Pgst(IntPtr glTextureBuffer, IntPtr prodToken);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlTextureBuffer__DidRead__Pgst(IntPtr glTextureBuffer, IntPtr consToken);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlTextureBuffer__WaitForConsumers(IntPtr glTextureBuffer);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlTextureBuffer__WaitForConsumersOnGpu(IntPtr glTextureBuffer);
|
||||
#endregion
|
||||
|
||||
#region SharedGlTextureBuffer
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern void mp_SharedGlTextureBuffer__delete(IntPtr glTextureBuffer);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern void mp_SharedGlTextureBuffer__reset(IntPtr glTextureBuffer);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_SharedGlTextureBuffer__ui_ui_i_i_ui_PF_PSgc(
|
||||
uint target, uint name, int width, int height, GpuBufferFormat format,
|
||||
[MarshalAs(UnmanagedType.FunctionPtr)] GlTextureBuffer.DeletionCallback deletionCallback,
|
||||
IntPtr producerContext, out IntPtr sharedGlTextureBuffer);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7aaa60de75bee921e82d0d1a754b3544
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,27 @@
|
||||
// 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 int mp_GlTexture__width(IntPtr glTexture);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern int mp_GlTexture__height(IntPtr glTexture);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern uint mp_GlTexture__target(IntPtr glTexture);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern uint mp_GlTexture__name(IntPtr glTexture);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8844f009f7a785ec8bcfdd8b60c7f3a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,26 @@
|
||||
// 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_GlTexture__(out IntPtr glTexture);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern void mp_GlTexture__delete(IntPtr glTexture);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlTexture__Release(IntPtr glTexture);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GlTexture__GetGpuBufferFrame(IntPtr glTexture, out IntPtr gpuBuffer);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1bc45e10b1b9589dc88a57aa1b1dc97b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
// 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
|
||||
{
|
||||
#if UNITY_STANDALONE_LINUX || UNITY_ANDROID
|
||||
[Pure, DllImport(MediaPipeLibrary)]
|
||||
public static extern IntPtr eglGetCurrentContext();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 240d79bdaffc8e1beb14793ddfa70635
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
// 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)]
|
||||
public static extern void glFlush();
|
||||
|
||||
[DllImport(MediaPipeLibrary)]
|
||||
public static extern void glReadPixels(int x, int y, int width, int height, uint glFormat, uint glType, IntPtr pixels);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cdb6820be7e5d26ab959e3787392835b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
// 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.Diagnostics.Contracts;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Mediapipe
|
||||
{
|
||||
internal static partial class SafeNativeMethods
|
||||
{
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern ImageFormat.Types.Format mp__ImageFormatForGpuBufferFormat__ui(GpuBufferFormat format);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern ImageFormat.Types.Format mp__GpuBufferFormatForImageFormat__ui(ImageFormat.Types.Format format);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f824754e827bdc1282d0352454e46dd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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)]
|
||||
public static extern MpReturnCode mp__GlTextureInfoForGpuBufferFormat__ui_i_ui(
|
||||
GpuBufferFormat format, int plane, GlVersion glVersion, out GlTextureInfo glTextureInfo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a463b93a1e2b3efd915a3d5ae85687a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,30 @@
|
||||
// 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 int mp_GpuBuffer__width(IntPtr gpuBuffer);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern int mp_GpuBuffer__height(IntPtr gpuBuffer);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern GpuBufferFormat mp_GpuBuffer__format(IntPtr gpuBuffer);
|
||||
|
||||
#region StatusOr
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public static extern bool mp_StatusOrGpuBuffer__ok(IntPtr statusOrGpuBuffer);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ed78dc9779f9f974a01a9e5ce6e2b78
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,50 @@
|
||||
// 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
|
||||
{
|
||||
#if UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX || UNITY_ANDROID
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GpuBuffer__PSgtb(IntPtr glTextureBuffer, out IntPtr gpuBuffer);
|
||||
#endif
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern void mp_GpuBuffer__delete(IntPtr gpuBuffer);
|
||||
|
||||
#region StatusOr
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern void mp_StatusOrGpuBuffer__delete(IntPtr statusOrGpuBuffer);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_StatusOrGpuBuffer__status(IntPtr statusOrGpuBuffer, out IntPtr status);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_StatusOrGpuBuffer__value(IntPtr statusOrGpuBuffer, out IntPtr gpuBuffer);
|
||||
#endregion
|
||||
|
||||
#region Packet
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp__MakeGpuBufferPacket__Rgb(IntPtr gpuBuffer, out IntPtr packet);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp__MakeGpuBufferPacket_At__Rgb_Rts(IntPtr gpuBuffer, IntPtr timestamp, out IntPtr packet);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_Packet__ConsumeGpuBuffer(IntPtr packet, out IntPtr statusOrGpuBuffer);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_Packet__GetGpuBuffer(IntPtr packet, out IntPtr gpuBuffer);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_Packet__ValidateAsGpuBuffer(IntPtr packet, out IntPtr status);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fccfad8d2e49e5e6db0b9c0ee0fac50f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,22 @@
|
||||
// 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 IntPtr mp_SharedGpuResources__get(IntPtr gpuResources);
|
||||
|
||||
[Pure, DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
[return: MarshalAs(UnmanagedType.I1)]
|
||||
public static extern bool mp_StatusOrGpuResources__ok(IntPtr statusOrGpuResources);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfa309ee6a68a6599898f97bb6266a3c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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.Runtime.InteropServices;
|
||||
|
||||
namespace Mediapipe
|
||||
{
|
||||
internal static partial class UnsafeNativeMethods
|
||||
{
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern void mp_SharedGpuResources__delete(IntPtr gpuResources);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern void mp_SharedGpuResources__reset(IntPtr gpuResources);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GpuResources_Create(out IntPtr statusOrGpuResources);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_GpuResources_Create__Pv(IntPtr externalContext, out IntPtr statusOrGpuResources);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern void mp_StatusOrGpuResources__delete(IntPtr statusOrGpuResources);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_StatusOrGpuResources__status(IntPtr statusOrGpuResources, out IntPtr status);
|
||||
|
||||
[DllImport(MediaPipeLibrary, ExactSpelling = true)]
|
||||
public static extern MpReturnCode mp_StatusOrGpuResources__value(IntPtr statusOrGpuResources, out IntPtr gpuResources);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03fee8ca1b3101d6b9e0a862b958fc6d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user