public Gst.FlowReturn AcquireBuffer(out Gst.Buffer buffer, Gst.BufferPoolAcquireParams parms) { IntPtr native_buffer; IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc(parms); int raw_ret = gst_buffer_pool_acquire_buffer(Handle, out native_buffer, native_parms); Gst.FlowReturn ret = (Gst.FlowReturn)raw_ret; buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer)GLib.Opaque.GetOpaque(native_buffer, typeof(Gst.Buffer), true); Marshal.FreeHGlobal(native_parms); return(ret); }
private Gst.FlowReturn InternalAllocBuffer(Gst.Buffer buffer, Gst.BufferPoolAcquireParams parms) { AllocBufferNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("alloc_buffer")); unmanaged = (AllocBufferNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AllocBufferNativeDelegate)); } if (unmanaged == null) { return((Gst.FlowReturn) 0); } IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc(parms); int __result = unmanaged(this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle, native_parms); Marshal.FreeHGlobal(native_parms); return((Gst.FlowReturn)__result); }
private Gst.FlowReturn InternalAcquireBuffer(out Gst.Buffer buffer, Gst.BufferPoolAcquireParams parms) { AcquireBufferNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("acquire_buffer")); unmanaged = (AcquireBufferNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AcquireBufferNativeDelegate)); } if (unmanaged == null) { throw new InvalidOperationException("No base method to invoke"); } IntPtr native_buffer; IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc(parms); int __result = unmanaged(this.Handle, out native_buffer, native_parms); buffer = native_buffer == IntPtr.Zero ? null : (Gst.Buffer)GLib.Opaque.GetOpaque(native_buffer, typeof(Gst.Buffer), true); Marshal.FreeHGlobal(native_parms); return((Gst.FlowReturn)__result); }
protected virtual Gst.FlowReturn OnAllocBuffer(Gst.Buffer buffer, Gst.BufferPoolAcquireParams parms) { return(InternalAllocBuffer(buffer, parms)); }