added gpointer private to pads, so elements can store ints or pointers for their own use

Original commit message from CVS:
added gpointer private to pads, so elements can store ints or pointers for their own use
This commit is contained in:
Erik Walthinsen 2001-01-11 22:03:01 +00:00
parent 34c122de48
commit 60daf21ed4
2 changed files with 18 additions and 0 deletions

View file

@ -1123,3 +1123,17 @@ gst_pad_select(GstPad *nextpad, ...) {
// now switch to the nextpad
*/
void
gst_pad_set_private (GstPad *pad, gpointer private)
{
pad->private = private;
}
gpointer
gst_pad_get_private (GstPad *pad)
{
return pad->private;
}

View file

@ -85,6 +85,7 @@ struct _GstPad {
gchar *name;
GList *caps;
gpointer private;
cothread_state *threadstate;
@ -182,6 +183,9 @@ gboolean gst_pad_check_compatibility (GstPad *srcpad, GstPad *sinkpad);
void gst_pad_set_name (GstPad *pad, const gchar *name);
const gchar* gst_pad_get_name (GstPad *pad);
void gst_pad_set_private (GstPad *pad, gpointer private);
gpointer gst_pad_get_private (GstPad *pad);
void gst_pad_set_parent (GstPad *pad, GstObject *parent);
GstObject* gst_pad_get_parent (GstPad *pad);
void gst_pad_add_ghost_parent (GstPad *pad, GstObject *parent);