gstreamer/gst/gstconfig.h.in: Add support for LoongArch
[platform/upstream/gstreamer.git] / subprojects / gstreamer / gst / gstvalue.h
1 /* GStreamer
2  * Copyright (C) <2003> David A. Schleef <ds@schleef.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19
20 #ifndef __GST_VALUE_H__
21 #define __GST_VALUE_H__
22
23 #include <gst/gstconfig.h>
24 #include <gst/gstcaps.h>
25 #include <gst/gststructure.h>
26 #include <gst/gstcapsfeatures.h>
27
28 G_BEGIN_DECLS
29
30 /**
31  * GST_MAKE_FOURCC:
32  * @a: the first character
33  * @b: the second character
34  * @c: the third character
35  * @d: the fourth character
36  *
37  * Transform four characters into a #guint32 fourcc value with host
38  * endianness.
39  *
40  * |[
41  * guint32 fourcc = GST_MAKE_FOURCC ('M', 'J', 'P', 'G');
42  * ]|
43  *
44  */
45 #define GST_MAKE_FOURCC(a,b,c,d) \
46   ( (guint32)(a) | ((guint32) (b)) << 8  | ((guint32) (c)) << 16 | ((guint32) (d)) << 24 )
47
48 /**
49  * GST_STR_FOURCC:
50  * @f: a string with at least four characters
51  *
52  * Transform an input string into a #guint32 fourcc value with host
53  * endianness.
54  * Caller is responsible for ensuring the input string consists of at least
55  * four characters.
56  *
57  * |[
58  * guint32 fourcc = GST_STR_FOURCC ("MJPG");
59  * ]|
60  *
61  */
62 #define GST_STR_FOURCC(f)               ((guint32)(((f)[0])|((f)[1]<<8)|((f)[2]<<16)|((f)[3]<<24)))
63
64 /**
65  * GST_FOURCC_FORMAT: (skip):
66  *
67  * Can be used together with #GST_FOURCC_ARGS to properly output a
68  * #guint32 fourcc value in a printf\()-style text message.
69  *
70  * |[
71  * printf ("fourcc: %" GST_FOURCC_FORMAT "\n", GST_FOURCC_ARGS (fcc));
72  * ]|
73  *
74  */
75 #define GST_FOURCC_FORMAT "c%c%c%c"
76
77 /**
78  * GST_FOURCC_ARGS: (skip):
79  * @fourcc: a #guint32 fourcc value to output
80  *
81  * Can be used together with #GST_FOURCC_FORMAT to properly output a
82  * #guint32 fourcc value in a printf\()-style text message.
83  */
84
85 #define __GST_PRINT_CHAR(c) \
86   g_ascii_isprint(c) ? (c) : '.'
87 #define GST_FOURCC_ARGS(fourcc)               \
88   __GST_PRINT_CHAR((fourcc) & 0xff),          \
89   __GST_PRINT_CHAR(((fourcc) >> 8) & 0xff),   \
90   __GST_PRINT_CHAR(((fourcc) >> 16) & 0xff),  \
91   __GST_PRINT_CHAR(((fourcc) >> 24) & 0xff)
92 /**
93  * GST_VALUE_HOLDS_INT_RANGE:
94  * @x: the #GValue to check
95  *
96  * Checks if the given #GValue contains a #GstIntRange value.
97  */
98 #define GST_VALUE_HOLDS_INT_RANGE(x)      ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_int_range_type)
99
100 /**
101  * GST_VALUE_HOLDS_INT64_RANGE:
102  * @x: the #GValue to check
103  *
104  * Checks if the given #GValue contains a #GstInt64Range value.
105  */
106 #define GST_VALUE_HOLDS_INT64_RANGE(x)    ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_int64_range_type)
107
108 /**
109  * GST_VALUE_HOLDS_DOUBLE_RANGE:
110  * @x: the #GValue to check
111  *
112  * Checks if the given #GValue contains a #GstDoubleRange value.
113  */
114 #define GST_VALUE_HOLDS_DOUBLE_RANGE(x)   ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_double_range_type)
115
116 /**
117  * GST_VALUE_HOLDS_FRACTION_RANGE:
118  * @x: the #GValue to check
119  *
120  * Checks if the given #GValue contains a #GstFractionRange value.
121  */
122 #define GST_VALUE_HOLDS_FRACTION_RANGE(x) ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_fraction_range_type)
123
124 /**
125  * GST_VALUE_HOLDS_LIST:
126  * @x: the #GValue to check
127  *
128  * Checks if the given #GValue contains a #GstValueList value.
129  */
130 #define GST_VALUE_HOLDS_LIST(x)         ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_value_list_type)
131
132 /**
133  * GST_VALUE_HOLDS_ARRAY:
134  * @x: the #GValue to check
135  *
136  * Checks if the given #GValue contains a #GstValueArray value.
137  */
138 #define GST_VALUE_HOLDS_ARRAY(x)        ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_value_array_type)
139
140 /**
141  * GST_VALUE_HOLDS_CAPS:
142  * @x: the #GValue to check
143  *
144  * Checks if the given #GValue contains a #GstCaps value.
145  */
146 #define GST_VALUE_HOLDS_CAPS(x)         ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_caps_type)
147
148 /**
149  * GST_VALUE_HOLDS_STRUCTURE:
150  * @x: the #GValue to check
151  *
152  * Checks if the given #GValue contains a #GstStructure value.
153  */
154 #define GST_VALUE_HOLDS_STRUCTURE(x)      ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_structure_type)
155
156 /**
157  * GST_VALUE_HOLDS_CAPS_FEATURES:
158  * @x: the #GValue to check
159  *
160  * Checks if the given #GValue contains a #GstCapsFeatures value.
161  */
162 #define GST_VALUE_HOLDS_CAPS_FEATURES(x)  ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_caps_features_type)
163
164 /**
165  * GST_VALUE_HOLDS_BUFFER:
166  * @x: the #GValue to check
167  *
168  * Checks if the given #GValue contains a #GstBuffer value.
169  */
170 #define GST_VALUE_HOLDS_BUFFER(x)       ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_buffer_type)
171
172 /**
173  * GST_VALUE_HOLDS_SAMPLE:
174  * @x: the #GValue to check
175  *
176  * Checks if the given #GValue contains a #GstSample value.
177  */
178 #define GST_VALUE_HOLDS_SAMPLE(x)       ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_sample_type)
179
180 /**
181  * GST_VALUE_HOLDS_FRACTION:
182  * @x: the #GValue to check
183  *
184  * Checks if the given #GValue contains a #GstFraction value.
185  */
186 #define GST_VALUE_HOLDS_FRACTION(x)     ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_fraction_type)
187
188 /**
189  * GST_VALUE_HOLDS_DATE_TIME:
190  * @x: the #GValue to check
191  *
192  * Checks if the given #GValue contains a #GstDateTime value.
193  */
194 #define GST_VALUE_HOLDS_DATE_TIME(x)    ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_date_time_type)
195
196 /**
197  * GST_VALUE_HOLDS_BITMASK:
198  * @x: the #GValue to check
199  *
200  * Checks if the given #GValue contains a #GstBitmask value.
201  */
202 #define GST_VALUE_HOLDS_BITMASK(x)      ((gpointer)(x) != NULL && G_VALUE_TYPE(x) == _gst_bitmask_type)
203
204 /**
205  * GST_VALUE_HOLDS_FLAG_SET:
206  * @x: the #GValue to check
207  *
208  * Checks if the given #GValue contains a #GstFlagSet value.
209  *
210  * Since: 1.6
211  */
212 #define GST_VALUE_HOLDS_FLAG_SET(x)     (G_TYPE_FUNDAMENTAL (G_VALUE_TYPE ((x))) == GST_TYPE_FLAG_SET)
213
214 /**
215  * GST_FLAG_SET_MASK_EXACT: (value 4294967295) (type guint)
216  *
217  * A mask value with all bits set, for use as a
218  * GstFlagSet mask where all flag bits must match
219  * exactly
220  *
221  * Since: 1.6
222  */
223 #define GST_FLAG_SET_MASK_EXACT ((guint)(-1))
224
225 GST_API GType _gst_int_range_type;
226
227 /**
228  * GstIntRange:
229  *
230  * A fundamental type that describes a #gint range
231  */
232
233 /**
234  * GST_TYPE_INT_RANGE:
235  *
236  * a #GValue type that represents an integer range
237  *
238  * Returns: the #GType of GstIntRange
239  */
240 #define GST_TYPE_INT_RANGE               (_gst_int_range_type)
241
242 GST_API GType _gst_int64_range_type;
243
244 /**
245  * GstInt64Range:
246  *
247  * A fundamental type that describes a #gint64 range
248  */
249
250 /**
251  * GST_TYPE_INT64_RANGE:
252  *
253  * a #GValue type that represents an #gint64 range
254  *
255  * Returns: the #GType of GstInt64Range
256  */
257 #define GST_TYPE_INT64_RANGE             (_gst_int64_range_type)
258
259 GST_API GType _gst_double_range_type;
260
261 /**
262  * GstDoubleRange:
263  *
264  * A fundamental type that describes a #gdouble range
265  */
266
267 /**
268  * GST_TYPE_DOUBLE_RANGE:
269  *
270  * a #GValue type that represents a floating point range with double precision
271  *
272  * Returns: the #GType of GstIntRange
273  */
274 #define GST_TYPE_DOUBLE_RANGE            (_gst_double_range_type)
275
276 GST_API GType _gst_fraction_range_type;
277
278 /**
279  * GstFractionRange:
280  *
281  * A fundamental type that describes a #GstFractionRange range
282  */
283
284 /**
285  * GST_TYPE_FRACTION_RANGE:
286  *
287  * a #GValue type that represents a GstFraction range
288  *
289  * Returns: the #GType of GstFractionRange
290  */
291 #define GST_TYPE_FRACTION_RANGE           (_gst_fraction_range_type)
292
293 GST_API GType _gst_value_list_type;
294
295 /**
296  * GstValueList:
297  *
298  * A fundamental type that describes an unordered list of #GValue
299  */
300
301 /**
302  * GST_TYPE_LIST:
303  *
304  * a #GValue type that represents an unordered list of #GValue values. This
305  * is used for example to express a list of possible values for a field in
306  * a caps structure, like a list of possible sample rates, of which only one
307  * will be chosen in the end. This means that all values in the list are
308  * meaningful on their own.
309  *
310  * Returns: the #GType of GstValueList (which is not explicitly typed)
311  */
312 #define GST_TYPE_LIST                    (_gst_value_list_type)
313
314 GST_API GType _gst_value_array_type;
315
316 /**
317  * GstValueArray:
318  *
319  * A fundamental type that describes an ordered list of #GValue
320  */
321
322 /**
323  * GST_TYPE_ARRAY:
324  *
325  * a #GValue type that represents an ordered list of #GValue values. This is
326  * used to express a set of values that is meaningful only in their specific
327  * combination and order of values. Each value on its own is not particularly
328  * meaningful, only the ordered array in its entirety is meaningful. This is
329  * used for example to express channel layouts for multichannel audio where
330  * each channel needs to be mapped to a position in the room.
331  *
332  * Returns: the #GType of GstArrayList (which is not explicitly typed)
333  */
334 #define GST_TYPE_ARRAY                   (_gst_value_array_type)
335
336 GST_API GType _gst_fraction_type;
337
338 /**
339  * GstFraction:
340  *
341  * A fundamental type that describes a fraction of an integer numerator
342  * over an integer denominator
343  */
344
345 /**
346  * GST_TYPE_FRACTION:
347  *
348  * a #GValue type that represents a fraction of an integer numerator over
349  * an integer denominator
350  *
351  * Returns: the #GType of GstFraction (which is not explicitly typed)
352  */
353
354 #define GST_TYPE_FRACTION                (_gst_fraction_type)
355
356 GST_API GType _gst_bitmask_type;
357
358 /**
359  * GstBitmask:
360  *
361  * A fundamental type that describes a 64-bit bitmask
362  */
363
364 /**
365  * GST_TYPE_BITMASK:
366  *
367  * a #GValue type that represents a 64-bit bitmask.
368  *
369  * Returns: the #GType of GstBitmask (which is not explicitly typed)
370  */
371
372 #define GST_TYPE_BITMASK                 (_gst_bitmask_type)
373
374 GST_API GType _gst_flagset_type;
375
376 /**
377  * GstFlagSet:
378  *
379  * A fundamental type that describes a 32-bit flag bitfield, with 32-bit
380  * mask indicating which of the bits in the field are explicitly set.
381  */
382
383 /**
384  * GST_TYPE_FLAG_SET:
385  *
386  * a #GValue type that represents a 32-bit flag bitfield, with 32-bit
387  * mask indicating which of the bits in the field are explicitly set.
388  * Useful for negotiation.
389  *
390  * Returns: the #GType of GstFlags (which is not explicitly typed)
391  *
392  * Since: 1.6
393  */
394 #define GST_TYPE_FLAG_SET                   (_gst_flagset_type)
395
396 /**
397  * GST_TYPE_G_THREAD:
398  *
399  * a boxed #GValue type for #GThread that represents a thread.
400  *
401  * Returns: the #GType of GstGThread
402  */
403
404 #define GST_TYPE_G_THREAD                gst_g_thread_get_type ()
405
406 /**
407  * GST_VALUE_LESS_THAN:
408  *
409  * Indicates that the first value provided to a comparison function
410  * (gst_value_compare()) is lesser than the second one.
411  */
412 #define GST_VALUE_LESS_THAN              (-1)
413
414 /**
415  * GST_VALUE_EQUAL:
416  *
417  * Indicates that the first value provided to a comparison function
418  * (gst_value_compare()) is equal to the second one.
419  */
420 #define GST_VALUE_EQUAL                   0
421
422 /**
423  * GST_VALUE_GREATER_THAN:
424  *
425  * Indicates that the first value provided to a comparison function
426  * (gst_value_compare()) is greater than the second one.
427  */
428 #define GST_VALUE_GREATER_THAN            1
429
430 /**
431  * GST_VALUE_UNORDERED:
432  *
433  * Indicates that the comparison function (gst_value_compare()) can not
434  * determine a order for the two provided values.
435  */
436 #define GST_VALUE_UNORDERED               2
437
438 /**
439  * GstValueCompareFunc:
440  * @value1: first value for comparison
441  * @value2: second value for comparison
442  *
443  * Used together with gst_value_compare() to compare #GValue items.
444  *
445  * Returns: one of GST_VALUE_LESS_THAN, GST_VALUE_EQUAL, GST_VALUE_GREATER_THAN
446  * or GST_VALUE_UNORDERED
447  */
448 typedef gint     (* GstValueCompareFunc)     (const GValue *value1,
449                                               const GValue *value2);
450
451 /**
452  * GstValueSerializeFunc:
453  * @value1: a #GValue
454  *
455  * Used by gst_value_serialize() to obtain a non-binary form of the #GValue.
456  *
457  * Free-function: g_free
458  *
459  * Returns: (transfer full): the string representation of the value
460  */
461 typedef gchar *  (* GstValueSerializeFunc)   (const GValue *value1);
462
463 /**
464  * GstValueDeserializeFunc:
465  * @dest: a #GValue
466  * @s: a string
467  *
468  * Used by gst_value_deserialize() to parse a non-binary form into the #GValue.
469  *
470  * Returns: %TRUE for success
471  */
472 typedef gboolean (* GstValueDeserializeFunc) (GValue       *dest,
473                                               const gchar  *s);
474
475 /**
476  * GstValueDeserializeWithPSpecFunc:
477  * @dest: a #GValue
478  * @s: a string
479  * @pspec: a #GParamSpec describing the expected value
480  *
481  * Used by gst_value_deserialize_with_pspec() to parse a non-binary form into the #GValue.
482  *
483  * Returns: %TRUE for success
484  * Since: 1.20
485  */
486 typedef gboolean (* GstValueDeserializeWithPSpecFunc) (GValue       *dest,
487                                                        const gchar  *s,
488                                                        GParamSpec   *pspec);
489
490
491 typedef struct _GstValueTable GstValueTable;
492 /**
493  * GstValueTable:
494  * @type: a #GType
495  * @compare: a #GstValueCompareFunc
496  * @serialize: a #GstValueSerializeFunc
497  * @deserialize: a #GstValueDeserializeFunc
498  * @deserialize_with_pspec: a #GstValueDeserializeWithPSpecFunc
499  *
500  * VTable for the #GValue @type.
501  */
502 struct _GstValueTable {
503   GType type;
504   GstValueCompareFunc compare;
505   GstValueSerializeFunc serialize;
506   GstValueDeserializeFunc deserialize;
507
508   /**
509    * GstValueTable.deserialize_with_pspec:
510    *
511    * a #GstValueDeserializeWithPSpecFunc
512    *
513    * Since: 1.20
514    */
515   GstValueDeserializeWithPSpecFunc deserialize_with_pspec;
516
517   /*< private >*/
518   gpointer _gst_reserved [GST_PADDING - 1];
519 };
520
521 GST_API
522 GType gst_int_range_get_type (void);
523
524 GST_API
525 GType gst_int64_range_get_type (void);
526
527 GST_API
528 GType gst_double_range_get_type (void);
529
530 GST_API
531 GType gst_fraction_range_get_type (void);
532
533 GST_API
534 GType gst_fraction_get_type (void);
535
536 GST_API
537 GType gst_value_list_get_type (void);
538
539 GST_API
540 GType gst_value_array_get_type (void);
541
542 GST_API
543 GType gst_bitmask_get_type (void);
544
545 GST_API
546 GType gst_flagset_get_type (void);
547
548 /* Hide this compatibility type from introspection */
549 #ifndef __GI_SCANNER__
550 GST_API
551 GType gst_g_thread_get_type (void);
552 #endif
553
554 GST_API
555 void            gst_value_register              (const GstValueTable   *table);
556
557 GST_API
558 void            gst_value_init_and_copy         (GValue                *dest,
559                                                  const GValue          *src);
560 GST_API
561 gchar *         gst_value_serialize             (const GValue          *value) G_GNUC_MALLOC;
562
563 GST_API
564 gboolean        gst_value_deserialize           (GValue                *dest,
565                                                  const gchar           *src);
566
567 GST_API
568 gboolean        gst_value_deserialize_with_pspec (GValue               *dest,
569                                                  const gchar           *src,
570                                                  GParamSpec            *pspec);
571
572 /* list */
573
574 GST_API
575 void            gst_value_list_append_value     (GValue         *value,
576                                                  const GValue   *append_value);
577 GST_API
578 void            gst_value_list_append_and_take_value (GValue         *value,
579                                                  GValue   *append_value);
580 GST_API
581 void            gst_value_list_prepend_value    (GValue         *value,
582                                                  const GValue   *prepend_value);
583 GST_API
584 void            gst_value_list_concat           (GValue         *dest,
585                                                  const GValue   *value1,
586                                                  const GValue   *value2);
587 GST_API
588 void            gst_value_list_merge            (GValue         *dest,
589                                                  const GValue   *value1,
590                                                  const GValue   *value2);
591 GST_API
592 guint           gst_value_list_get_size         (const GValue   *value);
593
594 GST_API
595 const GValue *  gst_value_list_get_value        (const GValue   *value,
596                                                  guint          index);
597
598 GST_API
599 GValue *        gst_value_list_init             (GValue *value,
600                                                  guint prealloc);
601 /* array */
602
603 GST_API
604 void            gst_value_array_append_value    (GValue         *value,
605                                                  const GValue   *append_value);
606 GST_API
607 void            gst_value_array_append_and_take_value    (GValue         *value,
608                                                  GValue   *append_value);
609 GST_API
610 void            gst_value_array_prepend_value   (GValue         *value,
611                                                  const GValue   *prepend_value);
612 GST_API
613 guint           gst_value_array_get_size        (const GValue   *value);
614
615 GST_API
616 const GValue *  gst_value_array_get_value       (const GValue   *value,
617                                                  guint          index);
618 GST_API
619 GValue *        gst_value_array_init            (GValue *value,
620                                                  guint prealloc);
621
622 /* int range */
623
624 GST_API
625 void            gst_value_set_int_range         (GValue         *value,
626                                                  gint           start,
627                                                  gint           end);
628 GST_API
629 void            gst_value_set_int_range_step    (GValue         *value,
630                                                  gint           start,
631                                                  gint           end,
632                                                  gint           step);
633 GST_API
634 gint            gst_value_get_int_range_min     (const GValue   *value);
635
636 GST_API
637 gint            gst_value_get_int_range_max     (const GValue   *value);
638
639 GST_API
640 gint            gst_value_get_int_range_step    (const GValue   *value);
641
642 /* int64 range */
643
644 GST_API
645 void            gst_value_set_int64_range       (GValue         *value,
646                                                  gint64         start,
647                                                  gint64         end);
648 GST_API
649 void            gst_value_set_int64_range_step  (GValue         *value,
650                                                  gint64         start,
651                                                  gint64         end,
652                                                  gint64         step);
653 GST_API
654 gint64          gst_value_get_int64_range_min   (const GValue   *value);
655
656 GST_API
657 gint64          gst_value_get_int64_range_max   (const GValue   *value);
658
659 GST_API
660 gint64          gst_value_get_int64_range_step  (const GValue   *value);
661
662 /* double range */
663
664 GST_API
665 void            gst_value_set_double_range      (GValue         *value,
666                                                  gdouble        start,
667                                                  gdouble        end);
668 GST_API
669 gdouble         gst_value_get_double_range_min  (const GValue   *value);
670
671 GST_API
672 gdouble         gst_value_get_double_range_max  (const GValue   *value);
673
674 /* caps */
675
676 GST_API
677 const GstCaps * gst_value_get_caps              (const GValue   *value);
678
679 GST_API
680 void            gst_value_set_caps              (GValue         *value,
681                                                  const GstCaps  *caps);
682
683 /* structure */
684
685 GST_API
686 const GstStructure *
687                 gst_value_get_structure         (const GValue   *value);
688
689 GST_API
690 void            gst_value_set_structure         (GValue         *value,
691                                                  const GstStructure  *structure);
692
693 /* caps features */
694
695 GST_API
696 const GstCapsFeatures *
697                 gst_value_get_caps_features     (const GValue   *value);
698
699 GST_API
700 void            gst_value_set_caps_features     (GValue         *value,
701                                                  const GstCapsFeatures  *features);
702
703 /* fraction */
704
705 GST_API
706 void            gst_value_set_fraction          (GValue         *value,
707                                                  gint           numerator,
708                                                  gint           denominator);
709 GST_API
710 gint            gst_value_get_fraction_numerator   (const GValue  *value);
711
712 GST_API
713 gint            gst_value_get_fraction_denominator (const GValue *value);
714
715 GST_API
716 gboolean        gst_value_fraction_multiply        (GValue         *product,
717                                                     const GValue   *factor1,
718                                                     const GValue   *factor2);
719 GST_API
720 gboolean        gst_value_fraction_subtract     (GValue * dest,
721                                                  const GValue * minuend,
722                                                  const GValue * subtrahend);
723
724 /* fraction range */
725
726 GST_API
727 void            gst_value_set_fraction_range    (GValue         *value,
728                                                  const GValue   *start,
729                                                  const GValue   *end);
730 GST_API
731 void            gst_value_set_fraction_range_full (GValue       *value,
732                                                  gint numerator_start,
733                                                  gint denominator_start,
734                                                  gint numerator_end,
735                                                  gint denominator_end);
736 GST_API
737 const GValue    *gst_value_get_fraction_range_min (const GValue *value);
738
739 GST_API
740 const GValue    *gst_value_get_fraction_range_max (const GValue *value);
741
742 /* bitmask */
743
744 GST_API
745 guint64         gst_value_get_bitmask           (const GValue   *value);
746
747 GST_API
748 void            gst_value_set_bitmask           (GValue         *value,
749                                                  guint64         bitmask);
750 /* flagset */
751
752 GST_API
753 void            gst_value_set_flagset (GValue * value, guint flags, guint mask);
754
755 GST_API
756 guint           gst_value_get_flagset_flags (const GValue * value);
757
758 GST_API
759 guint           gst_value_get_flagset_mask (const GValue * value);
760
761 /* compare */
762
763 GST_API
764 gint            gst_value_compare               (const GValue   *value1,
765                                                  const GValue   *value2);
766 GST_API
767 gboolean        gst_value_can_compare           (const GValue   *value1,
768                                                  const GValue   *value2);
769 GST_API
770 gboolean        gst_value_is_subset             (const GValue   *value1,
771                                                  const GValue   *value2);
772
773 /* union */
774
775 GST_API
776 gboolean        gst_value_union                 (GValue         *dest,
777                                                  const GValue   *value1,
778                                                  const GValue   *value2);
779 GST_API
780 gboolean        gst_value_can_union             (const GValue   *value1,
781                                                  const GValue   *value2);
782
783 /* intersection */
784
785 GST_API
786 gboolean        gst_value_intersect             (GValue         *dest,
787                                                  const GValue   *value1,
788                                                  const GValue   *value2);
789 GST_API
790 gboolean        gst_value_can_intersect         (const GValue   *value1,
791                                                  const GValue   *value2);
792
793 /* subtraction */
794
795 GST_API
796 gboolean        gst_value_subtract              (GValue         *dest,
797                                                  const GValue   *minuend,
798                                                  const GValue   *subtrahend);
799 GST_API
800 gboolean        gst_value_can_subtract          (const GValue   *minuend,
801                                                  const GValue   *subtrahend);
802
803 /* fixation */
804
805 GST_API
806 gboolean        gst_value_is_fixed              (const GValue   *value);
807
808 GST_API
809 gboolean        gst_value_fixate                (GValue         *dest,
810                                                  const GValue   *src);
811
812 /* Flagset registration wrapper */
813
814 GST_API
815 GType           gst_flagset_register (GType flags_type);
816
817 G_END_DECLS
818
819 #endif
820
821