2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
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.
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.
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.
21 #ifndef __GST_CAPS_H__
22 #define __GST_CAPS_H__
26 typedef struct _GstCaps GstCaps;
27 typedef gpointer GstCapsFactoryEntry;
28 typedef GstCapsFactoryEntry GstCapsFactory[];
31 GST_CAPS_END_ID_NUM = 0,
34 GST_CAPS_INT_RANGE_ID_NUM,
35 GST_CAPS_INT32_ID_NUM,
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)
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))
53 guint16 id; /* type id (major type) */
55 GSList *properties; /* properties for this capability */
58 /* initialize the subsystem */
59 void _gst_caps_initialize (void);
61 GstCaps* gst_caps_register (GstCapsFactory factory);
62 GList* gst_caps_register_va (GstCapsFactory factory,...);
64 void gst_caps_dump (GstCaps *caps);
66 gboolean gst_caps_check_compatibility (GstCaps *caps1, GstCaps *caps2);
68 #endif /* __GST_CAPS_H__ */