gstpreset.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /* GStreamer
  2. * Copyright (C) 2006 Stefan Kost <[email protected]>
  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., 51 Franklin St, Fifth Floor,
  19. * Boston, MA 02110-1301, USA.
  20. */
  21. #ifndef __GST_PRESET_H__
  22. #define __GST_PRESET_H__
  23. #include <glib-object.h>
  24. #include <gst/gstconfig.h>
  25. G_BEGIN_DECLS
  26. #define GST_TYPE_PRESET (gst_preset_get_type())
  27. #define GST_PRESET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PRESET, GstPreset))
  28. #define GST_IS_PRESET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PRESET))
  29. #define GST_PRESET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_PRESET, GstPresetInterface))
  30. /**
  31. * GstPreset:
  32. *
  33. * Opaque #GstPreset data structure.
  34. */
  35. typedef struct _GstPreset GstPreset; /* dummy object */
  36. typedef struct _GstPresetInterface GstPresetInterface;
  37. /**
  38. * GstPresetInterface:
  39. * @parent: parent interface type.
  40. * @get_preset_names: virtual method to get list of presets
  41. * @get_property_names: virtual methods to get properties that are persistent
  42. * @load_preset: virtual methods to load a preset into properties
  43. * @save_preset: virtual methods to save properties into a preset
  44. * @rename_preset: virtual methods to rename a preset
  45. * @delete_preset: virtual methods to remove a preset
  46. * @set_meta: virtual methods to set textual meta data to a preset
  47. * @get_meta: virtual methods to get textual meta data from a preset
  48. *
  49. * #GstPreset interface.
  50. */
  51. struct _GstPresetInterface
  52. {
  53. GTypeInterface parent;
  54. /* methods */
  55. gchar** (*get_preset_names) (GstPreset *preset);
  56. gchar** (*get_property_names) (GstPreset *preset);
  57. gboolean (*load_preset) (GstPreset *preset, const gchar *name);
  58. gboolean (*save_preset) (GstPreset *preset, const gchar *name);
  59. gboolean (*rename_preset) (GstPreset *preset, const gchar *old_name,
  60. const gchar *new_name);
  61. gboolean (*delete_preset) (GstPreset *preset, const gchar *name);
  62. gboolean (*set_meta) (GstPreset *preset, const gchar *name,
  63. const gchar *tag, const gchar *value);
  64. gboolean (*get_meta) (GstPreset *preset, const gchar *name,
  65. const gchar *tag, gchar **value);
  66. /*< private >*/
  67. gpointer _gst_reserved[GST_PADDING];
  68. };
  69. GType gst_preset_get_type(void);
  70. gchar** gst_preset_get_preset_names (GstPreset *preset) G_GNUC_MALLOC;
  71. gchar** gst_preset_get_property_names (GstPreset *preset) G_GNUC_MALLOC;
  72. gboolean gst_preset_load_preset (GstPreset *preset, const gchar *name);
  73. gboolean gst_preset_save_preset (GstPreset *preset, const gchar *name);
  74. gboolean gst_preset_rename_preset (GstPreset *preset, const gchar *old_name,
  75. const gchar *new_name);
  76. gboolean gst_preset_delete_preset (GstPreset *preset, const gchar *name);
  77. gboolean gst_preset_set_meta (GstPreset *preset, const gchar *name,
  78. const gchar *tag, const gchar *value);
  79. gboolean gst_preset_get_meta (GstPreset *preset, const gchar *name,
  80. const gchar *tag, gchar **value);
  81. gboolean gst_preset_set_app_dir (const gchar *app_dir);
  82. const gchar *gst_preset_get_app_dir (void);
  83. G_END_DECLS
  84. #endif /* __GST_PRESET_H__ */