1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Runtime.InteropServices;
9 #region Autogenerated code
10 public partial class Debug {
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);
15 public static void AddLogFunction(Gst.LogFunction func) {
16 GstSharp.LogFunctionWrapper func_wrapper = new GstSharp.LogFunctionWrapper (func);
18 GLib.DestroyNotify notify;
20 user_data = IntPtr.Zero;
23 user_data = (IntPtr) GCHandle.Alloc (func_wrapper);
24 notify = GLib.DestroyHelper.NotifyHandler;
26 gst_debug_add_log_function(func_wrapper.NativeDelegate, user_data, notify);
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);
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);
36 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
37 static extern IntPtr gst_debug_bin_to_dot_data(IntPtr bin, int details);
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);
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);
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);
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);
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);
63 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
64 static extern IntPtr gst_debug_construct_term_color(uint colorinfo);
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);
72 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
73 static extern int gst_debug_construct_win_color(uint colorinfo);
75 public static int ConstructWinColor(uint colorinfo) {
76 int raw_ret = gst_debug_construct_win_color(colorinfo);
81 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
82 static extern IntPtr gst_debug_get_all_categories();
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));
90 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
91 static extern int gst_debug_get_color_mode();
93 public static Gst.DebugColorMode GetColorMode() {
94 int raw_ret = gst_debug_get_color_mode();
95 Gst.DebugColorMode ret = (Gst.DebugColorMode) raw_ret;
99 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
100 static extern int gst_debug_get_default_threshold();
102 public static Gst.DebugLevel GetDefaultThreshold() {
103 int raw_ret = gst_debug_get_default_threshold();
104 Gst.DebugLevel ret = (Gst.DebugLevel) raw_ret;
108 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
109 static extern IntPtr gst_debug_get_stack_trace(int flags);
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);
117 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
118 static extern bool gst_debug_is_active();
120 public static bool IsActive() {
121 bool raw_ret = gst_debug_is_active();
126 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
127 static extern bool gst_debug_is_colored();
129 public static bool IsColored() {
130 bool raw_ret = gst_debug_is_colored();
135 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
136 static extern IntPtr gst_debug_level_get_name(int level);
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);
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);
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);
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);
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);
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);
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);
180 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
181 static extern void gst_debug_print_stack_trace();
183 public static void PrintStackTrace() {
184 gst_debug_print_stack_trace();
187 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
188 static extern uint gst_debug_remove_log_function(GstSharp.LogFunctionNative func);
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);
197 public static uint RemoveLogFunction() {
198 return RemoveLogFunction (null);
201 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
202 static extern uint gst_debug_remove_log_function_by_data(IntPtr data);
204 public static uint RemoveLogFunctionByData(IntPtr data) {
205 uint raw_ret = gst_debug_remove_log_function_by_data(data);
210 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
211 static extern void gst_debug_remove_ring_buffer_logger();
213 public static void RemoveRingBufferLogger() {
214 gst_debug_remove_ring_buffer_logger();
217 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
218 static extern IntPtr gst_debug_ring_buffer_logger_get_logs();
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);
226 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
227 static extern void gst_debug_set_active(bool active);
229 public static void SetActive(bool active) {
230 gst_debug_set_active(active);
233 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
234 static extern void gst_debug_set_color_mode(int mode);
236 public static void SetColorMode(Gst.DebugColorMode mode) {
237 gst_debug_set_color_mode((int) mode);
240 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
241 static extern void gst_debug_set_color_mode_from_string(IntPtr mode);
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);
249 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
250 static extern void gst_debug_set_colored(bool colored);
252 public static void SetColored(bool colored) {
253 gst_debug_set_colored(colored);
256 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
257 static extern void gst_debug_set_default_threshold(int level);
259 public static void SetDefaultThreshold(Gst.DebugLevel level) {
260 gst_debug_set_default_threshold((int) level);
263 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
264 static extern void gst_debug_set_threshold_for_name(IntPtr name, int level);
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);
272 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
273 static extern void gst_debug_set_threshold_from_string(IntPtr list, bool reset);
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);
281 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
282 static extern void gst_debug_unset_threshold_for_name(IntPtr name);
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);