1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = gstreamer-GstValue.html
27  * outPack = gstreamer
28  * outFile = Value
29  * strct   = 
30  * realStrct=
31  * ctorStrct=
32  * clss    = ValueGst
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gst_value_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- glib.Str
47  * 	- gobject.Value
48  * 	- gstreamer.Caps
49  * 	- gstreamer.CapsFeatures
50  * 	- gstreamer.Structure
51  * structWrap:
52  * 	- GValue* -> Value
53  * 	- GstCaps* -> Caps
54  * 	- GstCapsFeatures* -> CapsFeatures
55  * 	- GstStructure* -> Structure
56  * module aliases:
57  * local aliases:
58  * overrides:
59  */
60 
61 module gstreamer.Value;
62 
63 public  import gstreamerc.gstreamertypes;
64 
65 private import gstreamerc.gstreamer;
66 private import glib.ConstructionException;
67 private import gobject.ObjectG;
68 
69 
70 private import glib.Str;
71 private import gobject.Value;
72 private import gstreamer.Caps;
73 private import gstreamer.CapsFeatures;
74 private import gstreamer.Structure;
75 
76 
77 
78 
79 /**
80  * GValue implementations specific to GStreamer.
81  *
82  * Note that operations on the same GValue from multiple threads may lead to
83  * undefined behaviour.
84  *
85  * Last reviewed on 2008-03-11 (0.10.18)
86  */
87 public class ValueGst
88 {
89 	
90 	/**
91 	 */
92 	
93 	/**
94 	 * Sets value to the range specified by start and end.
95 	 * Params:
96 	 * value = a GValue initialized to GST_TYPE_INT_RANGE
97 	 * start = the start of the range
98 	 * end = the end of the range
99 	 */
100 	public static void setIntRange(Value value, int start, int end)
101 	{
102 		// void gst_value_set_int_range (GValue *value,  gint start,  gint end);
103 		gst_value_set_int_range((value is null) ? null : value.getValueStruct(), start, end);
104 	}
105 	
106 	/**
107 	 * Gets the minimum of the range specified by value.
108 	 * Params:
109 	 * value = a GValue initialized to GST_TYPE_INT_RANGE
110 	 * Returns: the minimum of the range
111 	 */
112 	public static int getIntRangeMin(Value value)
113 	{
114 		// gint gst_value_get_int_range_min (const GValue *value);
115 		return gst_value_get_int_range_min((value is null) ? null : value.getValueStruct());
116 	}
117 	
118 	/**
119 	 * Gets the maximum of the range specified by value.
120 	 * Params:
121 	 * value = a GValue initialized to GST_TYPE_INT_RANGE
122 	 * Returns: the maxumum of the range
123 	 */
124 	public static int getIntRangeMax(Value value)
125 	{
126 		// gint gst_value_get_int_range_max (const GValue *value);
127 		return gst_value_get_int_range_max((value is null) ? null : value.getValueStruct());
128 	}
129 	
130 	/**
131 	 * Sets value to the range specified by start, end and step.
132 	 * Params:
133 	 * value = a GValue initialized to GST_TYPE_INT_RANGE
134 	 * start = the start of the range
135 	 * end = the end of the range
136 	 * step = the step of the range
137 	 */
138 	public static void setIntRangeStep(Value value, int start, int end, int step)
139 	{
140 		// void gst_value_set_int_range_step (GValue *value,  gint start,  gint end,  gint step);
141 		gst_value_set_int_range_step((value is null) ? null : value.getValueStruct(), start, end, step);
142 	}
143 	
144 	/**
145 	 * Gets the step of the range specified by value.
146 	 * Params:
147 	 * value = a GValue initialized to GST_TYPE_INT_RANGE
148 	 * Returns: the step of the range
149 	 */
150 	public static int getIntRangeStep(Value value)
151 	{
152 		// gint gst_value_get_int_range_step (const GValue *value);
153 		return gst_value_get_int_range_step((value is null) ? null : value.getValueStruct());
154 	}
155 	
156 	/**
157 	 * Sets value to the bitmask specified by bitmask.
158 	 * Params:
159 	 * value = a GValue initialized to GST_TYPE_BITMASK
160 	 * bitmask = the bitmask
161 	 */
162 	public static void setBitmask(Value value, ulong bitmask)
163 	{
164 		// void gst_value_set_bitmask (GValue *value,  guint64 bitmask);
165 		gst_value_set_bitmask((value is null) ? null : value.getValueStruct(), bitmask);
166 	}
167 	
168 	/**
169 	 * Gets the bitmask specified by value.
170 	 * Params:
171 	 * value = a GValue initialized to GST_TYPE_BITMASK
172 	 * Returns: the bitmask.
173 	 */
174 	public static ulong getBitmask(Value value)
175 	{
176 		// guint64 gst_value_get_bitmask (const GValue *value);
177 		return gst_value_get_bitmask((value is null) ? null : value.getValueStruct());
178 	}
179 	
180 	/**
181 	 * Sets value to the range specified by start and end.
182 	 * Params:
183 	 * value = a GValue initialized to GST_TYPE_INT64_RANGE
184 	 * start = the start of the range
185 	 * end = the end of the range
186 	 */
187 	public static void setInt64_Range(Value value, long start, long end)
188 	{
189 		// void gst_value_set_int64_range (GValue *value,  gint64 start,  gint64 end);
190 		gst_value_set_int64_range((value is null) ? null : value.getValueStruct(), start, end);
191 	}
192 	
193 	/**
194 	 * Gets the minimum of the range specified by value.
195 	 * Params:
196 	 * value = a GValue initialized to GST_TYPE_INT64_RANGE
197 	 * Returns: the minimum of the range
198 	 */
199 	public static long getInt64_RangeMin(Value value)
200 	{
201 		// gint64 gst_value_get_int64_range_min (const GValue *value);
202 		return gst_value_get_int64_range_min((value is null) ? null : value.getValueStruct());
203 	}
204 	
205 	/**
206 	 * Gets the maximum of the range specified by value.
207 	 * Params:
208 	 * value = a GValue initialized to GST_TYPE_INT64_RANGE
209 	 * Returns: the maxumum of the range
210 	 */
211 	public static long getInt64_RangeMax(Value value)
212 	{
213 		// gint64 gst_value_get_int64_range_max (const GValue *value);
214 		return gst_value_get_int64_range_max((value is null) ? null : value.getValueStruct());
215 	}
216 	
217 	/**
218 	 * Sets value to the range specified by start, end and step.
219 	 * Params:
220 	 * value = a GValue initialized to GST_TYPE_INT64_RANGE
221 	 * start = the start of the range
222 	 * end = the end of the range
223 	 * step = the step of the range
224 	 */
225 	public static void setInt64_RangeStep(Value value, long start, long end, long step)
226 	{
227 		// void gst_value_set_int64_range_step (GValue *value,  gint64 start,  gint64 end,  gint64 step);
228 		gst_value_set_int64_range_step((value is null) ? null : value.getValueStruct(), start, end, step);
229 	}
230 	
231 	/**
232 	 * Gets the step of the range specified by value.
233 	 * Params:
234 	 * value = a GValue initialized to GST_TYPE_INT64_RANGE
235 	 * Returns: the step of the range
236 	 */
237 	public static long getInt64_RangeStep(Value value)
238 	{
239 		// gint64 gst_value_get_int64_range_step (const GValue *value);
240 		return gst_value_get_int64_range_step((value is null) ? null : value.getValueStruct());
241 	}
242 	
243 	/**
244 	 * Sets value to the range specified by start and end.
245 	 * Params:
246 	 * value = a GValue initialized to GST_TYPE_DOUBLE_RANGE
247 	 * start = the start of the range
248 	 * end = the end of the range
249 	 */
250 	public static void setDoubleRange(Value value, double start, double end)
251 	{
252 		// void gst_value_set_double_range (GValue *value,  gdouble start,  gdouble end);
253 		gst_value_set_double_range((value is null) ? null : value.getValueStruct(), start, end);
254 	}
255 	
256 	/**
257 	 * Gets the minimum of the range specified by value.
258 	 * Params:
259 	 * value = a GValue initialized to GST_TYPE_DOUBLE_RANGE
260 	 * Returns: the minimum of the range
261 	 */
262 	public static double getDoubleRangeMin(Value value)
263 	{
264 		// gdouble gst_value_get_double_range_min (const GValue *value);
265 		return gst_value_get_double_range_min((value is null) ? null : value.getValueStruct());
266 	}
267 	
268 	/**
269 	 * Gets the maximum of the range specified by value.
270 	 * Params:
271 	 * value = a GValue initialized to GST_TYPE_DOUBLE_RANGE
272 	 * Returns: the maxumum of the range
273 	 */
274 	public static double getDoubleRangeMax(Value value)
275 	{
276 		// gdouble gst_value_get_double_range_max (const GValue *value);
277 		return gst_value_get_double_range_max((value is null) ? null : value.getValueStruct());
278 	}
279 	
280 	/**
281 	 * Appends append_value to the GstValueList in value.
282 	 * Params:
283 	 * value = a GValue of type GST_TYPE_LIST
284 	 * appendValue = the value to append. [transfer none]
285 	 */
286 	public static void listAppendValue(Value value, Value appendValue)
287 	{
288 		// void gst_value_list_append_value (GValue *value,  const GValue *append_value);
289 		gst_value_list_append_value((value is null) ? null : value.getValueStruct(), (appendValue is null) ? null : appendValue.getValueStruct());
290 	}
291 	
292 	/**
293 	 * Prepends prepend_value to the GstValueList in value.
294 	 * Params:
295 	 * value = a GValue of type GST_TYPE_LIST
296 	 * prependValue = the value to prepend
297 	 */
298 	public static void listPrependValue(Value value, Value prependValue)
299 	{
300 		// void gst_value_list_prepend_value (GValue *value,  const GValue *prepend_value);
301 		gst_value_list_prepend_value((value is null) ? null : value.getValueStruct(), (prependValue is null) ? null : prependValue.getValueStruct());
302 	}
303 	
304 	/**
305 	 * Concatenates copies of value1 and value2 into a list. Values that are not
306 	 * of type GST_TYPE_LIST are treated as if they were lists of length 1.
307 	 * dest will be initialized to the type GST_TYPE_LIST.
308 	 * Params:
309 	 * dest = an uninitialized GValue to take the result. [out caller-allocates]
310 	 * value1 = a GValue
311 	 * value2 = a GValue
312 	 */
313 	public static void listConcat(Value dest, Value value1, Value value2)
314 	{
315 		// void gst_value_list_concat (GValue *dest,  const GValue *value1,  const GValue *value2);
316 		gst_value_list_concat((dest is null) ? null : dest.getValueStruct(), (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct());
317 	}
318 	
319 	/**
320 	 * Merges copies of value1 and value2. Values that are not
321 	 * of type GST_TYPE_LIST are treated as if they were lists of length 1.
322 	 * The result will be put into dest and will either be a list that will not
323 	 * contain any duplicates, or a non-list type (if value1 and value2
324 	 * were equal).
325 	 * Params:
326 	 * dest = an uninitialized GValue to take the result. [out caller-allocates]
327 	 * value1 = a GValue
328 	 * value2 = a GValue
329 	 */
330 	public static void listMerge(Value dest, Value value1, Value value2)
331 	{
332 		// void gst_value_list_merge (GValue *dest,  const GValue *value1,  const GValue *value2);
333 		gst_value_list_merge((dest is null) ? null : dest.getValueStruct(), (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct());
334 	}
335 	
336 	/**
337 	 * Gets the number of values contained in value.
338 	 * Params:
339 	 * value = a GValue of type GST_TYPE_LIST
340 	 * Returns: the number of values
341 	 */
342 	public static uint listGetSize(Value value)
343 	{
344 		// guint gst_value_list_get_size (const GValue *value);
345 		return gst_value_list_get_size((value is null) ? null : value.getValueStruct());
346 	}
347 	
348 	/**
349 	 * Gets the value that is a member of the list contained in value and
350 	 * has the index index.
351 	 * Params:
352 	 * value = a GValue of type GST_TYPE_LIST
353 	 * index = index of value to get from the list
354 	 * Returns: the value at the given index. [transfer none]
355 	 */
356 	public static Value listGetValue(Value value, uint index)
357 	{
358 		// const GValue * gst_value_list_get_value (const GValue *value,  guint index);
359 		auto p = gst_value_list_get_value((value is null) ? null : value.getValueStruct(), index);
360 		
361 		if(p is null)
362 		{
363 			return null;
364 		}
365 		
366 		return ObjectG.getDObject!(Value)(cast(GValue*) p);
367 	}
368 	
369 	/**
370 	 * Sets value to the fraction specified by numerator over denominator.
371 	 * The fraction gets reduced to the smallest numerator and denominator,
372 	 * and if necessary the sign is moved to the numerator.
373 	 * Params:
374 	 * value = a GValue initialized to GST_TYPE_FRACTION
375 	 * numerator = the numerator of the fraction
376 	 * denominator = the denominator of the fraction
377 	 */
378 	public static void setFraction(Value value, int numerator, int denominator)
379 	{
380 		// void gst_value_set_fraction (GValue *value,  gint numerator,  gint denominator);
381 		gst_value_set_fraction((value is null) ? null : value.getValueStruct(), numerator, denominator);
382 	}
383 	
384 	/**
385 	 * Gets the numerator of the fraction specified by value.
386 	 * Params:
387 	 * value = a GValue initialized to GST_TYPE_FRACTION
388 	 * Returns: the numerator of the fraction.
389 	 */
390 	public static int getFractionNumerator(Value value)
391 	{
392 		// gint gst_value_get_fraction_numerator (const GValue *value);
393 		return gst_value_get_fraction_numerator((value is null) ? null : value.getValueStruct());
394 	}
395 	
396 	/**
397 	 * Gets the denominator of the fraction specified by value.
398 	 * Params:
399 	 * value = a GValue initialized to GST_TYPE_FRACTION
400 	 * Returns: the denominator of the fraction.
401 	 */
402 	public static int getFractionDenominator(Value value)
403 	{
404 		// gint gst_value_get_fraction_denominator (const GValue *value);
405 		return gst_value_get_fraction_denominator((value is null) ? null : value.getValueStruct());
406 	}
407 	
408 	/**
409 	 * Multiplies the two GValue items containing a GST_TYPE_FRACTION and sets
410 	 * product to the product of the two fractions.
411 	 * Params:
412 	 * product = a GValue initialized to GST_TYPE_FRACTION
413 	 * factor1 = a GValue initialized to GST_TYPE_FRACTION
414 	 * factor2 = a GValue initialized to GST_TYPE_FRACTION
415 	 * Returns: FALSE in case of an error (like integer overflow), TRUE otherwise.
416 	 */
417 	public static int fractionMultiply(Value product, Value factor1, Value factor2)
418 	{
419 		// gboolean gst_value_fraction_multiply (GValue *product,  const GValue *factor1,  const GValue *factor2);
420 		return gst_value_fraction_multiply((product is null) ? null : product.getValueStruct(), (factor1 is null) ? null : factor1.getValueStruct(), (factor2 is null) ? null : factor2.getValueStruct());
421 	}
422 	
423 	/**
424 	 * Subtracts the subtrahend from the minuend and sets dest to the result.
425 	 * Params:
426 	 * dest = a GValue initialized to GST_TYPE_FRACTION
427 	 * minuend = a GValue initialized to GST_TYPE_FRACTION
428 	 * subtrahend = a GValue initialized to GST_TYPE_FRACTION
429 	 * Returns: FALSE in case of an error (like integer overflow), TRUE otherwise.
430 	 */
431 	public static int fractionSubtract(Value dest, Value minuend, Value subtrahend)
432 	{
433 		// gboolean gst_value_fraction_subtract (GValue *dest,  const GValue *minuend,  const GValue *subtrahend);
434 		return gst_value_fraction_subtract((dest is null) ? null : dest.getValueStruct(), (minuend is null) ? null : minuend.getValueStruct(), (subtrahend is null) ? null : subtrahend.getValueStruct());
435 	}
436 	
437 	/**
438 	 * Sets value to the range specified by start and end.
439 	 * Params:
440 	 * value = a GValue initialized to GST_TYPE_FRACTION_RANGE
441 	 * start = the start of the range (a GST_TYPE_FRACTION GValue)
442 	 * end = the end of the range (a GST_TYPE_FRACTION GValue)
443 	 */
444 	public static void setFractionRange(Value value, Value start, Value end)
445 	{
446 		// void gst_value_set_fraction_range (GValue *value,  const GValue *start,  const GValue *end);
447 		gst_value_set_fraction_range((value is null) ? null : value.getValueStruct(), (start is null) ? null : start.getValueStruct(), (end is null) ? null : end.getValueStruct());
448 	}
449 	
450 	/**
451 	 * Gets the minimum of the range specified by value.
452 	 * Params:
453 	 * value = a GValue initialized to GST_TYPE_FRACTION_RANGE
454 	 * Returns: the minimum of the range
455 	 */
456 	public static Value getFractionRangeMin(Value value)
457 	{
458 		// const GValue * gst_value_get_fraction_range_min (const GValue *value);
459 		auto p = gst_value_get_fraction_range_min((value is null) ? null : value.getValueStruct());
460 		
461 		if(p is null)
462 		{
463 			return null;
464 		}
465 		
466 		return ObjectG.getDObject!(Value)(cast(GValue*) p);
467 	}
468 	
469 	/**
470 	 * Gets the maximum of the range specified by value.
471 	 * Params:
472 	 * value = a GValue initialized to GST_TYPE_FRACTION_RANGE
473 	 * Returns: the maximum of the range
474 	 */
475 	public static Value getFractionRangeMax(Value value)
476 	{
477 		// const GValue * gst_value_get_fraction_range_max (const GValue *value);
478 		auto p = gst_value_get_fraction_range_max((value is null) ? null : value.getValueStruct());
479 		
480 		if(p is null)
481 		{
482 			return null;
483 		}
484 		
485 		return ObjectG.getDObject!(Value)(cast(GValue*) p);
486 	}
487 	
488 	/**
489 	 * Sets value to the range specified by numerator_start/denominator_start
490 	 * and numerator_end/denominator_end.
491 	 * Params:
492 	 * value = a GValue initialized to GST_TYPE_FRACTION_RANGE
493 	 * numeratorStart = the numerator start of the range
494 	 * denominatorStart = the denominator start of the range
495 	 * numeratorEnd = the numerator end of the range
496 	 * denominatorEnd = the denominator end of the range
497 	 */
498 	public static void setFractionRangeFull(Value value, int numeratorStart, int denominatorStart, int numeratorEnd, int denominatorEnd)
499 	{
500 		// void gst_value_set_fraction_range_full (GValue *value,  gint numerator_start,  gint denominator_start,  gint numerator_end,  gint denominator_end);
501 		gst_value_set_fraction_range_full((value is null) ? null : value.getValueStruct(), numeratorStart, denominatorStart, numeratorEnd, denominatorEnd);
502 	}
503 	
504 	/**
505 	 * Sets the contents of value to caps. A reference to the
506 	 * provided caps will be taken by the value.
507 	 * Params:
508 	 * value = a GValue initialized to GST_TYPE_CAPS
509 	 * caps = the caps to set the value to. [transfer none]
510 	 */
511 	public static void setCaps(Value value, Caps caps)
512 	{
513 		// void gst_value_set_caps (GValue *value,  const GstCaps *caps);
514 		gst_value_set_caps((value is null) ? null : value.getValueStruct(), (caps is null) ? null : caps.getCapsStruct());
515 	}
516 	
517 	/**
518 	 * Gets the contents of value. The reference count of the returned
519 	 * GstCaps will not be modified, therefore the caller must take one
520 	 * before getting rid of the value.
521 	 * Params:
522 	 * value = a GValue initialized to GST_TYPE_CAPS
523 	 * Returns: the contents of value. [transfer none]
524 	 */
525 	public static Caps getCaps(Value value)
526 	{
527 		// const GstCaps * gst_value_get_caps (const GValue *value);
528 		auto p = gst_value_get_caps((value is null) ? null : value.getValueStruct());
529 		
530 		if(p is null)
531 		{
532 			return null;
533 		}
534 		
535 		return ObjectG.getDObject!(Caps)(cast(GstCaps*) p);
536 	}
537 	
538 	/**
539 	 * Sets the contents of value to features.
540 	 * Params:
541 	 * value = a GValue initialized to GST_TYPE_CAPS_FEATURES
542 	 * features = the features to set the value to
543 	 */
544 	public static void setCapsFeatures(Value value, CapsFeatures features)
545 	{
546 		// void gst_value_set_caps_features (GValue *value,  const GstCapsFeatures *features);
547 		gst_value_set_caps_features((value is null) ? null : value.getValueStruct(), (features is null) ? null : features.getCapsFeaturesStruct());
548 	}
549 	
550 	/**
551 	 * Gets the contents of value.
552 	 * Params:
553 	 * value = a GValue initialized to GST_TYPE_CAPS_FEATURES
554 	 * Returns: the contents of value. [transfer none]
555 	 */
556 	public static CapsFeatures getCapsFeatures(Value value)
557 	{
558 		// const GstCapsFeatures * gst_value_get_caps_features (const GValue *value);
559 		auto p = gst_value_get_caps_features((value is null) ? null : value.getValueStruct());
560 		
561 		if(p is null)
562 		{
563 			return null;
564 		}
565 		
566 		return ObjectG.getDObject!(CapsFeatures)(cast(GstCapsFeatures*) p);
567 	}
568 	
569 	/**
570 	 * Sets the contents of value to structure. The actual
571 	 * Params:
572 	 * value = a GValue initialized to GST_TYPE_STRUCTURE
573 	 * structure = the structure to set the value to
574 	 */
575 	public static void setStructure(Value value, Structure structure)
576 	{
577 		// void gst_value_set_structure (GValue *value,  const GstStructure *structure);
578 		gst_value_set_structure((value is null) ? null : value.getValueStruct(), (structure is null) ? null : structure.getStructureStruct());
579 	}
580 	
581 	/**
582 	 * Gets the contents of value.
583 	 * Params:
584 	 * value = a GValue initialized to GST_TYPE_STRUCTURE
585 	 * Returns: the contents of value. [transfer none]
586 	 */
587 	public static Structure getStructure(Value value)
588 	{
589 		// const GstStructure * gst_value_get_structure (const GValue *value);
590 		auto p = gst_value_get_structure((value is null) ? null : value.getValueStruct());
591 		
592 		if(p is null)
593 		{
594 			return null;
595 		}
596 		
597 		return ObjectG.getDObject!(Structure)(cast(GstStructure*) p);
598 	}
599 	
600 	/**
601 	 * Tests if the given GValue, if available in a GstStructure (or any other
602 	 * container) contains a "fixed" (which means: one value) or an "unfixed"
603 	 * (which means: multiple possible values, such as data lists or data
604 	 * ranges) value.
605 	 * Params:
606 	 * value = the GValue to check
607 	 * Returns: true if the value is "fixed".
608 	 */
609 	public static int isFixed(Value value)
610 	{
611 		// gboolean gst_value_is_fixed (const GValue *value);
612 		return gst_value_is_fixed((value is null) ? null : value.getValueStruct());
613 	}
614 	
615 	/**
616 	 * Registers functions to perform calculations on GValue items of a given
617 	 * type. Each type can only be added once.
618 	 * Params:
619 	 * table = structure containing functions to register
620 	 */
621 	public static void register(ref GstValueTable table)
622 	{
623 		// void gst_value_register (const GstValueTable *table);
624 		gst_value_register(&table);
625 	}
626 	
627 	/**
628 	 * Initialises the target value to be of the same type as source and then copies
629 	 * the contents from source to target.
630 	 * Params:
631 	 * dest = the target value. [out caller-allocates]
632 	 * src = the source value
633 	 */
634 	public static void initAndCopy(Value dest, Value src)
635 	{
636 		// void gst_value_init_and_copy (GValue *dest,  const GValue *src);
637 		gst_value_init_and_copy((dest is null) ? null : dest.getValueStruct(), (src is null) ? null : src.getValueStruct());
638 	}
639 	
640 	/**
641 	 * tries to transform the given value into a string representation that allows
642 	 * getting back this string later on using gst_value_deserialize().
643 	 * Free-function: g_free
644 	 * Params:
645 	 * value = a GValue to serialize
646 	 * Returns: the serialization for value or NULL if none exists. [transfer full]
647 	 */
648 	public static string serialize(Value value)
649 	{
650 		// gchar * gst_value_serialize (const GValue *value);
651 		return Str.toString(gst_value_serialize((value is null) ? null : value.getValueStruct()));
652 	}
653 	
654 	/**
655 	 * Tries to deserialize a string into the type specified by the given GValue.
656 	 * If the operation succeeds, TRUE is returned, FALSE otherwise.
657 	 * Params:
658 	 * dest = GValue to fill with contents of
659 	 * deserialization. [out caller-allocates]
660 	 * src = string to deserialize
661 	 * Returns: TRUE on success
662 	 */
663 	public static int deserialize(Value dest, string src)
664 	{
665 		// gboolean gst_value_deserialize (GValue *dest,  const gchar *src);
666 		return gst_value_deserialize((dest is null) ? null : dest.getValueStruct(), Str.toStringz(src));
667 	}
668 	
669 	/**
670 	 * Compares value1 and value2. If value1 and value2 cannot be
671 	 * compared, the function returns GST_VALUE_UNORDERED. Otherwise,
672 	 * if value1 is greater than value2, GST_VALUE_GREATER_THAN is returned.
673 	 * If value1 is less than value2, GST_VALUE_LESS_THAN is returned.
674 	 * If the values are equal, GST_VALUE_EQUAL is returned.
675 	 * Params:
676 	 * value1 = a value to compare
677 	 * value2 = another value to compare
678 	 * Returns: comparison result
679 	 */
680 	public static int compare(Value value1, Value value2)
681 	{
682 		// gint gst_value_compare (const GValue *value1,  const GValue *value2);
683 		return gst_value_compare((value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct());
684 	}
685 	
686 	/**
687 	 * Determines if value1 and value2 can be compared.
688 	 * Params:
689 	 * value1 = a value to compare
690 	 * value2 = another value to compare
691 	 * Returns: TRUE if the values can be compared
692 	 */
693 	public static int canCompare(Value value1, Value value2)
694 	{
695 		// gboolean gst_value_can_compare (const GValue *value1,  const GValue *value2);
696 		return gst_value_can_compare((value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct());
697 	}
698 	
699 	/**
700 	 * Creates a GValue corresponding to the union of value1 and value2.
701 	 * Params:
702 	 * dest = the destination value. [out caller-allocates]
703 	 * value1 = a value to union
704 	 * value2 = another value to union
705 	 * Returns: TRUE if the union suceeded.
706 	 */
707 	public static int unio(Value dest, Value value1, Value value2)
708 	{
709 		// gboolean gst_value_union (GValue *dest,  const GValue *value1,  const GValue *value2);
710 		return gst_value_union((dest is null) ? null : dest.getValueStruct(), (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct());
711 	}
712 	
713 	/**
714 	 * Determines if value1 and value2 can be non-trivially unioned.
715 	 * Any two values can be trivially unioned by adding both of them
716 	 * to a GstValueList. However, certain types have the possibility
717 	 * to be unioned in a simpler way. For example, an integer range
718 	 * and an integer can be unioned if the integer is a subset of the
719 	 * integer range. If there is the possibility that two values can
720 	 * be unioned, this function returns TRUE.
721 	 * Params:
722 	 * value1 = a value to union
723 	 * value2 = another value to union
724 	 * Returns: TRUE if there is a function allowing the two values to be unioned.
725 	 */
726 	public static int canUnion(Value value1, Value value2)
727 	{
728 		// gboolean gst_value_can_union (const GValue *value1,  const GValue *value2);
729 		return gst_value_can_union((value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct());
730 	}
731 	
732 	/**
733 	 * Subtracts subtrahend from minuend and stores the result in dest.
734 	 * Note that this means subtraction as in sets, not as in mathematics.
735 	 * Params:
736 	 * dest = the destination value for the result if the
737 	 * subtraction is not empty. May be NULL, in which case the resulting set
738 	 * will not be computed, which can give a fair speedup. [out caller-allocates]
739 	 * minuend = the value to subtract from
740 	 * subtrahend = the value to subtract
741 	 * Returns: TRUE if the subtraction is not empty
742 	 */
743 	public static int subtract(Value dest, Value minuend, Value subtrahend)
744 	{
745 		// gboolean gst_value_subtract (GValue *dest,  const GValue *minuend,  const GValue *subtrahend);
746 		return gst_value_subtract((dest is null) ? null : dest.getValueStruct(), (minuend is null) ? null : minuend.getValueStruct(), (subtrahend is null) ? null : subtrahend.getValueStruct());
747 	}
748 	
749 	/**
750 	 * Checks if it's possible to subtract subtrahend from minuend.
751 	 * Params:
752 	 * minuend = the value to subtract from
753 	 * subtrahend = the value to subtract
754 	 * Returns: TRUE if a subtraction is possible
755 	 */
756 	public static int canSubtract(Value minuend, Value subtrahend)
757 	{
758 		// gboolean gst_value_can_subtract (const GValue *minuend,  const GValue *subtrahend);
759 		return gst_value_can_subtract((minuend is null) ? null : minuend.getValueStruct(), (subtrahend is null) ? null : subtrahend.getValueStruct());
760 	}
761 	
762 	/**
763 	 * Calculates the intersection of two values. If the values have
764 	 * a non-empty intersection, the value representing the intersection
765 	 * is placed in dest, unless NULL. If the intersection is non-empty,
766 	 * dest is not modified.
767 	 * Params:
768 	 * dest = a uninitialized GValue that will hold the calculated
769 	 * intersection value. May be NULL if the resulting set if not needed. [out caller-allocates][transfer full]
770 	 * value1 = a value to intersect
771 	 * value2 = another value to intersect
772 	 * Returns: TRUE if the intersection is non-empty
773 	 */
774 	public static int intersect(Value dest, Value value1, Value value2)
775 	{
776 		// gboolean gst_value_intersect (GValue *dest,  const GValue *value1,  const GValue *value2);
777 		return gst_value_intersect((dest is null) ? null : dest.getValueStruct(), (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct());
778 	}
779 	
780 	/**
781 	 * Determines if intersecting two values will produce a valid result.
782 	 * Two values will produce a valid intersection if they have the same
783 	 * type, or if there is a method (registered by
784 	 * gst_value_register_intersect_func()) to calculate the intersection.
785 	 * Params:
786 	 * value1 = a value to intersect
787 	 * value2 = another value to intersect
788 	 * Returns: TRUE if the values can intersect
789 	 */
790 	public static int canIntersect(Value value1, Value value2)
791 	{
792 		// gboolean gst_value_can_intersect (const GValue *value1,  const GValue *value2);
793 		return gst_value_can_intersect((value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct());
794 	}
795 	
796 	/**
797 	 * Check that value1 is a subset of value2.
798 	 * Return: TRUE is value1 is a subset of value2
799 	 * Params:
800 	 * value1 = a GValue
801 	 * value2 = a GValue
802 	 */
803 	public static int isSubset(Value value1, Value value2)
804 	{
805 		// gboolean gst_value_is_subset (const GValue *value1,  const GValue *value2);
806 		return gst_value_is_subset((value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct());
807 	}
808 	
809 	/**
810 	 * Appends append_value to the GstValueArray in value.
811 	 * Params:
812 	 * value = a GValue of type GST_TYPE_ARRAY
813 	 * appendValue = the value to append
814 	 */
815 	public static void arrayAppendValue(Value value, Value appendValue)
816 	{
817 		// void gst_value_array_append_value (GValue *value,  const GValue *append_value);
818 		gst_value_array_append_value((value is null) ? null : value.getValueStruct(), (appendValue is null) ? null : appendValue.getValueStruct());
819 	}
820 	
821 	/**
822 	 * Gets the number of values contained in value.
823 	 * Params:
824 	 * value = a GValue of type GST_TYPE_ARRAY
825 	 * Returns: the number of values
826 	 */
827 	public static uint arrayGetSize(Value value)
828 	{
829 		// guint gst_value_array_get_size (const GValue *value);
830 		return gst_value_array_get_size((value is null) ? null : value.getValueStruct());
831 	}
832 	
833 	/**
834 	 * Gets the value that is a member of the array contained in value and
835 	 * has the index index.
836 	 * Params:
837 	 * value = a GValue of type GST_TYPE_ARRAY
838 	 * index = index of value to get from the array
839 	 * Returns: the value at the given index. [transfer none]
840 	 */
841 	public static Value arrayGetValue(Value value, uint index)
842 	{
843 		// const GValue * gst_value_array_get_value (const GValue *value,  guint index);
844 		auto p = gst_value_array_get_value((value is null) ? null : value.getValueStruct(), index);
845 		
846 		if(p is null)
847 		{
848 			return null;
849 		}
850 		
851 		return ObjectG.getDObject!(Value)(cast(GValue*) p);
852 	}
853 	
854 	/**
855 	 * Prepends prepend_value to the GstValueArray in value.
856 	 * Params:
857 	 * value = a GValue of type GST_TYPE_ARRAY
858 	 * prependValue = the value to prepend
859 	 */
860 	public static void arrayPrependValue(Value value, Value prependValue)
861 	{
862 		// void gst_value_array_prepend_value (GValue *value,  const GValue *prepend_value);
863 		gst_value_array_prepend_value((value is null) ? null : value.getValueStruct(), (prependValue is null) ? null : prependValue.getValueStruct());
864 	}
865 	
866 	/**
867 	 * Fixate src into a new value dest.
868 	 * For ranges, the first element is taken. For lists and arrays, the
869 	 * first item is fixated and returned.
870 	 * If src is already fixed, this function returns FALSE.
871 	 * Params:
872 	 * dest = the GValue destination
873 	 * src = the GValue to fixate
874 	 * Returns: true if dest contains a fixated version of src.
875 	 */
876 	public static int fixate(Value dest, Value src)
877 	{
878 		// gboolean gst_value_fixate (GValue *dest,  const GValue *src);
879 		return gst_value_fixate((dest is null) ? null : dest.getValueStruct(), (src is null) ? null : src.getValueStruct());
880 	}
881 }