Exemplo n.º 1
0
        public Gst.Sdp.SDPConnection GetConnection(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_connection(this_as_native, idx);

            Gst.Sdp.SDPConnection ret = Gst.Sdp.SDPConnection.New(raw_ret);
            ReadNative(this_as_native, ref this);
            System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native);
            return(ret);
        }
Exemplo n.º 2
0
        public Gst.Sdp.SDPResult ReplaceConnection(uint idx, Gst.Sdp.SDPConnection conn)
        {
            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_conn = GLib.Marshaller.StructureToPtrAlloc(conn);
            int    raw_ret     = gst_sdp_media_replace_connection(this_as_native, idx, native_conn);

            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_conn);
            return(ret);
        }
 static void ReadNative(IntPtr native, ref Gst.Sdp.SDPConnection target)
 {
     target = New(native);
 }