tracer: latency: Show element id, element name and pad name
[platform/upstream/gstreamer.git] / gst / gstpreset.h
index fab9bab..65c19a2 100644 (file)
  *
  * 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.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 #ifndef __GST_PRESET_H__
 #define __GST_PRESET_H__
 
 #include <glib-object.h>
-#include <gst/gst.h>
-#include <gst/controller/gstcontroller.h>
+#include <gst/gstconfig.h>
 
 G_BEGIN_DECLS
 
@@ -33,49 +32,86 @@ G_BEGIN_DECLS
 #define GST_IS_PRESET(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PRESET))
 #define GST_PRESET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_PRESET, GstPresetInterface))
 
-
+/**
+ * GstPreset:
+ *
+ * Opaque #GstPreset data structure.
+ */
 typedef struct _GstPreset GstPreset; /* dummy object */
 typedef struct _GstPresetInterface GstPresetInterface;
 
+/**
+ * GstPresetInterface:
+ * @parent: parent interface type.
+ * @get_preset_names: virtual method to get list of presets
+ * @get_property_names: virtual methods to get properties that are persistent
+ * @load_preset: virtual methods to load a preset into properties
+ * @save_preset: virtual methods to save properties into a preset
+ * @rename_preset: virtual methods to rename a preset
+ * @delete_preset: virtual methods to remove a preset
+ * @set_meta: virtual methods to set textual meta data to a preset
+ * @get_meta: virtual methods to get textual meta data from a preset
+ *
+ * #GstPreset interface.
+ */
 struct _GstPresetInterface
 {
   GTypeInterface parent;
 
-  GList* (*get_preset_names) (GstPreset *self);
-
-  gboolean (*load_preset) (GstPreset *self, const gchar *name);
-  gboolean (*save_preset) (GstPreset *self, const gchar *name);
-  gboolean (*rename_preset) (GstPreset *self, const gchar *old_name, const gchar *new_name);
-  gboolean (*delete_preset) (GstPreset *self, const gchar *name);
-  
-  gboolean (*set_meta) (GstPreset *self,const gchar *name, const gchar *tag, gchar *value);
-  gboolean (*get_meta) (GstPreset *self,const gchar *name, const gchar *tag, gchar **value);
-
-  void (*create_preset) (GstPreset *self);
-  
-  /* @todo:
-   *
-   * need a presets-changed signal, to notify of changes in preset list
-   *
-   * need a way to sync class instances, we want to keep only one list for all
-   * instances of a type and if the list changes, we trigger the signal for all
-   * instance
-   */
+  /* methods */
+  gchar**      (*get_preset_names)    (GstPreset *preset);
+
+  gchar**      (*get_property_names)  (GstPreset *preset);
+
+  gboolean     (*load_preset)         (GstPreset *preset, const gchar *name);
+  gboolean     (*save_preset)         (GstPreset *preset, const gchar *name);
+  gboolean     (*rename_preset)       (GstPreset *preset, const gchar *old_name,
+                                       const gchar *new_name);
+  gboolean     (*delete_preset)       (GstPreset *preset, const gchar *name);
+
+  gboolean     (*set_meta)            (GstPreset *preset, const gchar *name,
+                                       const gchar *tag, const gchar *value);
+  gboolean     (*get_meta)            (GstPreset *preset, const gchar *name,
+                                       const gchar *tag, gchar **value);
+  /*< private >*/
+  gpointer _gst_reserved[GST_PADDING];
 };
 
-GType gst_preset_get_type(void);
+GST_API
+GType        gst_preset_get_type (void);
+
+GST_API
+gchar**      gst_preset_get_preset_names   (GstPreset *preset) G_GNUC_MALLOC;
+
+GST_API
+gchar**      gst_preset_get_property_names (GstPreset *preset) G_GNUC_MALLOC;
+
+GST_API
+gboolean     gst_preset_load_preset        (GstPreset *preset, const gchar *name);
+
+GST_API
+gboolean     gst_preset_save_preset        (GstPreset *preset, const gchar *name);
 
-GList* gst_preset_get_preset_names (GstPreset *self);
+GST_API
+gboolean     gst_preset_rename_preset      (GstPreset *preset, const gchar *old_name,
+                                            const gchar *new_name);
+GST_API
+gboolean     gst_preset_delete_preset      (GstPreset *preset, const gchar *name);
 
-gboolean gst_preset_load_preset (GstPreset *self, const gchar *name);
-gboolean gst_preset_save_preset (GstPreset *self, const gchar *name);
-gboolean gst_preset_rename_preset (GstPreset *self, const gchar *old_name, const gchar *new_name);
-gboolean gst_preset_delete_preset (GstPreset *self, const gchar *name);
+GST_API
+gboolean     gst_preset_set_meta           (GstPreset *preset, const gchar *name,
+                                            const gchar *tag, const gchar *value);
+GST_API
+gboolean     gst_preset_get_meta           (GstPreset *preset, const gchar *name,
+                                            const gchar *tag, gchar **value);
+GST_API
+gboolean     gst_preset_set_app_dir        (const gchar *app_dir);
 
-gboolean gst_preset_set_meta (GstPreset *self,const gchar *name, const gchar *tag, gchar *value);
-gboolean gst_preset_get_meta (GstPreset *self,const gchar *name, const gchar *tag, gchar **value);
+GST_API
+const gchar *gst_preset_get_app_dir        (void);
 
-void gst_preset_create_preset (GstPreset *self);
+GST_API
+gboolean     gst_preset_is_editable        (GstPreset *preset);
 
 G_END_DECLS