]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/blob - gst/gstpreset.h
gst: sprinkle some G_GNUC_MALLOC
[glsdk/gstreamer0-10.git] / gst / gstpreset.h
1 /* GStreamer
2  * Copyright (C) 2006 Stefan Kost <ensonic@users.sf.net>
3  *
4  * gstpreset.h: helper interface header for element presets
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
22 #ifndef __GST_PRESET_H__
23 #define __GST_PRESET_H__
25 #include <glib-object.h>
27 G_BEGIN_DECLS
29 #define GST_TYPE_PRESET               (gst_preset_get_type())
30 #define GST_PRESET(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PRESET, GstPreset))
31 #define GST_IS_PRESET(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PRESET))
32 #define GST_PRESET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_PRESET, GstPresetInterface))
34 /**
35  * GstPreset:
36  *
37  * Opaque #GstPreset data structure.
38  */
39 typedef struct _GstPreset GstPreset; /* dummy object */
40 typedef struct _GstPresetInterface GstPresetInterface;
42 /**
43  * GstPresetInterface:
44  * @parent: parent interface type.
45  * @get_preset_names: virtual method to get list of presets
46  * @get_property_names: virtual methods to get properties that are persistent
47  * @load_preset: virtual methods to load a preset into properties
48  * @save_preset: virtual methods to save properties into a preset
49  * @rename_preset: virtual methods to rename a preset
50  * @delete_preset: virtual methods to remove a preset
51  * @set_meta: virtual methods to set textual meta data to a preset
52  * @get_meta: virtual methods to get textual meta data from a preset
53  *
54  * #GstPreset interface.
55  */
56 struct _GstPresetInterface
57 {
58   GTypeInterface parent;
60   /* methods */
61   gchar**      (*get_preset_names)    (GstPreset *preset);
63   gchar**      (*get_property_names)  (GstPreset *preset);
65   gboolean     (*load_preset)         (GstPreset *preset, const gchar *name);
66   gboolean     (*save_preset)         (GstPreset *preset, const gchar *name);
67   gboolean     (*rename_preset)       (GstPreset *preset, const gchar *old_name,
68                                        const gchar *new_name);
69   gboolean     (*delete_preset)       (GstPreset *preset, const gchar *name);
70   
71   gboolean     (*set_meta)            (GstPreset *preset, const gchar *name,
72                                        const gchar *tag, const gchar *value);
73   gboolean     (*get_meta)            (GstPreset *preset, const gchar *name,
74                                        const gchar *tag, gchar **value);
75   /*< private >*/
76   gpointer _gst_reserved[GST_PADDING];
77 };
79 GType gst_preset_get_type(void);
81 gchar**      gst_preset_get_preset_names   (GstPreset *preset) G_GNUC_MALLOC;
83 gchar**      gst_preset_get_property_names (GstPreset *preset) G_GNUC_MALLOC;
85 gboolean     gst_preset_load_preset        (GstPreset *preset, const gchar *name);
86 gboolean     gst_preset_save_preset        (GstPreset *preset, const gchar *name);
87 gboolean     gst_preset_rename_preset      (GstPreset *preset, const gchar *old_name,
88                                             const gchar *new_name);
89 gboolean     gst_preset_delete_preset      (GstPreset *preset, const gchar *name);
91 gboolean     gst_preset_set_meta           (GstPreset *preset, const gchar *name,
92                                             const gchar *tag, const gchar *value);
93 gboolean     gst_preset_get_meta           (GstPreset *preset, const gchar *name,
94                                             const gchar *tag, gchar **value);
96 G_END_DECLS
98 #endif /* __GST_PRESET_H__ */