public Gst.Sdp.SDPMedia GetMedia(uint idx) { IntPtr raw_ret = gst_sdp_message_get_media(Handle, idx); Gst.Sdp.SDPMedia ret = Gst.Sdp.SDPMedia.New(raw_ret); return(ret); }
public Gst.Sdp.SDPResult AddMedia(Gst.Sdp.SDPMedia media) { IntPtr native_media = GLib.Marshaller.StructureToPtrAlloc (media); int raw_ret = gst_sdp_message_add_media(Handle, native_media); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret; Marshal.FreeHGlobal (native_media); return ret; }
public Gst.Rtsp.RTSPResult SetupMedia(Gst.Sdp.SDPMedia media) { IntPtr native_media = GLib.Marshaller.StructureToPtrAlloc(media); int raw_ret = gst_rtsp_extension_setup_media(Handle, native_media); Gst.Rtsp.RTSPResult ret = (Gst.Rtsp.RTSPResult)raw_ret; Marshal.FreeHGlobal(native_media); return(ret); }
public static Gst.Sdp.SDPResult SetMediaFromCaps(Gst.Caps caps, Gst.Sdp.SDPMedia media) { IntPtr native_media = GLib.Marshaller.StructureToPtrAlloc(media); int raw_ret = gst_sdp_media_set_media_from_caps(caps == null ? IntPtr.Zero : caps.Handle, native_media); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult)raw_ret; Marshal.FreeHGlobal(native_media); return(ret); }
public static Gst.Sdp.SDPResult New(out Gst.Sdp.SDPMedia media) { IntPtr native_media = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gst.Sdp.SDPMedia))); int raw_ret = gst_sdp_media_new(native_media); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult)raw_ret; media = Gst.Sdp.SDPMedia.New(native_media); Marshal.FreeHGlobal(native_media); return(ret); }
public Gst.Sdp.SDPResult Copy(out Gst.Sdp.SDPMedia copy) { 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_copy = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Gst.Sdp.SDPMedia))); int raw_ret = gst_sdp_media_copy(this_as_native, native_copy); Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult)raw_ret; ReadNative(this_as_native, ref this); System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native); copy = Gst.Sdp.SDPMedia.New(native_copy); Marshal.FreeHGlobal(native_copy); return(ret); }
static void ReadNative(IntPtr native, ref Gst.Sdp.SDPMedia target) { target = New(native); }