Back to development
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst.Net / Global.cs
1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
3
4 namespace Gst.Net {
5
6         using System;
7         using System.Collections;
8         using System.Collections.Generic;
9         using System.Runtime.InteropServices;
10
11 #region Autogenerated code
12         public partial class Global {
13
14                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
15                 static extern IntPtr gst_buffer_add_net_address_meta(IntPtr buffer, IntPtr addr);
16
17                 public static Gst.Net.NetAddressMeta BufferAddNetAddressMeta(Gst.Buffer buffer, GLib.SocketAddress addr) {
18                         IntPtr raw_ret = gst_buffer_add_net_address_meta(buffer == null ? IntPtr.Zero : buffer.Handle, addr == null ? IntPtr.Zero : addr.Handle);
19                         Gst.Net.NetAddressMeta ret = Gst.Net.NetAddressMeta.New (raw_ret);
20                         return ret;
21                 }
22
23                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
24                 static extern IntPtr gst_buffer_add_net_control_message_meta(IntPtr buffer, IntPtr message);
25
26                 public static Gst.Net.NetControlMessageMeta BufferAddNetControlMessageMeta(Gst.Buffer buffer, GLib.SocketControlMessage message) {
27                         IntPtr raw_ret = gst_buffer_add_net_control_message_meta(buffer == null ? IntPtr.Zero : buffer.Handle, message == null ? IntPtr.Zero : message.Handle);
28                         Gst.Net.NetControlMessageMeta ret = Gst.Net.NetControlMessageMeta.New (raw_ret);
29                         return ret;
30                 }
31
32                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
33                 static extern IntPtr gst_buffer_get_net_address_meta(IntPtr buffer);
34
35                 public static Gst.Net.NetAddressMeta BufferGetNetAddressMeta(Gst.Buffer buffer) {
36                         IntPtr raw_ret = gst_buffer_get_net_address_meta(buffer == null ? IntPtr.Zero : buffer.Handle);
37                         Gst.Net.NetAddressMeta ret = Gst.Net.NetAddressMeta.New (raw_ret);
38                         return ret;
39                 }
40
41                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
42                 static extern IntPtr gst_net_address_meta_api_get_type();
43
44                 public static GLib.GType NetAddressMetaApiGetType() {
45                         IntPtr raw_ret = gst_net_address_meta_api_get_type();
46                         GLib.GType ret = new GLib.GType(raw_ret);
47                         return ret;
48                 }
49
50                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
51                 static extern IntPtr gst_net_address_meta_get_info();
52
53                 public static Gst.MetaInfo NetAddressMetaGetInfo() {
54                         IntPtr raw_ret = gst_net_address_meta_get_info();
55                         Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
56                         return ret;
57                 }
58
59                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
60                 static extern IntPtr gst_net_control_message_meta_api_get_type();
61
62                 public static GLib.GType NetControlMessageMetaApiGetType() {
63                         IntPtr raw_ret = gst_net_control_message_meta_api_get_type();
64                         GLib.GType ret = new GLib.GType(raw_ret);
65                         return ret;
66                 }
67
68                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
69                 static extern IntPtr gst_net_control_message_meta_get_info();
70
71                 public static Gst.MetaInfo NetControlMessageMetaGetInfo() {
72                         IntPtr raw_ret = gst_net_control_message_meta_get_info();
73                         Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
74                         return ret;
75                 }
76
77                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
78                 static extern unsafe IntPtr gst_net_time_packet_receive(IntPtr socket, out IntPtr src_address, out IntPtr error);
79
80                 public static unsafe Gst.Net.NetTimePacket NetTimePacketReceive(GLib.Socket socket, out GLib.SocketAddress src_address) {
81                         IntPtr native_src_address;
82                         IntPtr error = IntPtr.Zero;
83                         IntPtr raw_ret = gst_net_time_packet_receive(socket == null ? IntPtr.Zero : socket.Handle, out native_src_address, out error);
84                         Gst.Net.NetTimePacket ret = Gst.Net.NetTimePacket.New (raw_ret);
85                         src_address = GLib.Object.GetObject(native_src_address, true) as GLib.SocketAddress;
86                         if (error != IntPtr.Zero) throw new GLib.GException (error);
87                         return ret;
88                 }
89
90                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
91                 static extern bool gst_net_utils_set_socket_tos(IntPtr socket, int qos_dscp);
92
93                 public static bool NetUtilsSetSocketTos(GLib.Socket socket, int qos_dscp) {
94                         bool raw_ret = gst_net_utils_set_socket_tos(socket == null ? IntPtr.Zero : socket.Handle, qos_dscp);
95                         bool ret = raw_ret;
96                         return ret;
97                 }
98
99                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
100                 static extern void gst_ptp_deinit();
101
102                 public static void PtpDeinit() {
103                         gst_ptp_deinit();
104                 }
105
106                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
107                 static extern bool gst_ptp_init(ulong clock_id, IntPtr[] interfaces);
108
109                 public static bool PtpInit(ulong clock_id, string[] interfaces) {
110                         int cnt_interfaces = interfaces == null ? 0 : interfaces.Length;
111                         IntPtr[] native_interfaces = new IntPtr [cnt_interfaces + 1];
112                         for (int i = 0; i < cnt_interfaces; i++)
113                                 native_interfaces [i] = GLib.Marshaller.StringToPtrGStrdup (interfaces[i]);
114                         native_interfaces [cnt_interfaces] = IntPtr.Zero;
115                         bool raw_ret = gst_ptp_init(clock_id, native_interfaces);
116                         bool ret = raw_ret;
117                         for (int i = 0; i < native_interfaces.Length - 1; i++) {
118                                 interfaces [i] = GLib.Marshaller.Utf8PtrToString (native_interfaces[i]);
119                                 GLib.Marshaller.Free (native_interfaces[i]);
120                         }
121                         return ret;
122                 }
123
124                 public static bool PtpInit(ulong clock_id) {
125                         return PtpInit (clock_id, null);
126                 }
127
128                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
129                 static extern bool gst_ptp_is_initialized();
130
131                 public static bool PtpIsInitialized() {
132                         bool raw_ret = gst_ptp_is_initialized();
133                         bool ret = raw_ret;
134                         return ret;
135                 }
136
137                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
138                 static extern bool gst_ptp_is_supported();
139
140                 public static bool PtpIsSupported() {
141                         bool raw_ret = gst_ptp_is_supported();
142                         bool ret = raw_ret;
143                         return ret;
144                 }
145
146                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
147                 static extern UIntPtr gst_ptp_statistics_callback_add(Gst.NetSharp.PtpStatisticsCallbackNative cb, IntPtr user_data, GLib.DestroyNotify destroy_data);
148
149                 public static ulong PtpStatisticsCallbackAdd(Gst.Net.PtpStatisticsCallback cb) {
150                         Gst.NetSharp.PtpStatisticsCallbackWrapper cb_wrapper = new Gst.NetSharp.PtpStatisticsCallbackWrapper (cb);
151                         IntPtr user_data;
152                         GLib.DestroyNotify destroy_data;
153                         if (cb == null) {
154                                 user_data = IntPtr.Zero;
155                                 destroy_data = null;
156                         } else {
157                                 user_data = (IntPtr) GCHandle.Alloc (cb_wrapper);
158                                 destroy_data = GLib.DestroyHelper.NotifyHandler;
159                         }
160                         UIntPtr raw_ret = gst_ptp_statistics_callback_add(cb_wrapper.NativeDelegate, user_data, destroy_data);
161                         ulong ret = (ulong) raw_ret;
162                         return ret;
163                 }
164
165                 [DllImport("gstnet-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
166                 static extern void gst_ptp_statistics_callback_remove(UIntPtr id);
167
168                 public static void PtpStatisticsCallbackRemove(ulong id) {
169                         gst_ptp_statistics_callback_remove(new UIntPtr (id));
170                 }
171
172 #endregion
173         }
174 }