latency: Dot not override already stored events
[platform/upstream/gstreamer.git] / gst / gstpluginfeature.h
index b8db0f4..d8db095 100644 (file)
@@ -16,8 +16,8 @@
  *
  * 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.
  */
 
 
@@ -38,6 +38,11 @@ G_BEGIN_DECLS
 #define GST_PLUGIN_FEATURE_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PLUGIN_FEATURE, GstPluginFeatureClass))
 #define GST_PLUGIN_FEATURE_CAST(obj)            ((GstPluginFeature*)(obj))
 
+/**
+ * GstPluginFeature:
+ *
+ * Opaque #GstPluginFeature structure.
+ */
 typedef struct _GstPluginFeature GstPluginFeature;
 typedef struct _GstPluginFeatureClass GstPluginFeatureClass;
 
@@ -67,15 +72,13 @@ typedef enum {
  * gst_plugin_feature_get_name:
  * @feature: a #GstPluginFeature to get the name of @feature.
  *
- * Returns a copy of the name of @feature.
- * Caller should g_free() the return value after usage.
- * For a nameless plugin feature, this returns NULL, which you can safely g_free()
- * as well.
+ * Returns the name of @feature.
+ * For a nameless plugin feature, this returns %NULL.
  *
- * Returns: (transfer full): the name of @feature. g_free() after usage. MT safe.
+ * Returns: (transfer none) (nullable): the name of @feature. MT safe.
  *
  */
-#define                 gst_plugin_feature_get_name(feature)      gst_object_get_name(GST_OBJECT_CAST(feature))
+#define                 gst_plugin_feature_get_name(feature)      GST_OBJECT_NAME(feature)
 
 /**
  * gst_plugin_feature_set_name:
@@ -87,44 +90,6 @@ typedef enum {
 #define                 gst_plugin_feature_set_name(feature,name) gst_object_set_name(GST_OBJECT_CAST(feature),name)
 
 /**
- * GstPluginFeature:
- *
- * Opaque #GstPluginFeature structure.
- */
-struct _GstPluginFeature {
-  GstObject      object;
-
-  /*< private >*/
-  gboolean       loaded;
-  guint          rank;
-
-  const gchar   *plugin_name;
-  GstPlugin     *plugin;      /* weak ref */
-
-  /*< private >*/
-  gpointer _gst_reserved[GST_PADDING - 1];
-};
-
-struct _GstPluginFeatureClass {
-  GstObjectClass        parent_class;
-
-  /*< private >*/
-  gpointer _gst_reserved[GST_PADDING];
-};
-
-/**
- * GstTypeNameData:
- * @name: a name
- * @type: a GType
- *
- * Structure used for filtering based on @name and @type.
- */
-typedef struct {
-  const gchar   *name;
-  GType          type;
-} GstTypeNameData;
-
-/**
  * GstPluginFeatureFilter:
  * @feature: the pluginfeature to check
  * @user_data: the user_data that has been passed on e.g.
@@ -139,19 +104,33 @@ typedef gboolean        (*GstPluginFeatureFilter)       (GstPluginFeature *featu
                                                          gpointer user_data);
 
 /* normal GObject stuff */
+
+GST_API
 GType           gst_plugin_feature_get_type             (void);
 
+GST_API
 GstPluginFeature *
                 gst_plugin_feature_load                 (GstPluginFeature *feature);
 
-gboolean        gst_plugin_feature_type_name_filter     (GstPluginFeature *feature,
-                                                         GstTypeNameData *data);
-
+GST_API
 void            gst_plugin_feature_set_rank             (GstPluginFeature *feature, guint rank);
+
+GST_API
 guint           gst_plugin_feature_get_rank             (GstPluginFeature *feature);
 
+GST_API
+GstPlugin     * gst_plugin_feature_get_plugin           (GstPluginFeature *feature);
+
+GST_API
+const gchar   * gst_plugin_feature_get_plugin_name      (GstPluginFeature *feature);
+
+GST_API
 void            gst_plugin_feature_list_free            (GList *list);
-GList          *gst_plugin_feature_list_copy            (GList *list);
+
+GST_API
+GList          *gst_plugin_feature_list_copy            (GList *list) G_GNUC_MALLOC;
+
+GST_API
 void            gst_plugin_feature_list_debug           (GList *list);
 
 /**
@@ -160,8 +139,6 @@ void            gst_plugin_feature_list_debug           (GList *list);
  *     plugin features
  *
  * Debug the plugin feature names in @list.
- *
- * Since: 0.10.31
  */
 #ifndef GST_DISABLE_GST_DEBUG
 #define GST_PLUGIN_FEATURE_LIST_DEBUG(list) gst_plugin_feature_list_debug(list)
@@ -169,13 +146,19 @@ void            gst_plugin_feature_list_debug           (GList *list);
 #define GST_PLUGIN_FEATURE_LIST_DEBUG(list)
 #endif
 
+GST_API
 gboolean        gst_plugin_feature_check_version        (GstPluginFeature *feature,
                                                          guint             min_major,
                                                          guint             min_minor,
                                                          guint             min_micro);
+GST_API
 gint            gst_plugin_feature_rank_compare_func    (gconstpointer p1,
                                                         gconstpointer p2);
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPluginFeature, gst_object_unref)
+#endif
+
 G_END_DECLS