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