Back to development
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst / Debug.cs
1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
3
4 namespace Gst {
5
6         using System;
7         using System.Runtime.InteropServices;
8
9 #region Autogenerated code
10         public partial class Debug {
11
12                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
13                 static extern void gst_debug_add_log_function(GstSharp.LogFunctionNative func, IntPtr user_data, GLib.DestroyNotify notify);
14
15                 public static void AddLogFunction(Gst.LogFunction func) {
16                         GstSharp.LogFunctionWrapper func_wrapper = new GstSharp.LogFunctionWrapper (func);
17                         IntPtr user_data;
18                         GLib.DestroyNotify notify;
19                         if (func == null) {
20                                 user_data = IntPtr.Zero;
21                                 notify = null;
22                         } else {
23                                 user_data = (IntPtr) GCHandle.Alloc (func_wrapper);
24                                 notify = GLib.DestroyHelper.NotifyHandler;
25                         }
26                         gst_debug_add_log_function(func_wrapper.NativeDelegate, user_data, notify);
27                 }
28
29                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
30                 static extern void gst_debug_add_ring_buffer_logger(uint max_size_per_thread, uint thread_timeout);
31
32                 public static void AddRingBufferLogger(uint max_size_per_thread, uint thread_timeout) {
33                         gst_debug_add_ring_buffer_logger(max_size_per_thread, thread_timeout);
34                 }
35
36                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
37                 static extern IntPtr gst_debug_bin_to_dot_data(IntPtr bin, int details);
38
39                 public static string BinToDotData(Gst.Bin bin, Gst.DebugGraphDetails details) {
40                         IntPtr raw_ret = gst_debug_bin_to_dot_data(bin == null ? IntPtr.Zero : bin.Handle, (int) details);
41                         string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
42                         return ret;
43                 }
44
45                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
46                 static extern void gst_debug_bin_to_dot_file(IntPtr bin, int details, IntPtr file_name);
47
48                 public static void BinToDotFile(Gst.Bin bin, Gst.DebugGraphDetails details, string file_name) {
49                         IntPtr native_file_name = GLib.Marshaller.StringToFilenamePtr (file_name);
50                         gst_debug_bin_to_dot_file(bin == null ? IntPtr.Zero : bin.Handle, (int) details, native_file_name);
51                         GLib.Marshaller.Free (native_file_name);
52                 }
53
54                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
55                 static extern void gst_debug_bin_to_dot_file_with_ts(IntPtr bin, int details, IntPtr file_name);
56
57                 public static void BinToDotFileWithTs(Gst.Bin bin, Gst.DebugGraphDetails details, string file_name) {
58                         IntPtr native_file_name = GLib.Marshaller.StringToFilenamePtr (file_name);
59                         gst_debug_bin_to_dot_file_with_ts(bin == null ? IntPtr.Zero : bin.Handle, (int) details, native_file_name);
60                         GLib.Marshaller.Free (native_file_name);
61                 }
62
63                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
64                 static extern IntPtr gst_debug_construct_term_color(uint colorinfo);
65
66                 public static string ConstructTermColor(uint colorinfo) {
67                         IntPtr raw_ret = gst_debug_construct_term_color(colorinfo);
68                         string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
69                         return ret;
70                 }
71
72                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
73                 static extern int gst_debug_construct_win_color(uint colorinfo);
74
75                 public static int ConstructWinColor(uint colorinfo) {
76                         int raw_ret = gst_debug_construct_win_color(colorinfo);
77                         int ret = raw_ret;
78                         return ret;
79                 }
80
81                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
82                 static extern IntPtr gst_debug_get_all_categories();
83
84                 public static GLib.SList[] GetAllCategories() {
85                         IntPtr raw_ret = gst_debug_get_all_categories();
86                         GLib.SList[] ret = (GLib.SList[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.SList), false, true, typeof(GLib.SList));
87                         return ret;
88                 }
89
90                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
91                 static extern int gst_debug_get_color_mode();
92
93                 public static Gst.DebugColorMode GetColorMode() {
94                         int raw_ret = gst_debug_get_color_mode();
95                         Gst.DebugColorMode ret = (Gst.DebugColorMode) raw_ret;
96                         return ret;
97                 }
98
99                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
100                 static extern int gst_debug_get_default_threshold();
101
102                 public static Gst.DebugLevel GetDefaultThreshold() {
103                         int raw_ret = gst_debug_get_default_threshold();
104                         Gst.DebugLevel ret = (Gst.DebugLevel) raw_ret;
105                         return ret;
106                 }
107
108                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
109                 static extern IntPtr gst_debug_get_stack_trace(int flags);
110
111                 public static string GetStackTrace(Gst.StackTraceFlags flags) {
112                         IntPtr raw_ret = gst_debug_get_stack_trace((int) flags);
113                         string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
114                         return ret;
115                 }
116
117                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
118                 static extern bool gst_debug_is_active();
119
120                 public static bool IsActive() {
121                         bool raw_ret = gst_debug_is_active();
122                         bool ret = raw_ret;
123                         return ret;
124                 }
125
126                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
127                 static extern bool gst_debug_is_colored();
128
129                 public static bool IsColored() {
130                         bool raw_ret = gst_debug_is_colored();
131                         bool ret = raw_ret;
132                         return ret;
133                 }
134
135                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
136                 static extern IntPtr gst_debug_level_get_name(int level);
137
138                 public static string LevelGetName(Gst.DebugLevel level) {
139                         IntPtr raw_ret = gst_debug_level_get_name((int) level);
140                         string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
141                         return ret;
142                 }
143
144                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
145                 static extern void gst_debug_log_default(IntPtr category, int level, IntPtr file, IntPtr function, int line, IntPtr _object, IntPtr message, IntPtr user_data);
146
147                 public static void LogDefault(Gst.DebugCategory category, Gst.DebugLevel level, string file, string function, int line, GLib.Object _object, Gst.DebugMessage message, IntPtr user_data) {
148                         IntPtr native_category = GLib.Marshaller.StructureToPtrAlloc (category);
149                         IntPtr native_file = GLib.Marshaller.StringToPtrGStrdup (file);
150                         IntPtr native_function = GLib.Marshaller.StringToPtrGStrdup (function);
151                         gst_debug_log_default(native_category, (int) level, native_file, native_function, line, _object == null ? IntPtr.Zero : _object.Handle, message == null ? IntPtr.Zero : message.Handle, user_data);
152                         Marshal.FreeHGlobal (native_category);
153                         GLib.Marshaller.Free (native_file);
154                         GLib.Marshaller.Free (native_function);
155                 }
156
157                 public static void LogDefault(Gst.DebugCategory category, Gst.DebugLevel level, string file, string function, int line, Gst.DebugMessage message) {
158                         LogDefault (category, level, file, function, line, null, message, IntPtr.Zero);
159                 }
160
161                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
162                 static extern IntPtr gst_debug_log_get_line(IntPtr category, int level, IntPtr file, IntPtr function, int line, IntPtr _object, IntPtr message);
163
164                 public static string LogGetLine(Gst.DebugCategory category, Gst.DebugLevel level, string file, string function, int line, GLib.Object _object, Gst.DebugMessage message) {
165                         IntPtr native_category = GLib.Marshaller.StructureToPtrAlloc (category);
166                         IntPtr native_file = GLib.Marshaller.StringToPtrGStrdup (file);
167                         IntPtr native_function = GLib.Marshaller.StringToPtrGStrdup (function);
168                         IntPtr raw_ret = gst_debug_log_get_line(native_category, (int) level, native_file, native_function, line, _object == null ? IntPtr.Zero : _object.Handle, message == null ? IntPtr.Zero : message.Handle);
169                         string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
170                         Marshal.FreeHGlobal (native_category);
171                         GLib.Marshaller.Free (native_file);
172                         GLib.Marshaller.Free (native_function);
173                         return ret;
174                 }
175
176                 public static string LogGetLine(Gst.DebugCategory category, Gst.DebugLevel level, string file, string function, int line, Gst.DebugMessage message) {
177                         return LogGetLine (category, level, file, function, line, null, message);
178                 }
179
180                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
181                 static extern void gst_debug_print_stack_trace();
182
183                 public static void PrintStackTrace() {
184                         gst_debug_print_stack_trace();
185                 }
186
187                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
188                 static extern uint gst_debug_remove_log_function(GstSharp.LogFunctionNative func);
189
190                 public static uint RemoveLogFunction(Gst.LogFunction func) {
191                         GstSharp.LogFunctionWrapper func_wrapper = new GstSharp.LogFunctionWrapper (func);
192                         uint raw_ret = gst_debug_remove_log_function(func_wrapper.NativeDelegate);
193                         uint ret = raw_ret;
194                         return ret;
195                 }
196
197                 public static uint RemoveLogFunction() {
198                         return RemoveLogFunction (null);
199                 }
200
201                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
202                 static extern uint gst_debug_remove_log_function_by_data(IntPtr data);
203
204                 public static uint RemoveLogFunctionByData(IntPtr data) {
205                         uint raw_ret = gst_debug_remove_log_function_by_data(data);
206                         uint ret = raw_ret;
207                         return ret;
208                 }
209
210                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
211                 static extern void gst_debug_remove_ring_buffer_logger();
212
213                 public static void RemoveRingBufferLogger() {
214                         gst_debug_remove_ring_buffer_logger();
215                 }
216
217                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
218                 static extern IntPtr gst_debug_ring_buffer_logger_get_logs();
219
220                 public static string[] RingBufferLoggerGetLogs() {
221                         IntPtr raw_ret = gst_debug_ring_buffer_logger_get_logs();
222                         string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true);
223                         return ret;
224                 }
225
226                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
227                 static extern void gst_debug_set_active(bool active);
228
229                 public static void SetActive(bool active) {
230                         gst_debug_set_active(active);
231                 }
232
233                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
234                 static extern void gst_debug_set_color_mode(int mode);
235
236                 public static void SetColorMode(Gst.DebugColorMode mode) {
237                         gst_debug_set_color_mode((int) mode);
238                 }
239
240                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
241                 static extern void gst_debug_set_color_mode_from_string(IntPtr mode);
242
243                 public static void SetColorModeFromString(string mode) {
244                         IntPtr native_mode = GLib.Marshaller.StringToPtrGStrdup (mode);
245                         gst_debug_set_color_mode_from_string(native_mode);
246                         GLib.Marshaller.Free (native_mode);
247                 }
248
249                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
250                 static extern void gst_debug_set_colored(bool colored);
251
252                 public static void SetColored(bool colored) {
253                         gst_debug_set_colored(colored);
254                 }
255
256                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
257                 static extern void gst_debug_set_default_threshold(int level);
258
259                 public static void SetDefaultThreshold(Gst.DebugLevel level) {
260                         gst_debug_set_default_threshold((int) level);
261                 }
262
263                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
264                 static extern void gst_debug_set_threshold_for_name(IntPtr name, int level);
265
266                 public static void SetThresholdForName(string name, Gst.DebugLevel level) {
267                         IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
268                         gst_debug_set_threshold_for_name(native_name, (int) level);
269                         GLib.Marshaller.Free (native_name);
270                 }
271
272                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
273                 static extern void gst_debug_set_threshold_from_string(IntPtr list, bool reset);
274
275                 public static void SetThresholdFromString(string list, bool reset) {
276                         IntPtr native_list = GLib.Marshaller.StringToPtrGStrdup (list);
277                         gst_debug_set_threshold_from_string(native_list, reset);
278                         GLib.Marshaller.Free (native_list);
279                 }
280
281                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
282                 static extern void gst_debug_unset_threshold_for_name(IntPtr name);
283
284                 public static void UnsetThresholdForName(string name) {
285                         IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
286                         gst_debug_unset_threshold_for_name(native_name);
287                         GLib.Marshaller.Free (native_name);
288                 }
289
290 #endregion
291         }
292 }