Added multiple types to the pads.
[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
30 typedef enum {
31    GST_CAPS_END_ID_NUM = 0,
32    GST_CAPS_LIST_ID_NUM,
33    GST_CAPS_INT_ID_NUM,
34    GST_CAPS_INT_RANGE_ID_NUM,
35    GST_CAPS_INT32_ID_NUM,
36    GST_CAPS_BOOL_ID_NUM,
37 } GstCapsId;
38
39 #define GST_CAPS_LIST_ID GINT_TO_POINTER(GST_CAPS_LIST_ID_NUM)
40 #define GST_CAPS_INT_ID GINT_TO_POINTER(GST_CAPS_INT_ID_NUM)
41 #define GST_CAPS_INT_RANGE_ID GINT_TO_POINTER(GST_CAPS_INT_RANGE_ID_NUM)
42 #define GST_CAPS_INT32_ID GINT_TO_POINTER(GST_CAPS_INT32_ID_NUM)
43 #define GST_CAPS_BOOL_ID GINT_TO_POINTER(GST_CAPS_BOOL_ID_NUM)
44
45 #define GST_CAPS_LIST(a...) GST_CAPS_LIST_ID,##a,NULL
46 #define GST_CAPS_INT(a) GST_CAPS_INT_ID,(GINT_TO_POINTER(a))
47 #define GST_CAPS_INT_RANGE(a,b) GST_CAPS_INT_RANGE_ID,(GINT_TO_POINTER(a)),(GINT_TO_POINTER(b))
48 #define GST_CAPS_INT32(a) GST_CAPS_INT_ID,(GINT_TO_POINTER(a))
49 #define GST_CAPS_BOOLEAN(a) GST_CAPS_BOOL_ID,(GINT_TO_POINTER(a))
50
51
52 struct _GstCaps {
53   guint16 id;                   /* type id (major type) */
54
55   GSList *properties;           /* properties for this capability */
56 };
57
58 /* initialize the subsystem */
59 void            _gst_caps_initialize            (void);
60
61 GstCaps*        gst_caps_register               (GstCapsFactory factory);
62 GList*          gst_caps_register_va            (GstCapsFactory factory,...);
63
64 void            gst_caps_dump                   (GstCaps *caps);
65
66 gboolean        gst_caps_check_compatibility    (GstCaps *caps1, GstCaps *caps2);
67
68 #endif /* __GST_CAPS_H__ */