2000-12-28 22:12:02 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000 Wim Taymans <wtay@chello.be>
|
|
|
|
*
|
|
|
|
* gstprops.h: Header for properties subsystem
|
2000-12-07 18:37:56 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GST_PROPS_H__
|
|
|
|
#define __GST_PROPS_H__
|
|
|
|
|
|
|
|
#include <glib.h>
|
2001-01-14 21:55:41 +00:00
|
|
|
#include <parser.h> // NOTE: this is xml-config's fault
|
2000-12-07 18:37:56 +00:00
|
|
|
|
2001-01-18 11:16:53 +00:00
|
|
|
// Include compatability defines: if libxml hasn't already defined these,
|
|
|
|
// we have an old version 1.x
|
|
|
|
#ifndef xmlChildrenNode
|
|
|
|
#define xmlChildrenNode childs
|
|
|
|
#define xmlRootNode root
|
|
|
|
#endif
|
|
|
|
|
2000-12-28 22:12:02 +00:00
|
|
|
|
2000-12-07 18:37:56 +00:00
|
|
|
typedef struct _GstProps GstProps;
|
|
|
|
typedef gpointer GstPropsFactoryEntry;
|
|
|
|
typedef GstPropsFactoryEntry GstPropsFactory[];
|
|
|
|
typedef GstPropsFactory *GstPropsListFactory[];
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
GST_PROPS_END_ID_NUM = 0,
|
|
|
|
GST_PROPS_LIST_ID_NUM,
|
|
|
|
GST_PROPS_INT_ID_NUM,
|
|
|
|
GST_PROPS_INT_RANGE_ID_NUM,
|
|
|
|
GST_PROPS_FOURCC_ID_NUM,
|
|
|
|
GST_PROPS_BOOL_ID_NUM,
|
2000-12-31 16:12:48 +00:00
|
|
|
GST_PROPS_LAST_ID_NUM = GST_PROPS_END_ID_NUM + 16,
|
2000-12-07 18:37:56 +00:00
|
|
|
} GstPropsId;
|
|
|
|
|
2000-12-29 18:23:41 +00:00
|
|
|
#define GST_PROPS_END_ID GINT_TO_POINTER(GST_PROPS_END_ID_NUM)
|
2000-12-07 18:37:56 +00:00
|
|
|
#define GST_PROPS_LIST_ID GINT_TO_POINTER(GST_PROPS_LIST_ID_NUM)
|
|
|
|
#define GST_PROPS_INT_ID GINT_TO_POINTER(GST_PROPS_INT_ID_NUM)
|
|
|
|
#define GST_PROPS_INT_RANGE_ID GINT_TO_POINTER(GST_PROPS_INT_RANGE_ID_NUM)
|
|
|
|
#define GST_PROPS_FOURCC_ID GINT_TO_POINTER(GST_PROPS_FOURCC_ID_NUM)
|
|
|
|
#define GST_PROPS_BOOL_ID GINT_TO_POINTER(GST_PROPS_BOOL_ID_NUM)
|
2000-12-31 16:12:48 +00:00
|
|
|
#define GST_PROPS_LAST_ID GINT_TO_POINTER(GST_PROPS_LAST_ID_NUM)
|
2000-12-07 18:37:56 +00:00
|
|
|
|
|
|
|
#define GST_PROPS_LIST(a...) GST_PROPS_LIST_ID,##a,NULL
|
|
|
|
#define GST_PROPS_INT(a) GST_PROPS_INT_ID,(GINT_TO_POINTER(a))
|
|
|
|
#define GST_PROPS_INT_RANGE(a,b) GST_PROPS_INT_RANGE_ID,(GINT_TO_POINTER(a)),(GINT_TO_POINTER(b))
|
|
|
|
#define GST_PROPS_FOURCC(a,b,c,d) GST_PROPS_FOURCC_ID,(GINT_TO_POINTER((a)|(b)<<8|(c)<<16|(d)<<24))
|
|
|
|
#define GST_PROPS_FOURCC_INT(a) GST_PROPS_FOURCC_ID,(GINT_TO_POINTER(a))
|
|
|
|
#define GST_PROPS_BOOLEAN(a) GST_PROPS_BOOL_ID,(GINT_TO_POINTER(a))
|
|
|
|
|
|
|
|
|
|
|
|
struct _GstProps {
|
2001-01-03 20:21:22 +00:00
|
|
|
GList *properties; /* real properties for this property */
|
2000-12-07 18:37:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* initialize the subsystem */
|
|
|
|
void _gst_props_initialize (void);
|
|
|
|
|
|
|
|
GstProps* gst_props_register (GstPropsFactory factory);
|
2000-12-31 16:12:48 +00:00
|
|
|
GstProps* gst_props_register_count (GstPropsFactory factory, guint *counter);
|
2000-12-07 18:37:56 +00:00
|
|
|
|
2000-12-19 16:36:10 +00:00
|
|
|
GstProps* gst_props_new (GstPropsFactoryEntry entry, ...);
|
|
|
|
|
|
|
|
GstProps* gst_props_merge (GstProps *props, GstProps *tomerge);
|
|
|
|
|
2000-12-28 21:42:23 +00:00
|
|
|
gboolean gst_props_check_compatibility (GstProps *fromprops, GstProps *toprops);
|
2000-12-07 18:37:56 +00:00
|
|
|
|
2000-12-11 00:04:25 +00:00
|
|
|
xmlNodePtr gst_props_save_thyself (GstProps *props, xmlNodePtr parent);
|
|
|
|
GstProps* gst_props_load_thyself (xmlNodePtr parent);
|
|
|
|
|
2000-12-07 18:37:56 +00:00
|
|
|
#endif /* __GST_PROPS_H__ */
|