Added pulregion handling.
[platform/upstream/gstreamer.git] / gst / gstcaps.h
1 /* Gnome-Streamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
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., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20
21 #ifndef __GST_CAPS_H__
22 #define __GST_CAPS_H__
23
24 #include <gst/gst.h>
25
26 typedef struct _GstCaps GstCaps;
27 typedef gpointer GstCapsFactoryEntry;
28 typedef GstCapsFactoryEntry GstCapsFactory[];
29 typedef GstCapsFactory *GstCapsListFactory[];
30
31 typedef enum {
32    GST_CAPS_END_ID_NUM = 0,
33    GST_CAPS_LIST_ID_NUM,
34    GST_CAPS_INT_ID_NUM,
35    GST_CAPS_INT_RANGE_ID_NUM,
36    GST_CAPS_FOURCC_ID_NUM,
37    GST_CAPS_BOOL_ID_NUM,
38 } GstCapsId;
39
40 #define GST_CAPS_LIST_ID GINT_TO_POINTER(GST_CAPS_LIST_ID_NUM)
41 #define GST_CAPS_INT_ID GINT_TO_POINTER(GST_CAPS_INT_ID_NUM)
42 #define GST_CAPS_INT_RANGE_ID GINT_TO_POINTER(GST_CAPS_INT_RANGE_ID_NUM)
43 #define GST_CAPS_FOURCC_ID GINT_TO_POINTER(GST_CAPS_FOURCC_ID_NUM)
44 #define GST_CAPS_BOOL_ID GINT_TO_POINTER(GST_CAPS_BOOL_ID_NUM)
45
46 #define GST_CAPS_LIST(a...) GST_CAPS_LIST_ID,##a,NULL
47 #define GST_CAPS_INT(a) GST_CAPS_INT_ID,(GINT_TO_POINTER(a))
48 #define GST_CAPS_INT_RANGE(a,b) GST_CAPS_INT_RANGE_ID,(GINT_TO_POINTER(a)),(GINT_TO_POINTER(b))
49 #define GST_CAPS_FOURCC(a,b,c,d) GST_CAPS_FOURCC_ID,(GINT_TO_POINTER((a)|(b)<<8|(c)<<16|(d)<<24))
50 #define GST_CAPS_FOURCC_INT(a) GST_CAPS_FOURCC_ID,(GINT_TO_POINTER(a))
51 #define GST_CAPS_BOOLEAN(a) GST_CAPS_BOOL_ID,(GINT_TO_POINTER(a))
52
53
54 struct _GstCaps {
55   guint16 id;                   /* type id (major type) */
56
57   GSList *properties;           /* properties for this capability */
58 };
59
60 /* initialize the subsystem */
61 void            _gst_caps_initialize            (void);
62
63 GstCaps*        gst_caps_register               (GstCapsFactory factory);
64 GList*          gst_caps_register_va            (GstCapsFactory factory,...);
65
66 void            gst_caps_dump                   (GstCaps *caps);
67
68 gboolean        gst_caps_check_compatibility    (GstCaps *caps1, GstCaps *caps2);
69
70 #endif /* __GST_CAPS_H__ */