public static bool RtpBufferMap(Gst.Buffer buffer, Gst.MapFlags flags, out Gst.Rtp.RTPBuffer rtp) { IntPtr native_rtp = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gst.Rtp.RTPBuffer))); bool raw_ret = gst_rtp_buffer_map(buffer == null ? IntPtr.Zero : buffer.Handle, (int)flags, native_rtp); bool ret = raw_ret; rtp = Gst.Rtp.RTPBuffer.New(native_rtp); Marshal.FreeHGlobal(native_rtp); return(ret); }
private Gst.Buffer InternalProcessRtpPacket(Gst.Rtp.RTPBuffer rtp_buffer) { ProcessRtpPacketNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("process_rtp_packet")); unmanaged = (ProcessRtpPacketNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProcessRtpPacketNativeDelegate)); } if (unmanaged == null) { return(null); } IntPtr native_rtp_buffer = GLib.Marshaller.StructureToPtrAlloc(rtp_buffer); IntPtr __result = unmanaged(this.Handle, native_rtp_buffer); Marshal.FreeHGlobal(native_rtp_buffer); return(__result == IntPtr.Zero ? null : (Gst.Buffer)GLib.Opaque.GetOpaque(__result, typeof(Gst.Buffer), true)); }
static void ReadNative(IntPtr native, ref Gst.Rtp.RTPBuffer target) { target = New(native); }
protected virtual Gst.Buffer OnProcessRtpPacket(Gst.Rtp.RTPBuffer rtp_buffer) { return(InternalProcessRtpPacket(rtp_buffer)); }