This file is indexed.

/usr/include/d/gtkd-3/gstreamer/Query.d is in libgstreamerd-3-dev 3.7.5-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
/*
 * This file is part of gtkD.
 *
 * gtkD is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 3
 * of the License, or (at your option) any later version, with
 * some exceptions, please read the COPYING file.
 *
 * gtkD is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with gtkD; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
 */

// generated automatically - do not change
// find conversion definition on APILookup.txt
// implement new conversion functionalities on the wrap.utils pakage


module gstreamer.Query;

private import glib.ConstructionException;
private import glib.MemorySlice;
private import glib.Str;
private import gobject.ObjectG;
private import gstreamer.AllocationParams;
private import gstreamer.Allocator;
private import gstreamer.BufferPool;
private import gstreamer.Caps;
private import gstreamer.Context;
private import gstreamer.Structure;
private import gstreamer.c.functions;
public  import gstreamer.c.types;
public  import gstreamerc.gstreamertypes;


/**
 * Queries can be performed on pads (gst_pad_query()) and elements
 * (gst_element_query()). Please note that some queries might need a running
 * pipeline to work.
 * 
 * Queries can be created using the gst_query_new_*() functions.
 * Query values can be set using gst_query_set_*(), and parsed using
 * gst_query_parse_*() helpers.
 * 
 * The following example shows how to query the duration of a pipeline:
 * |[<!-- language="C" -->
 * GstQuery *query;
 * gboolean res;
 * query = gst_query_new_duration (GST_FORMAT_TIME);
 * res = gst_element_query (pipeline, query);
 * if (res) {
 * gint64 duration;
 * gst_query_parse_duration (query, NULL, &amp;duration);
 * g_print ("duration = %"GST_TIME_FORMAT, GST_TIME_ARGS (duration));
 * } else {
 * g_print ("duration query failed...");
 * }
 * gst_query_unref (query);
 * ]|
 */
public class Query
{
	/** the main Gtk struct */
	protected GstQuery* gstQuery;
	protected bool ownedRef;

	/** Get the main Gtk struct */
	public GstQuery* getQueryStruct(bool transferOwnership = false)
	{
		if (transferOwnership)
			ownedRef = false;
		return gstQuery;
	}

	/** the main Gtk struct as a void* */
	protected void* getStruct()
	{
		return cast(void*)gstQuery;
	}

	/**
	 * Sets our main struct and passes it to the parent class.
	 */
	public this (GstQuery* gstQuery, bool ownedRef = false)
	{
		this.gstQuery = gstQuery;
		this.ownedRef = ownedRef;
	}

	/**
	 * Constructs a new query stream position query object. Use gst_query_unref()
	 * when done with it. A position query is used to query the current position
	 * of playback in the streams, in some format.
	 * Params:
	 *  format = the default GstFormat for the new query
	 * Returns:
	 *  A GstQuery
	 */
	public static Query newPosition(GstFormat format)
	{
		auto p = gst_query_new_position(format);

		if(p is null)
		{
			throw new ConstructionException("null returned by gst_query_new_position");
		}

		return new Query( cast(GstQuery*)p); //, true);
	}

	/**
	 * Constructs a new stream duration query object to query in the given format.
	 * Use gst_query_unref() when done with it. A duration query will give the
	 * total length of the stream.
	 * Params:
	 *  format = the GstFormat for this duration query
	 * Returns:
	 *  A GstQuery
	 */
	public static Query newDuration(GstFormat format)
	{
		auto p = gst_query_new_duration(format);

		if(p is null)
		{
			throw new ConstructionException("null returned by gst_query_new_duration");
		}

		return new Query( cast(GstQuery*)p); //, true);
	}

	/**
	 * Constructs a new query object for querying seeking properties of
	 * the stream.
	 * Params:
	 *  format = the default GstFormat for the new query
	 * Returns:
	 *  A GstQuery
	 */
	public static Query newSeeking(GstFormat format)
	{
		auto p = gst_query_new_seeking(format);

		if(p is null)
		{
			throw new ConstructionException("null returned by gst_query_new_seeking");
		}

		return new Query(cast(GstQuery*)p); //, true);
	}

	/**
	 * Constructs a new query object for querying formats of
	 * the stream.
	 * Returns:
	 *  A GstQuery
	 */
	public static Query newFormats()
	{
		auto p = gst_query_new_formats();

		if(p is null)
		{
			throw new ConstructionException("null returned by gst_query_new_formats");
		}

		return new Query(cast(GstQuery*)p); //, true);
	}

	/**
	 * Constructs a new segment query object. Use gst_query_unref()
	 * when done with it. A segment query is used to discover information about the
	 * currently configured segment for playback.
	 * Params:
	 *  format = the GstFormat for the new query
	 * Returns:
	 *  a GstQuery
	 */
	public static Query newSegment(GstFormat format)
	{
		auto p = gst_query_new_segment(format);

		if(p is null)
		{
			throw new ConstructionException("null returned by gst_query_new_segment");
		}

		return new Query(cast(GstQuery*)p); //, true);
	}

	/**
	 * Constructs a new latency query object.
	 * Use gst_query_unref() when done with it. A latency query is usually performed
	 * by sinks to compensate for additional latency introduced by elements in the
	 * pipeline.
	 * Free-function: gst_query_unref
	 */
	public static Query newLatency()
	{
		auto p = gst_query_new_latency();

		if(p is null)
		{
			throw new ConstructionException("null returned by gst_query_new_latency()");
		}

		return new Query(cast(GstQuery*)p); //, true);
	}

	/**
	 * Constructs a new query URI query object. Use gst_query_unref()
	 * when done with it. An URI query is used to query the current URI
	 * that is used by the source or sink.
	 * Free-function: gst_query_unref
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public static Query newUri()
	{
		auto p = gst_query_new_uri();

		if(p is null)
		{
			throw new ConstructionException("null returned by gst_query_new_uri()");
		}

		return new Query(cast(GstQuery*)p); //, true);
	}

	/**
	 * Constructs a new query object for querying the scheduling properties.
	 * Free-function: gst_query_unref
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public static Query newScheduling()
	{
		auto p = gst_query_new_scheduling();

		if(p is null)
		{
			throw new ConstructionException("null returned by gst_query_new_scheduling()");
		}

		return new Query(cast(GstQuery*)p); //, true);
	}

	/**
	 * Constructs a new query object for querying the drain state.
	 * Free-function: gst_query_unref
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public static Query newDrain()
	{
		auto p = gst_query_new_drain();

		if(p is null)
		{
			throw new ConstructionException("null returned by gst_query_new_drain()");
		}

		return new Query(cast(GstQuery*)p); //, true);
	}

	/**
	 * Constructs a new query object for querying if caps are accepted.
	 * Free-function: gst_query_unref
	 * Params:
	 * caps = a fixed GstCaps
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public static Query newAcceptCaps(Caps caps)
	{
		auto p = gst_query_new_accept_caps((caps is null) ? null : caps.getCapsStruct());

		if(p is null)
		{
			throw new ConstructionException("null returned by gst_query_new_accept_caps((caps is null) ? null : caps.getCapsStruct())");
		}

		return new Query(cast(GstQuery*)p); //, true);
	}

	/**
	 */

	/** */
	public static GType getType()
	{
		return gst_query_get_type();
	}

	/**
	 * Constructs a new query object for querying the allocation properties.
	 *
	 * Free-function: gst_query_unref()
	 *
	 * Params:
	 *     caps = the negotiated caps
	 *     needPool = return a pool
	 *
	 * Returns: a new #GstQuery
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public this(Caps caps, bool needPool)
	{
		auto p = gst_query_new_allocation((caps is null) ? null : caps.getCapsStruct(), needPool);

		if(p is null)
		{
			throw new ConstructionException("null returned by new_allocation");
		}

		this(cast(GstQuery*) p);
	}

	/**
	 * Constructs a new query object for querying the buffering status of
	 * a stream.
	 *
	 * Free-function: gst_query_unref()
	 *
	 * Params:
	 *     format = the default #GstFormat for the new query
	 *
	 * Returns: a new #GstQuery
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public this(GstFormat format)
	{
		auto p = gst_query_new_buffering(format);

		if(p is null)
		{
			throw new ConstructionException("null returned by new_buffering");
		}

		this(cast(GstQuery*) p);
	}

	/**
	 * Constructs a new query object for querying the caps.
	 *
	 * The CAPS query should return the allowable caps for a pad in the context
	 * of the element's state, its link to other elements, and the devices or files
	 * it has opened. These caps must be a subset of the pad template caps. In the
	 * NULL state with no links, the CAPS query should ideally return the same caps
	 * as the pad template. In rare circumstances, an object property can affect
	 * the caps returned by the CAPS query, but this is discouraged.
	 *
	 * For most filters, the caps returned by CAPS query is directly affected by the
	 * allowed caps on other pads. For demuxers and decoders, the caps returned by
	 * the srcpad's getcaps function is directly related to the stream data. Again,
	 * the CAPS query should return the most specific caps it reasonably can, since this
	 * helps with autoplugging.
	 *
	 * The @filter is used to restrict the result caps, only the caps matching
	 * @filter should be returned from the CAPS query. Specifying a filter might
	 * greatly reduce the amount of processing an element needs to do.
	 *
	 * Free-function: gst_query_unref()
	 *
	 * Params:
	 *     filter = a filter
	 *
	 * Returns: a new #GstQuery
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public this(Caps filter)
	{
		auto p = gst_query_new_caps((filter is null) ? null : filter.getCapsStruct());

		if(p is null)
		{
			throw new ConstructionException("null returned by new_caps");
		}

		this(cast(GstQuery*) p);
	}

	/**
	 * Constructs a new query object for querying the pipeline-local context.
	 *
	 * Free-function: gst_query_unref()
	 *
	 * Params:
	 *     contextType = Context type to query
	 *
	 * Returns: a new #GstQuery
	 *
	 * Since: 1.2
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public this(string contextType)
	{
		auto p = gst_query_new_context(Str.toStringz(contextType));

		if(p is null)
		{
			throw new ConstructionException("null returned by new_context");
		}

		this(cast(GstQuery*) p);
	}

	/**
	 * Constructs a new convert query object. Use gst_query_unref()
	 * when done with it. A convert query is used to ask for a conversion between
	 * one format and another.
	 *
	 * Free-function: gst_query_unref()
	 *
	 * Params:
	 *     srcFormat = the source #GstFormat for the new query
	 *     value = the value to convert
	 *     destFormat = the target #GstFormat
	 *
	 * Returns: a #GstQuery
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public this(GstFormat srcFormat, long value, GstFormat destFormat)
	{
		auto p = gst_query_new_convert(srcFormat, value, destFormat);

		if(p is null)
		{
			throw new ConstructionException("null returned by new_convert");
		}

		this(cast(GstQuery*) p);
	}

	/**
	 * Constructs a new custom query object. Use gst_query_unref()
	 * when done with it.
	 *
	 * Free-function: gst_query_unref()
	 *
	 * Params:
	 *     type = the query type
	 *     structure = a structure for the query
	 *
	 * Returns: a new #GstQuery
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public this(GstQueryType type, Structure structure)
	{
		auto p = gst_query_new_custom(type, (structure is null) ? null : structure.getStructureStruct(true));

		if(p is null)
		{
			throw new ConstructionException("null returned by new_custom");
		}

		this(cast(GstQuery*) p);
	}

	/**
	 * Add @api with @params as one of the supported metadata API to @query.
	 *
	 * Params:
	 *     api = the metadata API
	 *     params = API specific parameters
	 */
	public void addAllocationMeta(GType api, Structure params)
	{
		gst_query_add_allocation_meta(gstQuery, api, (params is null) ? null : params.getStructureStruct());
	}

	/**
	 * Add @allocator and its @params as a supported memory allocator.
	 *
	 * Params:
	 *     allocator = the memory allocator
	 *     params = a #GstAllocationParams
	 */
	public void addAllocationParam(Allocator allocator, AllocationParams params)
	{
		gst_query_add_allocation_param(gstQuery, (allocator is null) ? null : allocator.getAllocatorStruct(), (params is null) ? null : params.getAllocationParamsStruct());
	}

	/**
	 * Set the pool parameters in @query.
	 *
	 * Params:
	 *     pool = the #GstBufferPool
	 *     size = the buffer size
	 *     minBuffers = the min buffers
	 *     maxBuffers = the max buffers
	 */
	public void addAllocationPool(BufferPool pool, uint size, uint minBuffers, uint maxBuffers)
	{
		gst_query_add_allocation_pool(gstQuery, (pool is null) ? null : pool.getBufferPoolStruct(), size, minBuffers, maxBuffers);
	}

	/**
	 * Set the buffering-ranges array field in @query. The current last
	 * start position of the array should be inferior to @start.
	 *
	 * Params:
	 *     start = start position of the range
	 *     stop = stop position of the range
	 *
	 * Returns: a #gboolean indicating if the range was added or not.
	 */
	public bool addBufferingRange(long start, long stop)
	{
		return gst_query_add_buffering_range(gstQuery, start, stop) != 0;
	}

	/**
	 * Add @mode as one of the supported scheduling modes to @query.
	 *
	 * Params:
	 *     mode = a #GstPadMode
	 */
	public void addSchedulingMode(GstPadMode mode)
	{
		gst_query_add_scheduling_mode(gstQuery, mode);
	}

	/**
	 * Check if @query has metadata @api set. When this function returns %TRUE,
	 * @index will contain the index where the requested API and the parameters
	 * can be found.
	 *
	 * Params:
	 *     api = the metadata API
	 *     index = the index
	 *
	 * Returns: %TRUE when @api is in the list of metadata.
	 */
	public bool findAllocationMeta(GType api, out uint index)
	{
		return gst_query_find_allocation_meta(gstQuery, api, &index) != 0;
	}

	/**
	 * Retrieve the number of values currently stored in the
	 * meta API array of the query's structure.
	 *
	 * Returns: the metadata API array size as a #guint.
	 */
	public uint getNAllocationMetas()
	{
		return gst_query_get_n_allocation_metas(gstQuery);
	}

	/**
	 * Retrieve the number of values currently stored in the
	 * allocator params array of the query's structure.
	 *
	 * If no memory allocator is specified, the downstream element can handle
	 * the default memory allocator. The first memory allocator in the query
	 * should be generic and allow mapping to system memory, all following
	 * allocators should be ordered by preference with the preferred one first.
	 *
	 * Returns: the allocator array size as a #guint.
	 */
	public uint getNAllocationParams()
	{
		return gst_query_get_n_allocation_params(gstQuery);
	}

	/**
	 * Retrieve the number of values currently stored in the
	 * pool array of the query's structure.
	 *
	 * Returns: the pool array size as a #guint.
	 */
	public uint getNAllocationPools()
	{
		return gst_query_get_n_allocation_pools(gstQuery);
	}

	/**
	 * Retrieve the number of values currently stored in the
	 * buffered-ranges array of the query's structure.
	 *
	 * Returns: the range array size as a #guint.
	 */
	public uint getNBufferingRanges()
	{
		return gst_query_get_n_buffering_ranges(gstQuery);
	}

	/**
	 * Retrieve the number of values currently stored in the
	 * scheduling mode array of the query's structure.
	 *
	 * Returns: the scheduling mode array size as a #guint.
	 */
	public uint getNSchedulingModes()
	{
		return gst_query_get_n_scheduling_modes(gstQuery);
	}

	/**
	 * Get the structure of a query.
	 *
	 * Returns: the #GstStructure of the query. The structure is
	 *     still owned by the query and will therefore be freed when the query
	 *     is unreffed.
	 */
	public Structure getStructure()
	{
		auto p = gst_query_get_structure(gstQuery);

		if(p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(Structure)(cast(GstStructure*) p);
	}

	/**
	 * Check if @query has scheduling mode set.
	 *
	 * > When checking if upstream supports pull mode, it is usually not
	 * > enough to just check for GST_PAD_MODE_PULL with this function, you
	 * > also want to check whether the scheduling flags returned by
	 * > gst_query_parse_scheduling() have the seeking flag set (meaning
	 * > random access is supported, not only sequential pulls).
	 *
	 * Params:
	 *     mode = the scheduling mode
	 *
	 * Returns: %TRUE when @mode is in the list of scheduling modes.
	 */
	public bool hasSchedulingMode(GstPadMode mode)
	{
		return gst_query_has_scheduling_mode(gstQuery, mode) != 0;
	}

	/**
	 * Check if @query has scheduling mode set and @flags is set in
	 * query scheduling flags.
	 *
	 * Params:
	 *     mode = the scheduling mode
	 *     flags = #GstSchedulingFlags
	 *
	 * Returns: %TRUE when @mode is in the list of scheduling modes
	 *     and @flags are compatible with query flags.
	 */
	public bool hasSchedulingModeWithFlags(GstPadMode mode, GstSchedulingFlags flags)
	{
		return gst_query_has_scheduling_mode_with_flags(gstQuery, mode, flags) != 0;
	}

	/**
	 * Get the caps from @query. The caps remains valid as long as @query remains
	 * valid.
	 *
	 * Params:
	 *     caps = A pointer to the caps
	 */
	public void parseAcceptCaps(out Caps caps)
	{
		GstCaps* outcaps = null;

		gst_query_parse_accept_caps(gstQuery, &outcaps);

		caps = ObjectG.getDObject!(Caps)(outcaps);
	}

	/**
	 * Parse the result from @query and store in @result.
	 *
	 * Params:
	 *     result = location for the result
	 */
	public void parseAcceptCapsResult(ref bool result)
	{
		int outresult = (result ? 1 : 0);

		gst_query_parse_accept_caps_result(gstQuery, &outresult);

		result = (outresult == 1);
	}

	/**
	 * Parse an allocation query, writing the requested caps in @caps and
	 * whether a pool is needed in @need_pool, if the respective parameters
	 * are non-%NULL.
	 *
	 * Pool details can be retrieved using gst_query_get_n_allocation_pools() and
	 * gst_query_parse_nth_allocation_pool().
	 *
	 * Params:
	 *     caps = The #GstCaps
	 *     needPool = Whether a #GstBufferPool is needed
	 */
	public void parseAllocation(out Caps caps, out bool needPool)
	{
		GstCaps* outcaps = null;
		int outneedPool;

		gst_query_parse_allocation(gstQuery, &outcaps, &outneedPool);

		caps = ObjectG.getDObject!(Caps)(outcaps);
		needPool = (outneedPool == 1);
	}

	/**
	 * Get the percentage of buffered data. This is a value between 0 and 100.
	 * The @busy indicator is %TRUE when the buffering is in progress.
	 *
	 * Params:
	 *     busy = if buffering is busy, or %NULL
	 *     percent = a buffering percent, or %NULL
	 */
	public void parseBufferingPercent(out bool busy, out int percent)
	{
		int outbusy;

		gst_query_parse_buffering_percent(gstQuery, &outbusy, &percent);

		busy = (outbusy == 1);
	}

	/**
	 * Parse an available query, writing the format into @format, and
	 * other results into the passed parameters, if the respective parameters
	 * are non-%NULL
	 *
	 * Params:
	 *     format = the format to set for the @segment_start
	 *         and @segment_end values, or %NULL
	 *     start = the start to set, or %NULL
	 *     stop = the stop to set, or %NULL
	 *     estimatedTotal = estimated total amount of download
	 *         time remaining in milliseconds, or %NULL
	 */
	public void parseBufferingRange(out GstFormat format, out long start, out long stop, out long estimatedTotal)
	{
		gst_query_parse_buffering_range(gstQuery, &format, &start, &stop, &estimatedTotal);
	}

	/**
	 * Extracts the buffering stats values from @query.
	 *
	 * Params:
	 *     mode = a buffering mode, or %NULL
	 *     avgIn = the average input rate, or %NULL
	 *     avgOut = the average output rat, or %NULL
	 *     bufferingLeft = amount of buffering time left in
	 *         milliseconds, or %NULL
	 */
	public void parseBufferingStats(out GstBufferingMode mode, out int avgIn, out int avgOut, out long bufferingLeft)
	{
		gst_query_parse_buffering_stats(gstQuery, &mode, &avgIn, &avgOut, &bufferingLeft);
	}

	/**
	 * Get the filter from the caps @query. The caps remains valid as long as
	 * @query remains valid.
	 *
	 * Params:
	 *     filter = A pointer to the caps filter
	 */
	public void parseCaps(out Caps filter)
	{
		GstCaps* outfilter = null;

		gst_query_parse_caps(gstQuery, &outfilter);

		filter = ObjectG.getDObject!(Caps)(outfilter);
	}

	/**
	 * Get the caps result from @query. The caps remains valid as long as
	 * @query remains valid.
	 *
	 * Params:
	 *     caps = A pointer to the caps
	 */
	public void parseCapsResult(out Caps caps)
	{
		GstCaps* outcaps = null;

		gst_query_parse_caps_result(gstQuery, &outcaps);

		caps = ObjectG.getDObject!(Caps)(outcaps);
	}

	/**
	 * Get the context from the context @query. The context remains valid as long as
	 * @query remains valid.
	 *
	 * Params:
	 *     context = A pointer to store the #GstContext
	 *
	 * Since: 1.2
	 */
	public void parseContext(out Context context)
	{
		GstContext* outcontext = null;

		gst_query_parse_context(gstQuery, &outcontext);

		context = ObjectG.getDObject!(Context)(outcontext);
	}

	/**
	 * Parse a context type from an existing GST_QUERY_CONTEXT query.
	 *
	 * Params:
	 *     contextType = the context type, or %NULL
	 *
	 * Returns: a #gboolean indicating if the parsing succeeded.
	 *
	 * Since: 1.2
	 */
	public bool parseContextType(out string contextType)
	{
		char* outcontextType = null;

		auto p = gst_query_parse_context_type(gstQuery, &outcontextType) != 0;

		contextType = Str.toString(outcontextType);

		return p;
	}

	/**
	 * Parse a convert query answer. Any of @src_format, @src_value, @dest_format,
	 * and @dest_value may be %NULL, in which case that value is omitted.
	 *
	 * Params:
	 *     srcFormat = the storage for the #GstFormat of the
	 *         source value, or %NULL
	 *     srcValue = the storage for the source value, or %NULL
	 *     destFormat = the storage for the #GstFormat of the
	 *         destination value, or %NULL
	 *     destValue = the storage for the destination value,
	 *         or %NULL
	 */
	public void parseConvert(out GstFormat srcFormat, out long srcValue, out GstFormat destFormat, out long destValue)
	{
		gst_query_parse_convert(gstQuery, &srcFormat, &srcValue, &destFormat, &destValue);
	}

	/**
	 * Parse a duration query answer. Write the format of the duration into @format,
	 * and the value into @duration, if the respective variables are non-%NULL.
	 *
	 * Params:
	 *     format = the storage for the #GstFormat of the duration
	 *         value, or %NULL.
	 *     duration = the storage for the total duration, or %NULL.
	 */
	public void parseDuration(out GstFormat format, out long duration)
	{
		gst_query_parse_duration(gstQuery, &format, &duration);
	}

	/**
	 * Parse a latency query answer.
	 *
	 * Params:
	 *     live = storage for live or %NULL
	 *     minLatency = the storage for the min latency or %NULL
	 *     maxLatency = the storage for the max latency or %NULL
	 */
	public void parseLatency(out bool live, out GstClockTime minLatency, out GstClockTime maxLatency)
	{
		int outlive;

		gst_query_parse_latency(gstQuery, &outlive, &minLatency, &maxLatency);

		live = (outlive == 1);
	}

	/**
	 * Parse the number of formats in the formats @query.
	 *
	 * Params:
	 *     nFormats = the number of formats in this query.
	 */
	public void parseNFormats(out uint nFormats)
	{
		gst_query_parse_n_formats(gstQuery, &nFormats);
	}

	/**
	 * Parse an available query and get the metadata API
	 * at @index of the metadata API array.
	 *
	 * Params:
	 *     index = position in the metadata API array to read
	 *     params = API specific parameters
	 *
	 * Returns: a #GType of the metadata API at @index.
	 */
	public GType parseNthAllocationMeta(uint index, out Structure params)
	{
		GstStructure* outparams = null;

		auto p = gst_query_parse_nth_allocation_meta(gstQuery, index, &outparams);

		params = ObjectG.getDObject!(Structure)(outparams);

		return p;
	}

	/**
	 * Parse an available query and get the allocator and its params
	 * at @index of the allocator array.
	 *
	 * Params:
	 *     index = position in the allocator array to read
	 *     allocator = variable to hold the result
	 *     params = parameters for the allocator
	 */
	public void parseNthAllocationParam(uint index, out Allocator allocator, out AllocationParams params)
	{
		GstAllocator* outallocator = null;
		GstAllocationParams* outparams = sliceNew!GstAllocationParams();

		gst_query_parse_nth_allocation_param(gstQuery, index, &outallocator, outparams);

		allocator = ObjectG.getDObject!(Allocator)(outallocator);
		params = ObjectG.getDObject!(AllocationParams)(outparams, true);
	}

	/**
	 * Get the pool parameters in @query.
	 *
	 * Unref @pool with gst_object_unref() when it's not needed any more.
	 *
	 * Params:
	 *     index = index to parse
	 *     pool = the #GstBufferPool
	 *     size = the buffer size
	 *     minBuffers = the min buffers
	 *     maxBuffers = the max buffers
	 */
	public void parseNthAllocationPool(uint index, out BufferPool pool, out uint size, out uint minBuffers, out uint maxBuffers)
	{
		GstBufferPool* outpool = null;

		gst_query_parse_nth_allocation_pool(gstQuery, index, &outpool, &size, &minBuffers, &maxBuffers);

		pool = ObjectG.getDObject!(BufferPool)(outpool);
	}

	/**
	 * Parse an available query and get the start and stop values stored
	 * at the @index of the buffered ranges array.
	 *
	 * Params:
	 *     index = position in the buffered-ranges array to read
	 *     start = the start position to set, or %NULL
	 *     stop = the stop position to set, or %NULL
	 *
	 * Returns: a #gboolean indicating if the parsing succeeded.
	 */
	public bool parseNthBufferingRange(uint index, out long start, out long stop)
	{
		return gst_query_parse_nth_buffering_range(gstQuery, index, &start, &stop) != 0;
	}

	/**
	 * Parse the format query and retrieve the @nth format from it into
	 * @format. If the list contains less elements than @nth, @format will be
	 * set to GST_FORMAT_UNDEFINED.
	 *
	 * Params:
	 *     nth = the nth format to retrieve.
	 *     format = a pointer to store the nth format
	 */
	public void parseNthFormat(uint nth, out GstFormat format)
	{
		gst_query_parse_nth_format(gstQuery, nth, &format);
	}

	/**
	 * Parse an available query and get the scheduling mode
	 * at @index of the scheduling modes array.
	 *
	 * Params:
	 *     index = position in the scheduling modes array to read
	 *
	 * Returns: a #GstPadMode of the scheduling mode at @index.
	 */
	public GstPadMode parseNthSchedulingMode(uint index)
	{
		return gst_query_parse_nth_scheduling_mode(gstQuery, index);
	}

	/**
	 * Parse a position query, writing the format into @format, and the position
	 * into @cur, if the respective parameters are non-%NULL.
	 *
	 * Params:
	 *     format = the storage for the #GstFormat of the
	 *         position values (may be %NULL)
	 *     cur = the storage for the current position (may be %NULL)
	 */
	public void parsePosition(out GstFormat format, out long cur)
	{
		gst_query_parse_position(gstQuery, &format, &cur);
	}

	/**
	 * Set the scheduling properties.
	 *
	 * Params:
	 *     flags = #GstSchedulingFlags
	 *     minsize = the suggested minimum size of pull requests
	 *     maxsize = the suggested maximum size of pull requests:
	 *     alig = the suggested alignment of pull requests
	 */
	public void parseScheduling(out GstSchedulingFlags flags, out int minsize, out int maxsize, out int alig)
	{
		gst_query_parse_scheduling(gstQuery, &flags, &minsize, &maxsize, &alig);
	}

	/**
	 * Parse a seeking query, writing the format into @format, and
	 * other results into the passed parameters, if the respective parameters
	 * are non-%NULL
	 *
	 * Params:
	 *     format = the format to set for the @segment_start
	 *         and @segment_end values, or %NULL
	 *     seekable = the seekable flag to set, or %NULL
	 *     segmentStart = the segment_start to set, or %NULL
	 *     segmentEnd = the segment_end to set, or %NULL
	 */
	public void parseSeeking(out GstFormat format, out bool seekable, out long segmentStart, out long segmentEnd)
	{
		int outseekable;

		gst_query_parse_seeking(gstQuery, &format, &outseekable, &segmentStart, &segmentEnd);

		seekable = (outseekable == 1);
	}

	/**
	 * Parse a segment query answer. Any of @rate, @format, @start_value, and
	 * @stop_value may be %NULL, which will cause this value to be omitted.
	 *
	 * See gst_query_set_segment() for an explanation of the function arguments.
	 *
	 * Params:
	 *     rate = the storage for the rate of the segment, or %NULL
	 *     format = the storage for the #GstFormat of the values,
	 *         or %NULL
	 *     startValue = the storage for the start value, or %NULL
	 *     stopValue = the storage for the stop value, or %NULL
	 */
	public void parseSegment(out double rate, out GstFormat format, out long startValue, out long stopValue)
	{
		gst_query_parse_segment(gstQuery, &rate, &format, &startValue, &stopValue);
	}

	/**
	 * Parse an URI query, writing the URI into @uri as a newly
	 * allocated string, if the respective parameters are non-%NULL.
	 * Free the string with g_free() after usage.
	 *
	 * Params:
	 *     uri = the storage for the current URI
	 *         (may be %NULL)
	 */
	public void parseUri(out string uri)
	{
		char* outuri = null;

		gst_query_parse_uri(gstQuery, &outuri);

		uri = Str.toString(outuri);
	}

	/**
	 * Parse an URI query, writing the URI into @uri as a newly
	 * allocated string, if the respective parameters are non-%NULL.
	 * Free the string with g_free() after usage.
	 *
	 * Params:
	 *     uri = the storage for the redirect URI
	 *         (may be %NULL)
	 *
	 * Since: 1.2
	 */
	public void parseUriRedirection(out string uri)
	{
		char* outuri = null;

		gst_query_parse_uri_redirection(gstQuery, &outuri);

		uri = Str.toString(outuri);
	}

	/**
	 * Parse an URI query, and set @permanent to %TRUE if there is a redirection
	 * and it should be considered permanent. If a redirection is permanent,
	 * applications should update their internal storage of the URI, otherwise
	 * they should make all future requests to the original URI.
	 *
	 * Params:
	 *     permanent = if the URI redirection is permanent
	 *         (may be %NULL)
	 *
	 * Since: 1.4
	 */
	public void parseUriRedirectionPermanent(out bool permanent)
	{
		int outpermanent;

		gst_query_parse_uri_redirection_permanent(gstQuery, &outpermanent);

		permanent = (outpermanent == 1);
	}

	/**
	 * Remove the metadata API at @index of the metadata API array.
	 *
	 * Params:
	 *     index = position in the metadata API array to remove
	 */
	public void removeNthAllocationMeta(uint index)
	{
		gst_query_remove_nth_allocation_meta(gstQuery, index);
	}

	/**
	 * Remove the allocation param at @index of the allocation param array.
	 *
	 * Params:
	 *     index = position in the allocation param array to remove
	 *
	 * Since: 1.2
	 */
	public void removeNthAllocationParam(uint index)
	{
		gst_query_remove_nth_allocation_param(gstQuery, index);
	}

	/**
	 * Remove the allocation pool at @index of the allocation pool array.
	 *
	 * Params:
	 *     index = position in the allocation pool array to remove
	 *
	 * Since: 1.2
	 */
	public void removeNthAllocationPool(uint index)
	{
		gst_query_remove_nth_allocation_pool(gstQuery, index);
	}

	/**
	 * Set @result as the result for the @query.
	 *
	 * Params:
	 *     result = the result to set
	 */
	public void setAcceptCapsResult(bool result)
	{
		gst_query_set_accept_caps_result(gstQuery, result);
	}

	/**
	 * Set the percentage of buffered data. This is a value between 0 and 100.
	 * The @busy indicator is %TRUE when the buffering is in progress.
	 *
	 * Params:
	 *     busy = if buffering is busy
	 *     percent = a buffering percent
	 */
	public void setBufferingPercent(bool busy, int percent)
	{
		gst_query_set_buffering_percent(gstQuery, busy, percent);
	}

	/**
	 * Set the available query result fields in @query.
	 *
	 * Params:
	 *     format = the format to set for the @start and @stop values
	 *     start = the start to set
	 *     stop = the stop to set
	 *     estimatedTotal = estimated total amount of download time remaining in
	 *         milliseconds
	 */
	public void setBufferingRange(GstFormat format, long start, long stop, long estimatedTotal)
	{
		gst_query_set_buffering_range(gstQuery, format, start, stop, estimatedTotal);
	}

	/**
	 * Configures the buffering stats values in @query.
	 *
	 * Params:
	 *     mode = a buffering mode
	 *     avgIn = the average input rate
	 *     avgOut = the average output rate
	 *     bufferingLeft = amount of buffering time left in milliseconds
	 */
	public void setBufferingStats(GstBufferingMode mode, int avgIn, int avgOut, long bufferingLeft)
	{
		gst_query_set_buffering_stats(gstQuery, mode, avgIn, avgOut, bufferingLeft);
	}

	/**
	 * Set the @caps result in @query.
	 *
	 * Params:
	 *     caps = A pointer to the caps
	 */
	public void setCapsResult(Caps caps)
	{
		gst_query_set_caps_result(gstQuery, (caps is null) ? null : caps.getCapsStruct());
	}

	/**
	 * Answer a context query by setting the requested context.
	 *
	 * Params:
	 *     context = the requested #GstContext
	 *
	 * Since: 1.2
	 */
	public void setContext(Context context)
	{
		gst_query_set_context(gstQuery, (context is null) ? null : context.getContextStruct());
	}

	/**
	 * Answer a convert query by setting the requested values.
	 *
	 * Params:
	 *     srcFormat = the source #GstFormat
	 *     srcValue = the source value
	 *     destFormat = the destination #GstFormat
	 *     destValue = the destination value
	 */
	public void setConvert(GstFormat srcFormat, long srcValue, GstFormat destFormat, long destValue)
	{
		gst_query_set_convert(gstQuery, srcFormat, srcValue, destFormat, destValue);
	}

	/**
	 * Answer a duration query by setting the requested value in the given format.
	 *
	 * Params:
	 *     format = the #GstFormat for the duration
	 *     duration = the duration of the stream
	 */
	public void setDuration(GstFormat format, long duration)
	{
		gst_query_set_duration(gstQuery, format, duration);
	}

	/**
	 * Set the formats query result fields in @query. The number of formats passed
	 * in the @formats array must be equal to @n_formats.
	 *
	 * Params:
	 *     formats = an array containing @n_formats
	 *         @GstFormat values.
	 */
	public void setFormatsv(GstFormat[] formats)
	{
		gst_query_set_formatsv(gstQuery, cast(int)formats.length, formats.ptr);
	}

	/**
	 * Answer a latency query by setting the requested values in the given format.
	 *
	 * Params:
	 *     live = if there is a live element upstream
	 *     minLatency = the minimal latency of the upstream elements
	 *     maxLatency = the maximal latency of the upstream elements
	 */
	public void setLatency(bool live, GstClockTime minLatency, GstClockTime maxLatency)
	{
		gst_query_set_latency(gstQuery, live, minLatency, maxLatency);
	}

	/**
	 * Parse an available query and get the allocator and its params
	 * at @index of the allocator array.
	 *
	 * Params:
	 *     index = position in the allocator array to set
	 *     allocator = new allocator to set
	 *     params = parameters for the allocator
	 */
	public void setNthAllocationParam(uint index, Allocator allocator, AllocationParams params)
	{
		gst_query_set_nth_allocation_param(gstQuery, index, (allocator is null) ? null : allocator.getAllocatorStruct(), (params is null) ? null : params.getAllocationParamsStruct());
	}

	/**
	 * Set the pool parameters in @query.
	 *
	 * Params:
	 *     index = index to modify
	 *     pool = the #GstBufferPool
	 *     size = the size
	 *     minBuffers = the min buffers
	 *     maxBuffers = the max buffers
	 */
	public void setNthAllocationPool(uint index, BufferPool pool, uint size, uint minBuffers, uint maxBuffers)
	{
		gst_query_set_nth_allocation_pool(gstQuery, index, (pool is null) ? null : pool.getBufferPoolStruct(), size, minBuffers, maxBuffers);
	}

	/**
	 * Answer a position query by setting the requested value in the given format.
	 *
	 * Params:
	 *     format = the requested #GstFormat
	 *     cur = the position to set
	 */
	public void setPosition(GstFormat format, long cur)
	{
		gst_query_set_position(gstQuery, format, cur);
	}

	/**
	 * Set the scheduling properties.
	 *
	 * Params:
	 *     flags = #GstSchedulingFlags
	 *     minsize = the suggested minimum size of pull requests
	 *     maxsize = the suggested maximum size of pull requests
	 *     alig = the suggested alignment of pull requests
	 */
	public void setScheduling(GstSchedulingFlags flags, int minsize, int maxsize, int alig)
	{
		gst_query_set_scheduling(gstQuery, flags, minsize, maxsize, alig);
	}

	/**
	 * Set the seeking query result fields in @query.
	 *
	 * Params:
	 *     format = the format to set for the @segment_start and @segment_end values
	 *     seekable = the seekable flag to set
	 *     segmentStart = the segment_start to set
	 *     segmentEnd = the segment_end to set
	 */
	public void setSeeking(GstFormat format, bool seekable, long segmentStart, long segmentEnd)
	{
		gst_query_set_seeking(gstQuery, format, seekable, segmentStart, segmentEnd);
	}

	/**
	 * Answer a segment query by setting the requested values. The normal
	 * playback segment of a pipeline is 0 to duration at the default rate of
	 * 1.0. If a seek was performed on the pipeline to play a different
	 * segment, this query will return the range specified in the last seek.
	 *
	 * @start_value and @stop_value will respectively contain the configured
	 * playback range start and stop values expressed in @format.
	 * The values are always between 0 and the duration of the media and
	 * @start_value <= @stop_value. @rate will contain the playback rate. For
	 * negative rates, playback will actually happen from @stop_value to
	 * @start_value.
	 *
	 * Params:
	 *     rate = the rate of the segment
	 *     format = the #GstFormat of the segment values (@start_value and @stop_value)
	 *     startValue = the start value
	 *     stopValue = the stop value
	 */
	public void setSegment(double rate, GstFormat format, long startValue, long stopValue)
	{
		gst_query_set_segment(gstQuery, rate, format, startValue, stopValue);
	}

	/**
	 * Answer a URI query by setting the requested URI.
	 *
	 * Params:
	 *     uri = the URI to set
	 */
	public void setUri(string uri)
	{
		gst_query_set_uri(gstQuery, Str.toStringz(uri));
	}

	/**
	 * Answer a URI query by setting the requested URI redirection.
	 *
	 * Params:
	 *     uri = the URI to set
	 *
	 * Since: 1.2
	 */
	public void setUriRedirection(string uri)
	{
		gst_query_set_uri_redirection(gstQuery, Str.toStringz(uri));
	}

	/**
	 * Answer a URI query by setting the requested URI redirection
	 * to permanent or not.
	 *
	 * Params:
	 *     permanent = whether the redirect is permanent or not
	 *
	 * Since: 1.4
	 */
	public void setUriRedirectionPermanent(bool permanent)
	{
		gst_query_set_uri_redirection_permanent(gstQuery, permanent);
	}

	/**
	 * Get the structure of a query. This method should be called with a writable
	 * @query so that the returned structure is guaranteed to be writable.
	 *
	 * Returns: the #GstStructure of the query. The structure is
	 *     still owned by the query and will therefore be freed when the query
	 *     is unreffed.
	 */
	public Structure writableStructure()
	{
		auto p = gst_query_writable_structure(gstQuery);

		if(p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(Structure)(cast(GstStructure*) p);
	}

	/**
	 * Gets the #GstQueryTypeFlags associated with @type.
	 *
	 * Params:
	 *     type = a #GstQueryType
	 *
	 * Returns: a #GstQueryTypeFlags.
	 */
	public static GstQueryTypeFlags typeGetFlags(GstQueryType type)
	{
		return gst_query_type_get_flags(type);
	}

	/**
	 * Get a printable name for the given query type. Do not modify or free.
	 *
	 * Params:
	 *     type = the query type
	 *
	 * Returns: a reference to the static name of the query.
	 */
	public static string typeGetName(GstQueryType type)
	{
		return Str.toString(gst_query_type_get_name(type));
	}

	/**
	 * Get the unique quark for the given query type.
	 *
	 * Params:
	 *     type = the query type
	 *
	 * Returns: the quark associated with the query type
	 */
	public static GQuark typeToQuark(GstQueryType type)
	{
		return gst_query_type_to_quark(type);
	}
}