diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2007-02-01 17:52:11 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2007-02-01 17:52:11 +0000 |
commit | a2d33623097a38c0246c7e2a013a7206dee3733f (patch) | |
tree | c916731c3517d78b26868253981fc2d5228bc201 /libs/gst/base/gstcollectpads.h | |
parent | 8f13fd2db1110ec0dc8485f0b18fdc27a41a2de6 (diff) | |
download | gstreamer-a2d33623097a38c0246c7e2a013a7206dee3733f.tar.gz |
API: Add function to specify a destroy notification for custom
Original commit message from CVS:
reviewed by: Wim Taymans <wim@fluendo.com>
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_finalize),
(unref_data), (gst_collect_pads_add_pad),
(gst_collect_pads_add_pad_full):
* libs/gst/base/gstcollectpads.h:
API: Add function to specify a destroy notification for custom
GstCollectData when adding new pads in GstCollectPads (#402393).
Diffstat (limited to 'libs/gst/base/gstcollectpads.h')
-rw-r--r-- | libs/gst/base/gstcollectpads.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/gst/base/gstcollectpads.h b/libs/gst/base/gstcollectpads.h index 7828b631be..660fc37220 100644 --- a/libs/gst/base/gstcollectpads.h +++ b/libs/gst/base/gstcollectpads.h @@ -38,6 +38,18 @@ typedef struct _GstCollectPads GstCollectPads; typedef struct _GstCollectPadsClass GstCollectPadsClass; /** + * GstCollectDataDestroyNotify: + * @data: the #GstCollectData that will be freed + * + * A function that will be called when the #GstCollectData will be freed. + * It is passed the pointer to the structure and should free any custom + * memory and resources allocated for it. + * + * Since: 0.10.12 + */ +typedef void (*GstCollectDataDestroyNotify) (GstCollectData *data); + +/** * GstCollectData: * @collect: owner #GstCollectPads * @pad: #GstPad managed by this data @@ -63,6 +75,8 @@ struct _GstCollectData gboolean new_segment; gboolean eos; gint refcount; + /* since 0.10.12 */ + GstCollectDataDestroyNotify destroy_notify; } ABI; /* adding + 0 to mark ABI change to be undone later */ gpointer _gst_reserved[GST_PADDING + 0]; @@ -149,6 +163,7 @@ void gst_collect_pads_set_function (GstCollectPads *pads, GstCollectPadsFuncti /* pad management */ GstCollectData* gst_collect_pads_add_pad (GstCollectPads *pads, GstPad *pad, guint size); +GstCollectData* gst_collect_pads_add_pad_full (GstCollectPads *pads, GstPad *pad, guint size, GstCollectDataDestroyNotify destroy_notify); gboolean gst_collect_pads_remove_pad (GstCollectPads *pads, GstPad *pad); gboolean gst_collect_pads_is_active (GstCollectPads *pads, GstPad *pad); |