public bool Blend(Gst.Video.VideoFrame video_buf) { IntPtr native_video_buf = GLib.Marshaller.StructureToPtrAlloc(video_buf); bool raw_ret = gst_video_overlay_composition_blend(Handle, native_video_buf); bool ret = raw_ret; Marshal.FreeHGlobal(native_video_buf); return(ret); }
void InvokeNative(Gst.PbUtils.AudioVisualizer scope, Gst.Video.VideoFrame s, Gst.Video.VideoFrame d) { IntPtr native_s = GLib.Marshaller.StructureToPtrAlloc(s); IntPtr native_d = GLib.Marshaller.StructureToPtrAlloc(d); native_cb(scope == null ? IntPtr.Zero : scope.Handle, native_s, native_d); Marshal.FreeHGlobal(native_s); Marshal.FreeHGlobal(native_d); }
public void Frame(Gst.Video.VideoFrame src, Gst.Video.VideoFrame dest) { IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc(src); IntPtr native_dest = GLib.Marshaller.StructureToPtrAlloc(dest); gst_video_converter_frame(Handle, native_src, native_dest); Marshal.FreeHGlobal(native_src); Marshal.FreeHGlobal(native_dest); }
public bool CopyPlane(Gst.Video.VideoFrame src, uint plane) { IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal(System.Runtime.InteropServices.Marshal.SizeOf(this)); System.Runtime.InteropServices.Marshal.StructureToPtr(this, this_as_native, false); IntPtr native_src = GLib.Marshaller.StructureToPtrAlloc(src); bool raw_ret = gst_video_frame_copy_plane(this_as_native, native_src, plane); bool ret = raw_ret; ReadNative(this_as_native, ref this); System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native); Marshal.FreeHGlobal(native_src); return(ret); }
public bool Blend(Gst.Video.VideoFrame video_buf) { IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal(System.Runtime.InteropServices.Marshal.SizeOf(this)); System.Runtime.InteropServices.Marshal.StructureToPtr(this, this_as_native, false); IntPtr native_video_buf = GLib.Marshaller.StructureToPtrAlloc(video_buf); bool raw_ret = gst_video_overlay_composition_blend(this_as_native, native_video_buf); bool ret = raw_ret; ReadNative(this_as_native, ref this); System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native); Marshal.FreeHGlobal(native_video_buf); return(ret); }
private void InternalCleanFrame(Gst.Video.VideoAggregator videoaggregator, Gst.Video.VideoFrame prepared_frame) { CleanFrameNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("clean_frame")); unmanaged = (CleanFrameNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CleanFrameNativeDelegate)); } if (unmanaged == null) { return; } IntPtr native_prepared_frame = GLib.Marshaller.StructureToPtrAlloc(prepared_frame); unmanaged(this.Handle, videoaggregator == null ? IntPtr.Zero : videoaggregator.Handle, native_prepared_frame); Marshal.FreeHGlobal(native_prepared_frame); }
private bool InternalRender(Gst.Buffer audio, Gst.Video.VideoFrame video) { RenderNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("render")); unmanaged = (RenderNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RenderNativeDelegate)); } if (unmanaged == null) { return(false); } IntPtr native_video = GLib.Marshaller.StructureToPtrAlloc(video); bool __result = unmanaged(this.Handle, audio == null ? IntPtr.Zero : audio.Handle, native_video); Marshal.FreeHGlobal(native_video); return(__result); }
private Gst.FlowReturn InternalTransformFrameIp(Gst.Video.VideoFrame frame) { TransformFrameIpNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("transform_frame_ip")); unmanaged = (TransformFrameIpNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformFrameIpNativeDelegate)); } if (unmanaged == null) { return((Gst.FlowReturn) 0); } IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc(frame); int __result = unmanaged(this.Handle, native_frame); Marshal.FreeHGlobal(native_frame); return((Gst.FlowReturn)__result); }
static void ReadNative(IntPtr native, ref Gst.Video.VideoFrame target) { target = New(native); }
protected virtual bool OnRender(Gst.Buffer audio, Gst.Video.VideoFrame video) { return(InternalRender(audio, video)); }
protected virtual void OnCleanFrame(Gst.Video.VideoAggregator videoaggregator, Gst.Video.VideoFrame prepared_frame) { InternalCleanFrame(videoaggregator, prepared_frame); }
private bool InternalPrepareFrame(Gst.Video.VideoAggregator videoaggregator, Gst.Buffer buffer, Gst.Video.VideoFrame prepared_frame) { PrepareFrameNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("prepare_frame")); unmanaged = (PrepareFrameNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareFrameNativeDelegate)); } if (unmanaged == null) { return(false); } IntPtr native_prepared_frame = GLib.Marshaller.StructureToPtrAlloc(prepared_frame); bool __result = unmanaged(this.Handle, videoaggregator == null ? IntPtr.Zero : videoaggregator.Handle, buffer == null ? IntPtr.Zero : buffer.Handle, native_prepared_frame); Marshal.FreeHGlobal(native_prepared_frame); return(__result); }
protected virtual bool OnPrepareFrame(Gst.Video.VideoAggregator videoaggregator, Gst.Buffer buffer, Gst.Video.VideoFrame prepared_frame) { return(InternalPrepareFrame(videoaggregator, buffer, prepared_frame)); }
protected virtual Gst.FlowReturn OnTransformFrameIp(Gst.Video.VideoFrame frame) { return(InternalTransformFrameIp(frame)); }
protected virtual Gst.FlowReturn OnTransformFrame(Gst.Video.VideoFrame inframe, Gst.Video.VideoFrame outframe) { return(InternalTransformFrame(inframe, outframe)); }