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