Back to development
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst / Query.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.Collections;
8         using System.Collections.Generic;
9         using System.Runtime.InteropServices;
10
11 #region Autogenerated code
12         public partial class Query : Gst.MiniObject {
13
14                 public Gst.QueryType Type {
15                         get {
16                                 unsafe {
17                                         int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type"));
18                                         return (Gst.QueryType) (*raw_ptr);
19                                 }
20                         }
21                         set {
22                                 unsafe {
23                                         int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type"));
24                                         *raw_ptr = (int) value;
25                                 }
26                         }
27                 }
28
29                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
30                 static extern IntPtr gst_query_get_type();
31
32                 public static GLib.GType GType { 
33                         get {
34                                 IntPtr raw_ret = gst_query_get_type();
35                                 GLib.GType ret = new GLib.GType(raw_ret);
36                                 return ret;
37                         }
38                 }
39
40                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
41                 static extern void gst_query_add_allocation_meta(IntPtr raw, IntPtr api, IntPtr parms);
42
43                 public void AddAllocationMeta(GLib.GType api, Gst.Structure parms) {
44                         gst_query_add_allocation_meta(Handle, api.Val, parms == null ? IntPtr.Zero : parms.Handle);
45                 }
46
47                 public void AddAllocationMeta(GLib.GType api) {
48                         AddAllocationMeta (api, null);
49                 }
50
51                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
52                 static extern void gst_query_add_allocation_param(IntPtr raw, IntPtr allocator, IntPtr parms);
53
54                 public void AddAllocationParam(Gst.Allocator allocator, Gst.AllocationParams parms) {
55                         IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms);
56                         gst_query_add_allocation_param(Handle, allocator == null ? IntPtr.Zero : allocator.Handle, native_parms);
57                         Marshal.FreeHGlobal (native_parms);
58                 }
59
60                 public void AddAllocationParam() {
61                         AddAllocationParam (null, Gst.AllocationParams.Zero);
62                 }
63
64                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
65                 static extern void gst_query_add_allocation_pool(IntPtr raw, IntPtr pool, uint size, uint min_buffers, uint max_buffers);
66
67                 public void AddAllocationPool(Gst.BufferPool pool, uint size, uint min_buffers, uint max_buffers) {
68                         gst_query_add_allocation_pool(Handle, pool == null ? IntPtr.Zero : pool.Handle, size, min_buffers, max_buffers);
69                 }
70
71                 public void AddAllocationPool(uint size, uint min_buffers, uint max_buffers) {
72                         AddAllocationPool (null, size, min_buffers, max_buffers);
73                 }
74
75                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
76                 static extern bool gst_query_add_buffering_range(IntPtr raw, long start, long stop);
77
78                 public bool AddBufferingRange(long start, long stop) {
79                         bool raw_ret = gst_query_add_buffering_range(Handle, start, stop);
80                         bool ret = raw_ret;
81                         return ret;
82                 }
83
84                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
85                 static extern void gst_query_add_scheduling_mode(IntPtr raw, int mode);
86
87                 public void AddSchedulingMode(Gst.PadMode mode) {
88                         gst_query_add_scheduling_mode(Handle, (int) mode);
89                 }
90
91                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
92                 static extern bool gst_query_find_allocation_meta(IntPtr raw, IntPtr api, out uint index);
93
94                 public bool FindAllocationMeta(GLib.GType api, out uint index) {
95                         bool raw_ret = gst_query_find_allocation_meta(Handle, api.Val, out index);
96                         bool ret = raw_ret;
97                         return ret;
98                 }
99
100                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
101                 static extern uint gst_query_get_n_allocation_metas(IntPtr raw);
102
103                 public uint NAllocationMetas { 
104                         get {
105                                 uint raw_ret = gst_query_get_n_allocation_metas(Handle);
106                                 uint ret = raw_ret;
107                                 return ret;
108                         }
109                 }
110
111                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
112                 static extern uint gst_query_get_n_allocation_params(IntPtr raw);
113
114                 public uint NAllocationParams { 
115                         get {
116                                 uint raw_ret = gst_query_get_n_allocation_params(Handle);
117                                 uint ret = raw_ret;
118                                 return ret;
119                         }
120                 }
121
122                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
123                 static extern uint gst_query_get_n_allocation_pools(IntPtr raw);
124
125                 public uint NAllocationPools { 
126                         get {
127                                 uint raw_ret = gst_query_get_n_allocation_pools(Handle);
128                                 uint ret = raw_ret;
129                                 return ret;
130                         }
131                 }
132
133                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
134                 static extern uint gst_query_get_n_buffering_ranges(IntPtr raw);
135
136                 public uint NBufferingRanges { 
137                         get {
138                                 uint raw_ret = gst_query_get_n_buffering_ranges(Handle);
139                                 uint ret = raw_ret;
140                                 return ret;
141                         }
142                 }
143
144                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
145                 static extern uint gst_query_get_n_scheduling_modes(IntPtr raw);
146
147                 public uint NSchedulingModes { 
148                         get {
149                                 uint raw_ret = gst_query_get_n_scheduling_modes(Handle);
150                                 uint ret = raw_ret;
151                                 return ret;
152                         }
153                 }
154
155                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
156                 static extern IntPtr gst_query_get_structure(IntPtr raw);
157
158                 public Gst.Structure Structure { 
159                         get {
160                                 IntPtr raw_ret = gst_query_get_structure(Handle);
161                                 Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
162                                 return ret;
163                         }
164                 }
165
166                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
167                 static extern bool gst_query_has_scheduling_mode(IntPtr raw, int mode);
168
169                 public bool HasSchedulingMode(Gst.PadMode mode) {
170                         bool raw_ret = gst_query_has_scheduling_mode(Handle, (int) mode);
171                         bool ret = raw_ret;
172                         return ret;
173                 }
174
175                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
176                 static extern bool gst_query_has_scheduling_mode_with_flags(IntPtr raw, int mode, int flags);
177
178                 public bool HasSchedulingModeWithFlags(Gst.PadMode mode, Gst.SchedulingFlags flags) {
179                         bool raw_ret = gst_query_has_scheduling_mode_with_flags(Handle, (int) mode, (int) flags);
180                         bool ret = raw_ret;
181                         return ret;
182                 }
183
184                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
185                 static extern void gst_query_parse_accept_caps(IntPtr raw, out IntPtr caps);
186
187                 public Gst.Caps ParseAcceptCaps() {
188                         Gst.Caps caps;
189                         IntPtr native_caps;
190                         gst_query_parse_accept_caps(Handle, out native_caps);
191                         caps = native_caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (native_caps, typeof (Gst.Caps), false);
192                         return caps;
193                 }
194
195                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
196                 static extern void gst_query_parse_accept_caps_result(IntPtr raw, out bool _result);
197
198                 public bool ParseAcceptCapsResult() {
199                         bool _result;
200                         gst_query_parse_accept_caps_result(Handle, out _result);
201                         return _result;
202                 }
203
204                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
205                 static extern void gst_query_parse_allocation(IntPtr raw, out IntPtr caps, out bool need_pool);
206
207                 public void ParseAllocation(out Gst.Caps caps, out bool need_pool) {
208                         IntPtr native_caps;
209                         gst_query_parse_allocation(Handle, out native_caps, out need_pool);
210                         caps = native_caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (native_caps, typeof (Gst.Caps), false);
211                 }
212
213                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
214                 static extern void gst_query_parse_bitrate(IntPtr raw, out uint nominal_bitrate);
215
216                 public uint ParseBitrate() {
217                         uint nominal_bitrate;
218                         gst_query_parse_bitrate(Handle, out nominal_bitrate);
219                         return nominal_bitrate;
220                 }
221
222                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
223                 static extern void gst_query_parse_buffering_percent(IntPtr raw, out bool busy, out int percent);
224
225                 public void ParseBufferingPercent(out bool busy, out int percent) {
226                         gst_query_parse_buffering_percent(Handle, out busy, out percent);
227                 }
228
229                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
230                 static extern void gst_query_parse_buffering_range(IntPtr raw, out int format, out long start, out long stop, out long estimated_total);
231
232                 public void ParseBufferingRange(out Gst.Format format, out long start, out long stop, out long estimated_total) {
233                         int native_format;
234                         gst_query_parse_buffering_range(Handle, out native_format, out start, out stop, out estimated_total);
235                         format = (Gst.Format) native_format;
236                 }
237
238                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
239                 static extern void gst_query_parse_buffering_stats(IntPtr raw, out int mode, out int avg_in, out int avg_out, out long buffering_left);
240
241                 public void ParseBufferingStats(out Gst.BufferingMode mode, out int avg_in, out int avg_out, out long buffering_left) {
242                         int native_mode;
243                         gst_query_parse_buffering_stats(Handle, out native_mode, out avg_in, out avg_out, out buffering_left);
244                         mode = (Gst.BufferingMode) native_mode;
245                 }
246
247                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
248                 static extern void gst_query_parse_caps(IntPtr raw, out IntPtr filter);
249
250                 public Gst.Caps ParseCaps() {
251                         Gst.Caps filter;
252                         IntPtr native_filter;
253                         gst_query_parse_caps(Handle, out native_filter);
254                         filter = native_filter == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (native_filter, typeof (Gst.Caps), false);
255                         return filter;
256                 }
257
258                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
259                 static extern void gst_query_parse_caps_result(IntPtr raw, out IntPtr caps);
260
261                 public Gst.Caps ParseCapsResult() {
262                         Gst.Caps caps;
263                         IntPtr native_caps;
264                         gst_query_parse_caps_result(Handle, out native_caps);
265                         caps = native_caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (native_caps, typeof (Gst.Caps), false);
266                         return caps;
267                 }
268
269                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
270                 static extern void gst_query_parse_context(IntPtr raw, IntPtr context);
271
272                 public Gst.Context ParseContext() {
273                         Gst.Context context;
274                         IntPtr native_context = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.Context)));
275                         gst_query_parse_context(Handle, native_context);
276                         context = Gst.Context.New (native_context);
277                         Marshal.FreeHGlobal (native_context);
278                         return context;
279                 }
280
281                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
282                 static extern bool gst_query_parse_context_type(IntPtr raw, out IntPtr context_type);
283
284                 public bool ParseContextType(out string context_type) {
285                         IntPtr native_context_type;
286                         bool raw_ret = gst_query_parse_context_type(Handle, out native_context_type);
287                         bool ret = raw_ret;
288                         context_type = GLib.Marshaller.Utf8PtrToString (native_context_type);
289                         return ret;
290                 }
291
292                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
293                 static extern void gst_query_parse_convert(IntPtr raw, out int src_format, out long src_value, out int dest_format, out long dest_value);
294
295                 public void ParseConvert(out Gst.Format src_format, out long src_value, out Gst.Format dest_format, out long dest_value) {
296                         int native_src_format;
297                         int native_dest_format;
298                         gst_query_parse_convert(Handle, out native_src_format, out src_value, out native_dest_format, out dest_value);
299                         src_format = (Gst.Format) native_src_format;
300                         dest_format = (Gst.Format) native_dest_format;
301                 }
302
303                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
304                 static extern void gst_query_parse_duration(IntPtr raw, out int format, out long duration);
305
306                 public void ParseDuration(out Gst.Format format, out long duration) {
307                         int native_format;
308                         gst_query_parse_duration(Handle, out native_format, out duration);
309                         format = (Gst.Format) native_format;
310                 }
311
312                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
313                 static extern void gst_query_parse_latency(IntPtr raw, out bool live, out ulong min_latency, out ulong max_latency);
314
315                 public void ParseLatency(out bool live, out ulong min_latency, out ulong max_latency) {
316                         gst_query_parse_latency(Handle, out live, out min_latency, out max_latency);
317                 }
318
319                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
320                 static extern void gst_query_parse_n_formats(IntPtr raw, out uint n_formats);
321
322                 public uint ParseNFormats() {
323                         uint n_formats;
324                         gst_query_parse_n_formats(Handle, out n_formats);
325                         return n_formats;
326                 }
327
328                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
329                 static extern IntPtr gst_query_parse_nth_allocation_meta(IntPtr raw, uint index, out IntPtr parms);
330
331                 public GLib.GType ParseNthAllocationMeta(uint index, out Gst.Structure parms) {
332                         IntPtr native_parms;
333                         IntPtr raw_ret = gst_query_parse_nth_allocation_meta(Handle, index, out native_parms);
334                         GLib.GType ret = new GLib.GType(raw_ret);
335                         parms = native_parms == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (native_parms, typeof (Gst.Structure), false);
336                         return ret;
337                 }
338
339                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
340                 static extern void gst_query_parse_nth_allocation_param(IntPtr raw, uint index, out IntPtr allocator, IntPtr parms);
341
342                 public void ParseNthAllocationParam(uint index, out Gst.Allocator allocator, out Gst.AllocationParams parms) {
343                         IntPtr native_allocator;
344                         IntPtr native_parms = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.AllocationParams)));
345                         gst_query_parse_nth_allocation_param(Handle, index, out native_allocator, native_parms);
346                         allocator = GLib.Object.GetObject(native_allocator, true) as Gst.Allocator;
347                         parms = Gst.AllocationParams.New (native_parms);
348                         Marshal.FreeHGlobal (native_parms);
349                 }
350
351                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
352                 static extern void gst_query_parse_nth_allocation_pool(IntPtr raw, uint index, out IntPtr pool, out uint size, out uint min_buffers, out uint max_buffers);
353
354                 public void ParseNthAllocationPool(uint index, out Gst.BufferPool pool, out uint size, out uint min_buffers, out uint max_buffers) {
355                         IntPtr native_pool;
356                         gst_query_parse_nth_allocation_pool(Handle, index, out native_pool, out size, out min_buffers, out max_buffers);
357                         pool = GLib.Object.GetObject(native_pool, true) as Gst.BufferPool;
358                 }
359
360                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
361                 static extern bool gst_query_parse_nth_buffering_range(IntPtr raw, uint index, out long start, out long stop);
362
363                 public bool ParseNthBufferingRange(uint index, out long start, out long stop) {
364                         bool raw_ret = gst_query_parse_nth_buffering_range(Handle, index, out start, out stop);
365                         bool ret = raw_ret;
366                         return ret;
367                 }
368
369                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
370                 static extern void gst_query_parse_nth_format(IntPtr raw, uint nth, out int format);
371
372                 public Gst.Format ParseNthFormat(uint nth) {
373                         Gst.Format format;
374                         int native_format;
375                         gst_query_parse_nth_format(Handle, nth, out native_format);
376                         format = (Gst.Format) native_format;
377                         return format;
378                 }
379
380                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
381                 static extern int gst_query_parse_nth_scheduling_mode(IntPtr raw, uint index);
382
383                 public Gst.PadMode ParseNthSchedulingMode(uint index) {
384                         int raw_ret = gst_query_parse_nth_scheduling_mode(Handle, index);
385                         Gst.PadMode ret = (Gst.PadMode) raw_ret;
386                         return ret;
387                 }
388
389                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
390                 static extern void gst_query_parse_position(IntPtr raw, out int format, out long cur);
391
392                 public void ParsePosition(out Gst.Format format, out long cur) {
393                         int native_format;
394                         gst_query_parse_position(Handle, out native_format, out cur);
395                         format = (Gst.Format) native_format;
396                 }
397
398                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
399                 static extern void gst_query_parse_scheduling(IntPtr raw, out int flags, out int minsize, out int maxsize, out int align);
400
401                 public void ParseScheduling(out Gst.SchedulingFlags flags, out int minsize, out int maxsize, out int align) {
402                         int native_flags;
403                         gst_query_parse_scheduling(Handle, out native_flags, out minsize, out maxsize, out align);
404                         flags = (Gst.SchedulingFlags) native_flags;
405                 }
406
407                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
408                 static extern void gst_query_parse_seeking(IntPtr raw, out int format, out bool seekable, out long segment_start, out long segment_end);
409
410                 public void ParseSeeking(out Gst.Format format, out bool seekable, out long segment_start, out long segment_end) {
411                         int native_format;
412                         gst_query_parse_seeking(Handle, out native_format, out seekable, out segment_start, out segment_end);
413                         format = (Gst.Format) native_format;
414                 }
415
416                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
417                 static extern void gst_query_parse_segment(IntPtr raw, out double rate, out int format, out long start_value, out long stop_value);
418
419                 public void ParseSegment(out double rate, out Gst.Format format, out long start_value, out long stop_value) {
420                         int native_format;
421                         gst_query_parse_segment(Handle, out rate, out native_format, out start_value, out stop_value);
422                         format = (Gst.Format) native_format;
423                 }
424
425                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
426                 static extern void gst_query_parse_uri(IntPtr raw, out IntPtr uri);
427
428                 public string ParseUri() {
429                         string uri;
430                         IntPtr native_uri;
431                         gst_query_parse_uri(Handle, out native_uri);
432                         uri = GLib.Marshaller.PtrToStringGFree(native_uri);
433                         return uri;
434                 }
435
436                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
437                 static extern void gst_query_parse_uri_redirection(IntPtr raw, out IntPtr uri);
438
439                 public string ParseUriRedirection() {
440                         string uri;
441                         IntPtr native_uri;
442                         gst_query_parse_uri_redirection(Handle, out native_uri);
443                         uri = GLib.Marshaller.PtrToStringGFree(native_uri);
444                         return uri;
445                 }
446
447                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
448                 static extern void gst_query_parse_uri_redirection_permanent(IntPtr raw, out bool permanent);
449
450                 public bool ParseUriRedirectionPermanent() {
451                         bool permanent;
452                         gst_query_parse_uri_redirection_permanent(Handle, out permanent);
453                         return permanent;
454                 }
455
456                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
457                 static extern void gst_query_remove_nth_allocation_meta(IntPtr raw, uint index);
458
459                 public void RemoveNthAllocationMeta(uint index) {
460                         gst_query_remove_nth_allocation_meta(Handle, index);
461                 }
462
463                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
464                 static extern void gst_query_remove_nth_allocation_param(IntPtr raw, uint index);
465
466                 public void RemoveNthAllocationParam(uint index) {
467                         gst_query_remove_nth_allocation_param(Handle, index);
468                 }
469
470                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
471                 static extern void gst_query_remove_nth_allocation_pool(IntPtr raw, uint index);
472
473                 public void RemoveNthAllocationPool(uint index) {
474                         gst_query_remove_nth_allocation_pool(Handle, index);
475                 }
476
477                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
478                 static extern void gst_query_set_accept_caps_result(IntPtr raw, bool _result);
479
480                 public bool AcceptCapsResult { 
481                         set {
482                                 gst_query_set_accept_caps_result(Handle, value);
483                         }
484                 }
485
486                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
487                 static extern void gst_query_set_bitrate(IntPtr raw, uint nominal_bitrate);
488
489                 public uint Bitrate { 
490                         set {
491                                 gst_query_set_bitrate(Handle, value);
492                         }
493                 }
494
495                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
496                 static extern void gst_query_set_buffering_percent(IntPtr raw, bool busy, int percent);
497
498                 public void SetBufferingPercent(bool busy, int percent) {
499                         gst_query_set_buffering_percent(Handle, busy, percent);
500                 }
501
502                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
503                 static extern void gst_query_set_buffering_range(IntPtr raw, int format, long start, long stop, long estimated_total);
504
505                 public void SetBufferingRange(Gst.Format format, long start, long stop, long estimated_total) {
506                         gst_query_set_buffering_range(Handle, (int) format, start, stop, estimated_total);
507                 }
508
509                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
510                 static extern void gst_query_set_buffering_stats(IntPtr raw, int mode, int avg_in, int avg_out, long buffering_left);
511
512                 public void SetBufferingStats(Gst.BufferingMode mode, int avg_in, int avg_out, long buffering_left) {
513                         gst_query_set_buffering_stats(Handle, (int) mode, avg_in, avg_out, buffering_left);
514                 }
515
516                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
517                 static extern void gst_query_set_caps_result(IntPtr raw, IntPtr caps);
518
519                 public Gst.Caps CapsResult { 
520                         set {
521                                 gst_query_set_caps_result(Handle, value == null ? IntPtr.Zero : value.Handle);
522                         }
523                 }
524
525                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
526                 static extern void gst_query_set_context(IntPtr raw, IntPtr value);
527
528                 public Gst.Context Context { 
529                         set {
530                                 IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
531                                 gst_query_set_context(Handle, native_value);
532                                 Marshal.FreeHGlobal (native_value);
533                         }
534                 }
535
536                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
537                 static extern void gst_query_set_convert(IntPtr raw, int src_format, long src_value, int dest_format, long dest_value);
538
539                 public void SetConvert(Gst.Format src_format, long src_value, Gst.Format dest_format, long dest_value) {
540                         gst_query_set_convert(Handle, (int) src_format, src_value, (int) dest_format, dest_value);
541                 }
542
543                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
544                 static extern void gst_query_set_duration(IntPtr raw, int format, long duration);
545
546                 public void SetDuration(Gst.Format format, long duration) {
547                         gst_query_set_duration(Handle, (int) format, duration);
548                 }
549
550                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
551                 static extern void gst_query_set_formatsv(IntPtr raw, int n_formats, int[] formats);
552
553                 public Gst.Format[] Formatsv { 
554                         set {
555                                 int cnt_value = value == null ? 0 : value.Length;
556                                 int[] native_value = new int [cnt_value];
557                                 for (int i = 0; i < cnt_value; i++)
558                                         native_value [i] = (int) value[i];
559                                 gst_query_set_formatsv(Handle, (value == null ? 0 : value.Length), native_value);
560                         }
561                 }
562
563                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
564                 static extern void gst_query_set_latency(IntPtr raw, bool live, ulong min_latency, ulong max_latency);
565
566                 public void SetLatency(bool live, ulong min_latency, ulong max_latency) {
567                         gst_query_set_latency(Handle, live, min_latency, max_latency);
568                 }
569
570                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
571                 static extern void gst_query_set_nth_allocation_param(IntPtr raw, uint index, IntPtr allocator, IntPtr parms);
572
573                 public void SetNthAllocationParam(uint index, Gst.Allocator allocator, Gst.AllocationParams parms) {
574                         IntPtr native_parms = GLib.Marshaller.StructureToPtrAlloc (parms);
575                         gst_query_set_nth_allocation_param(Handle, index, allocator == null ? IntPtr.Zero : allocator.Handle, native_parms);
576                         Marshal.FreeHGlobal (native_parms);
577                 }
578
579                 public void SetNthAllocationParam(uint index) {
580                         SetNthAllocationParam (index, null, Gst.AllocationParams.Zero);
581                 }
582
583                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
584                 static extern void gst_query_set_nth_allocation_pool(IntPtr raw, uint index, IntPtr pool, uint size, uint min_buffers, uint max_buffers);
585
586                 public void SetNthAllocationPool(uint index, Gst.BufferPool pool, uint size, uint min_buffers, uint max_buffers) {
587                         gst_query_set_nth_allocation_pool(Handle, index, pool == null ? IntPtr.Zero : pool.Handle, size, min_buffers, max_buffers);
588                 }
589
590                 public void SetNthAllocationPool(uint index, uint size, uint min_buffers, uint max_buffers) {
591                         SetNthAllocationPool (index, null, size, min_buffers, max_buffers);
592                 }
593
594                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
595                 static extern void gst_query_set_position(IntPtr raw, int format, long cur);
596
597                 public void SetPosition(Gst.Format format, long cur) {
598                         gst_query_set_position(Handle, (int) format, cur);
599                 }
600
601                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
602                 static extern void gst_query_set_scheduling(IntPtr raw, int flags, int minsize, int maxsize, int align);
603
604                 public void SetScheduling(Gst.SchedulingFlags flags, int minsize, int maxsize, int align) {
605                         gst_query_set_scheduling(Handle, (int) flags, minsize, maxsize, align);
606                 }
607
608                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
609                 static extern void gst_query_set_seeking(IntPtr raw, int format, bool seekable, long segment_start, long segment_end);
610
611                 public void SetSeeking(Gst.Format format, bool seekable, long segment_start, long segment_end) {
612                         gst_query_set_seeking(Handle, (int) format, seekable, segment_start, segment_end);
613                 }
614
615                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
616                 static extern void gst_query_set_segment(IntPtr raw, double rate, int format, long start_value, long stop_value);
617
618                 public void SetSegment(double rate, Gst.Format format, long start_value, long stop_value) {
619                         gst_query_set_segment(Handle, rate, (int) format, start_value, stop_value);
620                 }
621
622                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
623                 static extern void gst_query_set_uri(IntPtr raw, IntPtr uri);
624
625                 public string Uri { 
626                         set {
627                                 IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
628                                 gst_query_set_uri(Handle, native_value);
629                                 GLib.Marshaller.Free (native_value);
630                         }
631                 }
632
633                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
634                 static extern void gst_query_set_uri_redirection(IntPtr raw, IntPtr uri);
635
636                 public string UriRedirection { 
637                         set {
638                                 IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
639                                 gst_query_set_uri_redirection(Handle, native_value);
640                                 GLib.Marshaller.Free (native_value);
641                         }
642                 }
643
644                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
645                 static extern void gst_query_set_uri_redirection_permanent(IntPtr raw, bool permanent);
646
647                 public bool UriRedirectionPermanent { 
648                         set {
649                                 gst_query_set_uri_redirection_permanent(Handle, value);
650                         }
651                 }
652
653                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
654                 static extern IntPtr gst_query_writable_structure(IntPtr raw);
655
656                 public Gst.Structure WritableStructure() {
657                         IntPtr raw_ret = gst_query_writable_structure(Handle);
658                         Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
659                         return ret;
660                 }
661
662                 public Query(IntPtr raw) : base(raw) {}
663
664                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
665                 static extern IntPtr gst_query_new_accept_caps(IntPtr caps);
666
667                 public Query (Gst.Caps caps) 
668                 {
669                         Raw = gst_query_new_accept_caps(caps == null ? IntPtr.Zero : caps.Handle);
670                 }
671
672                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
673                 static extern IntPtr gst_query_new_allocation(IntPtr caps, bool need_pool);
674
675                 public Query (Gst.Caps caps, bool need_pool) 
676                 {
677                         Raw = gst_query_new_allocation(caps == null ? IntPtr.Zero : caps.Handle, need_pool);
678                 }
679
680                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
681                 static extern IntPtr gst_query_new_bitrate();
682
683                 public Query () 
684                 {
685                         Raw = gst_query_new_bitrate();
686                 }
687
688                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
689                 static extern IntPtr gst_query_new_buffering(int format);
690
691                 public Query (Gst.Format format) 
692                 {
693                         Raw = gst_query_new_buffering((int) format);
694                 }
695
696                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
697                 static extern IntPtr gst_query_new_caps(IntPtr filter);
698
699                 public static Query NewCaps(Gst.Caps filter)
700                 {
701                         Query result = new Query (gst_query_new_caps(filter == null ? IntPtr.Zero : filter.Handle));
702                         return result;
703                 }
704
705                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
706                 static extern IntPtr gst_query_new_context(IntPtr context_type);
707
708                 public Query (string context_type) 
709                 {
710                         IntPtr native_context_type = GLib.Marshaller.StringToPtrGStrdup (context_type);
711                         Raw = gst_query_new_context(native_context_type);
712                         GLib.Marshaller.Free (native_context_type);
713                 }
714
715                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
716                 static extern IntPtr gst_query_new_convert(int src_format, long value, int dest_format);
717
718                 public Query (Gst.Format src_format, long value, Gst.Format dest_format) 
719                 {
720                         Raw = gst_query_new_convert((int) src_format, value, (int) dest_format);
721                 }
722
723                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
724                 static extern IntPtr gst_query_new_custom(int type, IntPtr structure);
725
726                 public Query (Gst.QueryType type, Gst.Structure structure) 
727                 {
728                         structure.Owned = false;
729                         Raw = gst_query_new_custom((int) type, structure == null ? IntPtr.Zero : structure.Handle);
730                 }
731
732                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
733                 static extern IntPtr gst_query_new_drain();
734
735                 public static Query NewDrain()
736                 {
737                         Query result = new Query (gst_query_new_drain());
738                         return result;
739                 }
740
741                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
742                 static extern IntPtr gst_query_new_duration(int format);
743
744                 public static Query NewDuration(Gst.Format format)
745                 {
746                         Query result = new Query (gst_query_new_duration((int) format));
747                         return result;
748                 }
749
750                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
751                 static extern IntPtr gst_query_new_formats();
752
753                 public static Query NewFormats()
754                 {
755                         Query result = new Query (gst_query_new_formats());
756                         return result;
757                 }
758
759                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
760                 static extern IntPtr gst_query_new_latency();
761
762                 public static Query NewLatency()
763                 {
764                         Query result = new Query (gst_query_new_latency());
765                         return result;
766                 }
767
768                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
769                 static extern IntPtr gst_query_new_position(int format);
770
771                 public static Query NewPosition(Gst.Format format)
772                 {
773                         Query result = new Query (gst_query_new_position((int) format));
774                         return result;
775                 }
776
777                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
778                 static extern IntPtr gst_query_new_scheduling();
779
780                 public static Query NewScheduling()
781                 {
782                         Query result = new Query (gst_query_new_scheduling());
783                         return result;
784                 }
785
786                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
787                 static extern IntPtr gst_query_new_seeking(int format);
788
789                 public static Query NewSeeking(Gst.Format format)
790                 {
791                         Query result = new Query (gst_query_new_seeking((int) format));
792                         return result;
793                 }
794
795                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
796                 static extern IntPtr gst_query_new_segment(int format);
797
798                 public static Query NewSegment(Gst.Format format)
799                 {
800                         Query result = new Query (gst_query_new_segment((int) format));
801                         return result;
802                 }
803
804                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
805                 static extern IntPtr gst_query_new_uri();
806
807                 public static Query NewUri()
808                 {
809                         Query result = new Query (gst_query_new_uri());
810                         return result;
811                 }
812
813                 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
814                 static extern void gst_query_unref(IntPtr raw);
815
816                 protected override void Unref (IntPtr raw)
817                 {
818                         if (Owned) {
819                                 gst_query_unref (raw);
820                                 Owned = false;
821                         }
822                 }
823
824                 protected override Action<IntPtr> DisposeUnmanagedFunc {
825                         get {
826                                 return gst_query_unref;
827                         }
828                 }
829
830
831                 // Internal representation of the wrapped structure ABI.
832                 static GLib.AbiStruct _abi_info = null;
833                 static public new GLib.AbiStruct abi_info {
834                         get {
835                                 if (_abi_info == null)
836                                         _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
837                                                 new GLib.AbiField("type"
838                                                         , Gst.MiniObject.abi_info.Fields
839                                                         , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.QueryType))) // type
840                                                         , null
841                                                         , null
842                                                         , (long) Marshal.OffsetOf(typeof(GstQuery_typeAlign), "type")
843                                                         , 0
844                                                         ),
845                                         });
846
847                                 return _abi_info;
848                         }
849                 }
850
851                 [StructLayout(LayoutKind.Sequential)]
852                 public struct GstQuery_typeAlign
853                 {
854                         sbyte f1;
855                         private Gst.QueryType type;
856                 }
857
858
859                 // End of the ABI representation.
860
861 #endregion
862         }
863 }