summaryrefslogtreecommitdiff
path: root/sources/generated/Gst.Rtp/Global.cs
blob: 4bb5465d6cf27797010b5525654dad6fa533b51f (plain)
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gst.Rtp {

	using System;
	using System.Collections;
	using System.Collections.Generic;
	using System.Runtime.InteropServices;

#region Autogenerated code
	public partial class Global {

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtcp_buffer_map(IntPtr buffer, int flags, IntPtr rtcp);

		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;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtcp_buffer_new(uint mtu);

		public static Gst.Buffer RtcpBufferNew(uint mtu) {
			IntPtr raw_ret = gst_rtcp_buffer_new(mtu);
			Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtcp_buffer_new_copy_data(byte[] data, uint n_length);

		public static Gst.Buffer RtcpBufferNewCopyData(byte[] data) {
			IntPtr raw_ret = gst_rtcp_buffer_new_copy_data(data, (uint) (data == null ? 0 : data.Length));
			Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtcp_buffer_new_take_data(byte[] data, uint n_length);

		public static Gst.Buffer RtcpBufferNewTakeData(byte[] data) {
			IntPtr raw_ret = gst_rtcp_buffer_new_take_data(data, (uint) (data == null ? 0 : data.Length));
			Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtcp_buffer_validate(IntPtr buffer);

		public static bool RtcpBufferValidate(Gst.Buffer buffer) {
			bool raw_ret = gst_rtcp_buffer_validate(buffer == null ? IntPtr.Zero : buffer.Handle);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtcp_buffer_validate_data(byte[] data, uint len);

		public static bool RtcpBufferValidateData(byte[] data, uint len) {
			bool raw_ret = gst_rtcp_buffer_validate_data(data, len);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtcp_buffer_validate_data_reduced(byte[] data, uint len);

		public static bool RtcpBufferValidateDataReduced(byte[] data, uint len) {
			bool raw_ret = gst_rtcp_buffer_validate_data_reduced(data, len);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtcp_buffer_validate_reduced(IntPtr buffer);

		public static bool RtcpBufferValidateReduced(Gst.Buffer buffer) {
			bool raw_ret = gst_rtcp_buffer_validate_reduced(buffer == null ? IntPtr.Zero : buffer.Handle);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern ulong gst_rtcp_ntp_to_unix(ulong ntptime);

		public static ulong RtcpNtpToUnix(ulong ntptime) {
			ulong raw_ret = gst_rtcp_ntp_to_unix(ntptime);
			ulong ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtcp_sdes_name_to_type(IntPtr name);

		public static Gst.Rtp.RTCPSDESType RtcpSdesNameToType(string name) {
			IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
			int raw_ret = gst_rtcp_sdes_name_to_type(native_name);
			Gst.Rtp.RTCPSDESType ret = (Gst.Rtp.RTCPSDESType) raw_ret;
			GLib.Marshaller.Free (native_name);
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtcp_sdes_type_to_name(int type);

		public static string RtcpSdesTypeToName(Gst.Rtp.RTCPSDESType type) {
			IntPtr raw_ret = gst_rtcp_sdes_type_to_name((int) type);
			string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern ulong gst_rtcp_unix_to_ntp(ulong unixtime);

		public static ulong RtcpUnixToNtp(ulong unixtime) {
			ulong raw_ret = gst_rtcp_unix_to_ntp(unixtime);
			ulong ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern void gst_rtp_buffer_allocate_data(IntPtr buffer, uint payload_len, byte pad_len, byte csrc_count);

		public static void RtpBufferAllocateData(Gst.Buffer buffer, uint payload_len, byte pad_len, byte csrc_count) {
			gst_rtp_buffer_allocate_data(buffer == null ? IntPtr.Zero : buffer.Handle, payload_len, pad_len, csrc_count);
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern uint gst_rtp_buffer_calc_header_len(byte csrc_count);

		public static uint RtpBufferCalcHeaderLen(byte csrc_count) {
			uint raw_ret = gst_rtp_buffer_calc_header_len(csrc_count);
			uint ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern uint gst_rtp_buffer_calc_packet_len(uint payload_len, byte pad_len, byte csrc_count);

		public static uint RtpBufferCalcPacketLen(uint payload_len, byte pad_len, byte csrc_count) {
			uint raw_ret = gst_rtp_buffer_calc_packet_len(payload_len, pad_len, csrc_count);
			uint ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern uint gst_rtp_buffer_calc_payload_len(uint packet_len, byte pad_len, byte csrc_count);

		public static uint RtpBufferCalcPayloadLen(uint packet_len, byte pad_len, byte csrc_count) {
			uint raw_ret = gst_rtp_buffer_calc_payload_len(packet_len, pad_len, csrc_count);
			uint ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern int gst_rtp_buffer_compare_seqnum(ushort seqnum1, ushort seqnum2);

		public static int RtpBufferCompareSeqnum(ushort seqnum1, ushort seqnum2) {
			int raw_ret = gst_rtp_buffer_compare_seqnum(seqnum1, seqnum2);
			int ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern uint gst_rtp_buffer_default_clock_rate(byte payload_type);

		public static uint RtpBufferDefaultClockRate(byte payload_type) {
			uint raw_ret = gst_rtp_buffer_default_clock_rate(payload_type);
			uint ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern ulong gst_rtp_buffer_ext_timestamp(ulong exttimestamp, uint timestamp);

		public static ulong RtpBufferExtTimestamp(ulong exttimestamp, uint timestamp) {
			ulong raw_ret = gst_rtp_buffer_ext_timestamp(exttimestamp, timestamp);
			ulong ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtp_buffer_map(IntPtr buffer, int flags, IntPtr rtp);

		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;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtp_buffer_new_allocate(uint payload_len, byte pad_len, byte csrc_count);

		public static Gst.Buffer RtpBufferNewAllocate(uint payload_len, byte pad_len, byte csrc_count) {
			IntPtr raw_ret = gst_rtp_buffer_new_allocate(payload_len, pad_len, csrc_count);
			Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtp_buffer_new_allocate_len(uint packet_len, byte pad_len, byte csrc_count);

		public static Gst.Buffer RtpBufferNewAllocateLen(uint packet_len, byte pad_len, byte csrc_count) {
			IntPtr raw_ret = gst_rtp_buffer_new_allocate_len(packet_len, pad_len, csrc_count);
			Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtp_buffer_new_copy_data(byte[] data, UIntPtr n_length);

		public static Gst.Buffer RtpBufferNewCopyData(byte[] data) {
			IntPtr raw_ret = gst_rtp_buffer_new_copy_data(data, new UIntPtr ((ulong) (data == null ? 0 : data.Length)));
			Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtp_buffer_new_take_data(byte[] data, UIntPtr n_length);

		public static Gst.Buffer RtpBufferNewTakeData(byte[] data) {
			IntPtr raw_ret = gst_rtp_buffer_new_take_data(data, new UIntPtr ((ulong) (data == null ? 0 : data.Length)));
			Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtp_hdrext_get_ntp_56(IntPtr data, uint size, ulong ntptime);

		public static bool RtpHdrextGetNtp56(IntPtr data, uint size, ulong ntptime) {
			bool raw_ret = gst_rtp_hdrext_get_ntp_56(data, size, ntptime);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtp_hdrext_get_ntp_64(IntPtr data, uint size, ulong ntptime);

		public static bool RtpHdrextGetNtp64(IntPtr data, uint size, ulong ntptime) {
			bool raw_ret = gst_rtp_hdrext_get_ntp_64(data, size, ntptime);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtp_hdrext_set_ntp_56(IntPtr data, uint size, ulong ntptime);

		public static bool RtpHdrextSetNtp56(IntPtr data, uint size, ulong ntptime) {
			bool raw_ret = gst_rtp_hdrext_set_ntp_56(data, size, ntptime);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern bool gst_rtp_hdrext_set_ntp_64(IntPtr data, uint size, ulong ntptime);

		public static bool RtpHdrextSetNtp64(IntPtr data, uint size, ulong ntptime) {
			bool raw_ret = gst_rtp_hdrext_set_ntp_64(data, size, ntptime);
			bool ret = raw_ret;
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtp_payload_info_for_name(IntPtr media, IntPtr encoding_name);

		public static Gst.Rtp.RTPPayloadInfo RtpPayloadInfoForName(string media, string encoding_name) {
			IntPtr native_media = GLib.Marshaller.StringToPtrGStrdup (media);
			IntPtr native_encoding_name = GLib.Marshaller.StringToPtrGStrdup (encoding_name);
			IntPtr raw_ret = gst_rtp_payload_info_for_name(native_media, native_encoding_name);
			Gst.Rtp.RTPPayloadInfo ret = Gst.Rtp.RTPPayloadInfo.New (raw_ret);
			GLib.Marshaller.Free (native_media);
			GLib.Marshaller.Free (native_encoding_name);
			return ret;
		}

		[DllImport("libgstrtp-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
		static extern IntPtr gst_rtp_payload_info_for_pt(byte payload_type);

		public static Gst.Rtp.RTPPayloadInfo RtpPayloadInfoForPt(byte payload_type) {
			IntPtr raw_ret = gst_rtp_payload_info_for_pt(payload_type);
			Gst.Rtp.RTPPayloadInfo ret = Gst.Rtp.RTPPayloadInfo.New (raw_ret);
			return ret;
		}

#endregion
	}
}