Skip to content

Commit

Permalink
fix(plugin): fail to initialize GlSyncPoint (#515)
Browse files Browse the repository at this point in the history
* fix: failed to initialize GlSyncPoint

* call a base constructor explicitly
  • Loading branch information
homuler committed Apr 6, 2022
1 parent e1a908d commit 11188cb
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public ImageFrame(ImageFormat.Format format, int width, int height, uint alignme
this.ptr = ptr;
}

public ImageFrame(ImageFormat.Format format, int width, int height, int widthStep, NativeArray<byte> pixelData)
public ImageFrame(ImageFormat.Format format, int width, int height, int widthStep, NativeArray<byte> pixelData) : base()
{
unsafe
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public GpuBufferPacket(GpuBuffer gpuBuffer) : base()
this.ptr = ptr;
}

public GpuBufferPacket(GpuBuffer gpuBuffer, Timestamp timestamp)
public GpuBufferPacket(GpuBuffer gpuBuffer, Timestamp timestamp) : base()
{
UnsafeNativeMethods.mp__MakeGpuBufferPacket_At__Rgb_Rts(gpuBuffer.mpPtr, timestamp.mpPtr, out var ptr).Assert();
GC.KeepAlive(timestamp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// https://opensource.org/licenses/MIT.

using System;
using System.Runtime.InteropServices;

namespace Mediapipe
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class GlSyncPoint : MpResourceHandle
{
private SharedPtrHandle _sharedPtrHandle;

public GlSyncPoint(IntPtr ptr) : base(ptr)
public GlSyncPoint(IntPtr ptr) : base()
{
_sharedPtrHandle = new SharedPtr(ptr);
this.ptr = _sharedPtrHandle.Get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public GlTextureBuffer(IntPtr ptr, bool isOwner = true) : base(isOwner)
/// Make sure that this function doesn't throw exceptions and won't be GCed.
/// </param>
public GlTextureBuffer(uint target, uint name, int width, int height,
GpuBufferFormat format, DeletionCallback callback, GlContext glContext)
GpuBufferFormat format, DeletionCallback callback, GlContext glContext) : base()
{
var sharedContextPtr = glContext == null ? IntPtr.Zero : glContext.sharedPtr;
UnsafeNativeMethods.mp_SharedGlTextureBuffer__ui_ui_i_i_ui_PF_PSgc(
Expand Down

0 comments on commit 11188cb

Please sign in to comment.