1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Collections;
8 using System.Collections.Generic;
9 using System.Runtime.InteropServices;
11 #region Autogenerated code
12 public partial class Query : Gst.MiniObject {
14 public Gst.QueryType Type {
17 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type"));
18 return (Gst.QueryType) (*raw_ptr);
23 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("type"));
24 *raw_ptr = (int) value;
29 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
30 static extern IntPtr gst_query_get_type();
32 public static GLib.GType GType {
34 IntPtr raw_ret = gst_query_get_type();
35 GLib.GType ret = new GLib.GType(raw_ret);
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);
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);
47 public void AddAllocationMeta(GLib.GType api) {
48 AddAllocationMeta (api, null);
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);
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);
60 public void AddAllocationParam() {
61 AddAllocationParam (null, Gst.AllocationParams.Zero);
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);
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);
71 public void AddAllocationPool(uint size, uint min_buffers, uint max_buffers) {
72 AddAllocationPool (null, size, min_buffers, max_buffers);
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);
78 public bool AddBufferingRange(long start, long stop) {
79 bool raw_ret = gst_query_add_buffering_range(Handle, start, stop);
84 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
85 static extern void gst_query_add_scheduling_mode(IntPtr raw, int mode);
87 public void AddSchedulingMode(Gst.PadMode mode) {
88 gst_query_add_scheduling_mode(Handle, (int) mode);
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);
94 public bool FindAllocationMeta(GLib.GType api, out uint index) {
95 bool raw_ret = gst_query_find_allocation_meta(Handle, api.Val, out index);
100 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
101 static extern uint gst_query_get_n_allocation_metas(IntPtr raw);
103 public uint NAllocationMetas {
105 uint raw_ret = gst_query_get_n_allocation_metas(Handle);
111 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
112 static extern uint gst_query_get_n_allocation_params(IntPtr raw);
114 public uint NAllocationParams {
116 uint raw_ret = gst_query_get_n_allocation_params(Handle);
122 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
123 static extern uint gst_query_get_n_allocation_pools(IntPtr raw);
125 public uint NAllocationPools {
127 uint raw_ret = gst_query_get_n_allocation_pools(Handle);
133 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
134 static extern uint gst_query_get_n_buffering_ranges(IntPtr raw);
136 public uint NBufferingRanges {
138 uint raw_ret = gst_query_get_n_buffering_ranges(Handle);
144 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
145 static extern uint gst_query_get_n_scheduling_modes(IntPtr raw);
147 public uint NSchedulingModes {
149 uint raw_ret = gst_query_get_n_scheduling_modes(Handle);
155 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
156 static extern IntPtr gst_query_get_structure(IntPtr raw);
158 public Gst.Structure Structure {
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);
166 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
167 static extern bool gst_query_has_scheduling_mode(IntPtr raw, int mode);
169 public bool HasSchedulingMode(Gst.PadMode mode) {
170 bool raw_ret = gst_query_has_scheduling_mode(Handle, (int) mode);
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);
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);
184 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
185 static extern void gst_query_parse_accept_caps(IntPtr raw, out IntPtr caps);
187 public Gst.Caps ParseAcceptCaps() {
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);
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);
198 public bool ParseAcceptCapsResult() {
200 gst_query_parse_accept_caps_result(Handle, out _result);
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);
207 public void ParseAllocation(out Gst.Caps caps, out bool need_pool) {
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);
213 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
214 static extern void gst_query_parse_bitrate(IntPtr raw, out uint nominal_bitrate);
216 public uint ParseBitrate() {
217 uint nominal_bitrate;
218 gst_query_parse_bitrate(Handle, out nominal_bitrate);
219 return nominal_bitrate;
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);
225 public void ParseBufferingPercent(out bool busy, out int percent) {
226 gst_query_parse_buffering_percent(Handle, out busy, out percent);
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);
232 public void ParseBufferingRange(out Gst.Format format, out long start, out long stop, out long estimated_total) {
234 gst_query_parse_buffering_range(Handle, out native_format, out start, out stop, out estimated_total);
235 format = (Gst.Format) native_format;
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);
241 public void ParseBufferingStats(out Gst.BufferingMode mode, out int avg_in, out int avg_out, out long buffering_left) {
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;
247 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
248 static extern void gst_query_parse_caps(IntPtr raw, out IntPtr filter);
250 public Gst.Caps ParseCaps() {
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);
258 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
259 static extern void gst_query_parse_caps_result(IntPtr raw, out IntPtr caps);
261 public Gst.Caps ParseCapsResult() {
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);
269 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
270 static extern void gst_query_parse_context(IntPtr raw, IntPtr context);
272 public Gst.Context ParseContext() {
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);
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);
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);
288 context_type = GLib.Marshaller.Utf8PtrToString (native_context_type);
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);
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;
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);
306 public void ParseDuration(out Gst.Format format, out long duration) {
308 gst_query_parse_duration(Handle, out native_format, out duration);
309 format = (Gst.Format) native_format;
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);
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);
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);
322 public uint ParseNFormats() {
324 gst_query_parse_n_formats(Handle, out n_formats);
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);
331 public GLib.GType ParseNthAllocationMeta(uint index, out Gst.Structure 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);
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);
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);
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);
354 public void ParseNthAllocationPool(uint index, out Gst.BufferPool pool, out uint size, out uint min_buffers, out uint max_buffers) {
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;
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);
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);
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);
372 public Gst.Format ParseNthFormat(uint nth) {
375 gst_query_parse_nth_format(Handle, nth, out native_format);
376 format = (Gst.Format) native_format;
380 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
381 static extern int gst_query_parse_nth_scheduling_mode(IntPtr raw, uint index);
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;
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);
392 public void ParsePosition(out Gst.Format format, out long cur) {
394 gst_query_parse_position(Handle, out native_format, out cur);
395 format = (Gst.Format) native_format;
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);
401 public void ParseScheduling(out Gst.SchedulingFlags flags, out int minsize, out int maxsize, out int align) {
403 gst_query_parse_scheduling(Handle, out native_flags, out minsize, out maxsize, out align);
404 flags = (Gst.SchedulingFlags) native_flags;
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);
410 public void ParseSeeking(out Gst.Format format, out bool seekable, out long segment_start, out long segment_end) {
412 gst_query_parse_seeking(Handle, out native_format, out seekable, out segment_start, out segment_end);
413 format = (Gst.Format) native_format;
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);
419 public void ParseSegment(out double rate, out Gst.Format format, out long start_value, out long stop_value) {
421 gst_query_parse_segment(Handle, out rate, out native_format, out start_value, out stop_value);
422 format = (Gst.Format) native_format;
425 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
426 static extern void gst_query_parse_uri(IntPtr raw, out IntPtr uri);
428 public string ParseUri() {
431 gst_query_parse_uri(Handle, out native_uri);
432 uri = GLib.Marshaller.PtrToStringGFree(native_uri);
436 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
437 static extern void gst_query_parse_uri_redirection(IntPtr raw, out IntPtr uri);
439 public string ParseUriRedirection() {
442 gst_query_parse_uri_redirection(Handle, out native_uri);
443 uri = GLib.Marshaller.PtrToStringGFree(native_uri);
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);
450 public bool ParseUriRedirectionPermanent() {
452 gst_query_parse_uri_redirection_permanent(Handle, out permanent);
456 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
457 static extern void gst_query_remove_nth_allocation_meta(IntPtr raw, uint index);
459 public void RemoveNthAllocationMeta(uint index) {
460 gst_query_remove_nth_allocation_meta(Handle, index);
463 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
464 static extern void gst_query_remove_nth_allocation_param(IntPtr raw, uint index);
466 public void RemoveNthAllocationParam(uint index) {
467 gst_query_remove_nth_allocation_param(Handle, index);
470 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
471 static extern void gst_query_remove_nth_allocation_pool(IntPtr raw, uint index);
473 public void RemoveNthAllocationPool(uint index) {
474 gst_query_remove_nth_allocation_pool(Handle, index);
477 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
478 static extern void gst_query_set_accept_caps_result(IntPtr raw, bool _result);
480 public bool AcceptCapsResult {
482 gst_query_set_accept_caps_result(Handle, value);
486 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
487 static extern void gst_query_set_bitrate(IntPtr raw, uint nominal_bitrate);
489 public uint Bitrate {
491 gst_query_set_bitrate(Handle, value);
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);
498 public void SetBufferingPercent(bool busy, int percent) {
499 gst_query_set_buffering_percent(Handle, busy, percent);
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);
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);
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);
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);
516 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
517 static extern void gst_query_set_caps_result(IntPtr raw, IntPtr caps);
519 public Gst.Caps CapsResult {
521 gst_query_set_caps_result(Handle, value == null ? IntPtr.Zero : value.Handle);
525 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
526 static extern void gst_query_set_context(IntPtr raw, IntPtr value);
528 public Gst.Context Context {
530 IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value);
531 gst_query_set_context(Handle, native_value);
532 Marshal.FreeHGlobal (native_value);
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);
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);
543 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
544 static extern void gst_query_set_duration(IntPtr raw, int format, long duration);
546 public void SetDuration(Gst.Format format, long duration) {
547 gst_query_set_duration(Handle, (int) format, duration);
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);
553 public Gst.Format[] Formatsv {
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);
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);
566 public void SetLatency(bool live, ulong min_latency, ulong max_latency) {
567 gst_query_set_latency(Handle, live, min_latency, max_latency);
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);
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);
579 public void SetNthAllocationParam(uint index) {
580 SetNthAllocationParam (index, null, Gst.AllocationParams.Zero);
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);
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);
590 public void SetNthAllocationPool(uint index, uint size, uint min_buffers, uint max_buffers) {
591 SetNthAllocationPool (index, null, size, min_buffers, max_buffers);
594 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
595 static extern void gst_query_set_position(IntPtr raw, int format, long cur);
597 public void SetPosition(Gst.Format format, long cur) {
598 gst_query_set_position(Handle, (int) format, cur);
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);
604 public void SetScheduling(Gst.SchedulingFlags flags, int minsize, int maxsize, int align) {
605 gst_query_set_scheduling(Handle, (int) flags, minsize, maxsize, align);
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);
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);
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);
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);
622 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
623 static extern void gst_query_set_uri(IntPtr raw, IntPtr uri);
627 IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
628 gst_query_set_uri(Handle, native_value);
629 GLib.Marshaller.Free (native_value);
633 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
634 static extern void gst_query_set_uri_redirection(IntPtr raw, IntPtr uri);
636 public string UriRedirection {
638 IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
639 gst_query_set_uri_redirection(Handle, native_value);
640 GLib.Marshaller.Free (native_value);
644 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
645 static extern void gst_query_set_uri_redirection_permanent(IntPtr raw, bool permanent);
647 public bool UriRedirectionPermanent {
649 gst_query_set_uri_redirection_permanent(Handle, value);
653 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
654 static extern IntPtr gst_query_writable_structure(IntPtr raw);
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);
662 public Query(IntPtr raw) : base(raw) {}
664 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
665 static extern IntPtr gst_query_new_accept_caps(IntPtr caps);
667 public Query (Gst.Caps caps)
669 Raw = gst_query_new_accept_caps(caps == null ? IntPtr.Zero : caps.Handle);
672 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
673 static extern IntPtr gst_query_new_allocation(IntPtr caps, bool need_pool);
675 public Query (Gst.Caps caps, bool need_pool)
677 Raw = gst_query_new_allocation(caps == null ? IntPtr.Zero : caps.Handle, need_pool);
680 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
681 static extern IntPtr gst_query_new_bitrate();
685 Raw = gst_query_new_bitrate();
688 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
689 static extern IntPtr gst_query_new_buffering(int format);
691 public Query (Gst.Format format)
693 Raw = gst_query_new_buffering((int) format);
696 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
697 static extern IntPtr gst_query_new_caps(IntPtr filter);
699 public static Query NewCaps(Gst.Caps filter)
701 Query result = new Query (gst_query_new_caps(filter == null ? IntPtr.Zero : filter.Handle));
705 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
706 static extern IntPtr gst_query_new_context(IntPtr context_type);
708 public Query (string context_type)
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);
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);
718 public Query (Gst.Format src_format, long value, Gst.Format dest_format)
720 Raw = gst_query_new_convert((int) src_format, value, (int) dest_format);
723 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
724 static extern IntPtr gst_query_new_custom(int type, IntPtr structure);
726 public Query (Gst.QueryType type, Gst.Structure structure)
728 structure.Owned = false;
729 Raw = gst_query_new_custom((int) type, structure == null ? IntPtr.Zero : structure.Handle);
732 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
733 static extern IntPtr gst_query_new_drain();
735 public static Query NewDrain()
737 Query result = new Query (gst_query_new_drain());
741 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
742 static extern IntPtr gst_query_new_duration(int format);
744 public static Query NewDuration(Gst.Format format)
746 Query result = new Query (gst_query_new_duration((int) format));
750 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
751 static extern IntPtr gst_query_new_formats();
753 public static Query NewFormats()
755 Query result = new Query (gst_query_new_formats());
759 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
760 static extern IntPtr gst_query_new_latency();
762 public static Query NewLatency()
764 Query result = new Query (gst_query_new_latency());
768 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
769 static extern IntPtr gst_query_new_position(int format);
771 public static Query NewPosition(Gst.Format format)
773 Query result = new Query (gst_query_new_position((int) format));
777 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
778 static extern IntPtr gst_query_new_scheduling();
780 public static Query NewScheduling()
782 Query result = new Query (gst_query_new_scheduling());
786 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
787 static extern IntPtr gst_query_new_seeking(int format);
789 public static Query NewSeeking(Gst.Format format)
791 Query result = new Query (gst_query_new_seeking((int) format));
795 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
796 static extern IntPtr gst_query_new_segment(int format);
798 public static Query NewSegment(Gst.Format format)
800 Query result = new Query (gst_query_new_segment((int) format));
804 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
805 static extern IntPtr gst_query_new_uri();
807 public static Query NewUri()
809 Query result = new Query (gst_query_new_uri());
813 [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
814 static extern void gst_query_unref(IntPtr raw);
816 protected override void Unref (IntPtr raw)
819 gst_query_unref (raw);
824 protected override Action<IntPtr> DisposeUnmanagedFunc {
826 return gst_query_unref;
831 // Internal representation of the wrapped structure ABI.
832 static GLib.AbiStruct _abi_info = null;
833 static public new GLib.AbiStruct abi_info {
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
842 , (long) Marshal.OffsetOf(typeof(GstQuery_typeAlign), "type")
851 [StructLayout(LayoutKind.Sequential)]
852 public struct GstQuery_typeAlign
855 private Gst.QueryType type;
859 // End of the ABI representation.