public static bool RtcpBufferMap(Gst.Buffer buffer, Gst.MapFlags flags, Gst.Rtp.RTCPBuffer rtcp) { IntPtr native_rtcp = GLib.Marshaller.StructureToPtrAlloc(rtcp); bool raw_ret = gst_rtcp_buffer_map(buffer == null ? IntPtr.Zero : buffer.Handle, (int)flags, native_rtcp); bool ret = raw_ret; Marshal.FreeHGlobal(native_rtcp); return(ret); }
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); }
public bool Map(out Gst.MapInfo info, Gst.MapFlags flags) { IntPtr native_info = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gst.MapInfo))); bool raw_ret = gst_memory_map(Handle, native_info, (int)flags); bool ret = raw_ret; info = Gst.MapInfo.New(native_info); Marshal.FreeHGlobal(native_info); return(ret); }
public Gst.Memory MakeMapped(out Gst.MapInfo info, Gst.MapFlags flags) { IntPtr native_info = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gst.MapInfo))); IntPtr raw_ret = gst_memory_make_mapped(Handle, native_info, (int)flags); Gst.Memory ret = raw_ret == IntPtr.Zero ? null : (Gst.Memory)GLib.Opaque.GetOpaque(raw_ret, typeof(Gst.Memory), true); info = Gst.MapInfo.New(native_info); Marshal.FreeHGlobal(native_info); return(ret); }
public bool MapRange(uint idx, int length, out Gst.MapInfo info, Gst.MapFlags flags) { IntPtr native_info = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gst.MapInfo))); bool raw_ret = gst_buffer_map_range(Handle, idx, length, native_info, (int)flags); bool ret = raw_ret; info = Gst.MapInfo.New(native_info); Marshal.FreeHGlobal(native_info); return(ret); }
public bool Map(Gst.Video.VideoInfo info, Gst.Buffer buffer, Gst.MapFlags flags) { 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); bool raw_ret = gst_video_frame_map(this_as_native, info == null ? IntPtr.Zero : info.Handle, buffer == null ? IntPtr.Zero : buffer.Handle, (int)flags); bool ret = raw_ret; ReadNative(this_as_native, ref this); System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native); return(ret); }
public bool Map(uint plane, Gst.MapInfo info, IntPtr data, int stride, Gst.MapFlags flags) { 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_info = GLib.Marshaller.StructureToPtrAlloc(info); bool raw_ret = gst_video_meta_map(this_as_native, plane, native_info, data, stride, (int)flags); bool ret = raw_ret; ReadNative(this_as_native, ref this); System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native); Marshal.FreeHGlobal(native_info); return(ret); }
IntPtr InvokeNative(Gst.Memory mem, ulong maxsize, Gst.MapFlags flags) { IntPtr __result = native_cb(mem == null ? IntPtr.Zero : mem.Handle, new UIntPtr(maxsize), (int)flags); return(__result); }