public Gst.Sdp.SDPAttribute GetAttribute(uint idx) { IntPtr raw_ret = gst_sdp_message_get_attribute(Handle, idx); Gst.Sdp.SDPAttribute ret = Gst.Sdp.SDPAttribute.New(raw_ret); return(ret); }
public Gst.Sdp.SDPResult ReplaceAttribute(uint idx, Gst.Sdp.SDPAttribute attr) { IntPtr native_attr = GLib.Marshaller.StructureToPtrAlloc (attr); int raw_ret = gst_sdp_message_replace_attribute(Handle, idx, native_attr); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; Marshal.FreeHGlobal (native_attr); return ret; }
public Gst.Sdp.SDPAttribute GetAttribute(uint idx) { 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 raw_ret = gst_sdp_media_get_attribute(this_as_native, idx); Gst.Sdp.SDPAttribute ret = Gst.Sdp.SDPAttribute.New(raw_ret); ReadNative(this_as_native, ref this); System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native); return(ret); }
public Gst.Sdp.SDPResult ReplaceAttribute(uint idx, Gst.Sdp.SDPAttribute attr) { 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_attr = GLib.Marshaller.StructureToPtrAlloc(attr); int raw_ret = gst_sdp_media_replace_attribute(this_as_native, idx, native_attr); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult)raw_ret; ReadNative(this_as_native, ref this); System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native); Marshal.FreeHGlobal(native_attr); return(ret); }
static void ReadNative(IntPtr native, ref Gst.Sdp.SDPAttribute target) { target = New(native); }