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[];
29 typedef GstCapsFactory *GstCapsListFactory[];
32 GST_CAPS_END_ID_NUM = 0,
35 GST_CAPS_INT_RANGE_ID_NUM,
36 GST_CAPS_FOURCC_ID_NUM,
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)
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))
55 guint16 id; /* type id (major type) */
57 GSList *properties; /* properties for this capability */
60 /* initialize the subsystem */
61 void _gst_caps_initialize (void);
63 GstCaps* gst_caps_register (GstCapsFactory factory);
64 GList* gst_caps_register_va (GstCapsFactory factory,...);
66 void gst_caps_dump (GstCaps *caps);
68 gboolean gst_caps_check_compatibility (GstCaps *caps1, GstCaps *caps2);
70 #endif /* __GST_CAPS_H__ */