1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst.Sdp {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class Global {
[DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_sdp_address_is_multicast(IntPtr nettype, IntPtr addrtype, IntPtr addr);
public static bool SdpAddressIsMulticast(string nettype, string addrtype, string addr) {
IntPtr native_nettype = GLib.Marshaller.StringToPtrGStrdup (nettype);
IntPtr native_addrtype = GLib.Marshaller.StringToPtrGStrdup (addrtype);
IntPtr native_addr = GLib.Marshaller.StringToPtrGStrdup (addr);
bool raw_ret = gst_sdp_address_is_multicast(native_nettype, native_addrtype, native_addr);
bool ret = raw_ret;
GLib.Marshaller.Free (native_nettype);
GLib.Marshaller.Free (native_addrtype);
GLib.Marshaller.Free (native_addr);
return ret;
}
[DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_sdp_make_keymgmt(IntPtr uri, IntPtr base64);
public static string SdpMakeKeymgmt(string uri, string base64) {
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
IntPtr native_base64 = GLib.Marshaller.StringToPtrGStrdup (base64);
IntPtr raw_ret = gst_sdp_make_keymgmt(native_uri, native_base64);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
GLib.Marshaller.Free (native_uri);
GLib.Marshaller.Free (native_base64);
return ret;
}
[DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_sdp_media_new(IntPtr media);
public static Gst.Sdp.SDPResult SdpMediaNew(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;
}
[DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_sdp_media_set_media_from_caps(IntPtr caps, IntPtr media);
public static Gst.Sdp.SDPResult SdpMediaSetMediaFromCaps(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;
}
[DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_sdp_message_as_uri(IntPtr scheme, IntPtr msg);
public static string SdpMessageAsUri(string scheme, Gst.Sdp.SDPMessage msg) {
IntPtr native_scheme = GLib.Marshaller.StringToPtrGStrdup (scheme);
IntPtr raw_ret = gst_sdp_message_as_uri(native_scheme, msg == null ? IntPtr.Zero : msg.Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
GLib.Marshaller.Free (native_scheme);
return ret;
}
[DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_sdp_message_new(out IntPtr msg);
public static Gst.Sdp.SDPResult SdpMessageNew(out Gst.Sdp.SDPMessage msg) {
IntPtr native_msg;
int raw_ret = gst_sdp_message_new(out native_msg);
Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret;
msg = native_msg == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage) GLib.Opaque.GetOpaque (native_msg, typeof (Gst.Sdp.SDPMessage), true);
return ret;
}
[DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_sdp_message_new_from_text(IntPtr text, out IntPtr msg);
public static Gst.Sdp.SDPResult SdpMessageNewFromText(string text, out Gst.Sdp.SDPMessage msg) {
IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup (text);
IntPtr native_msg;
int raw_ret = gst_sdp_message_new_from_text(native_text, out native_msg);
Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret;
GLib.Marshaller.Free (native_text);
msg = native_msg == IntPtr.Zero ? null : (Gst.Sdp.SDPMessage) GLib.Opaque.GetOpaque (native_msg, typeof (Gst.Sdp.SDPMessage), true);
return ret;
}
[DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_sdp_message_parse_buffer(byte[] data, uint size, IntPtr msg);
public static Gst.Sdp.SDPResult SdpMessageParseBuffer(byte[] data, uint size, Gst.Sdp.SDPMessage msg) {
int raw_ret = gst_sdp_message_parse_buffer(data, size, msg == null ? IntPtr.Zero : msg.Handle);
Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret;
return ret;
}
[DllImport("gstsdp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_sdp_message_parse_uri(IntPtr uri, IntPtr msg);
public static Gst.Sdp.SDPResult SdpMessageParseUri(string uri, Gst.Sdp.SDPMessage msg) {
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
int raw_ret = gst_sdp_message_parse_uri(native_uri, msg == null ? IntPtr.Zero : msg.Handle);
Gst.Sdp.SDPResult ret = (Gst.Sdp.SDPResult) raw_ret;
GLib.Marshaller.Free (native_uri);
return ret;
}
#endregion
}
}
|