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