mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 16:18:16 +00:00
gst/gstelement.*: add gst_element_no_more_pads and the "no-more-pads" signal
Original commit message from CVS: * gst/gstelement.c: (gst_element_class_init), (gst_element_no_more_pads): * gst/gstelement.h: add gst_element_no_more_pads and the "no-more-pads" signal
This commit is contained in:
parent
683e6c359f
commit
aafaa5b7e2
3 changed files with 37 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2004-05-10 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||||
|
|
||||||
|
* gst/gstelement.c: (gst_element_class_init),
|
||||||
|
(gst_element_no_more_pads):
|
||||||
|
* gst/gstelement.h:
|
||||||
|
add gst_element_no_more_pads and the "no-more-pads" signal
|
||||||
|
|
||||||
2004-05-10 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
2004-05-10 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||||
|
|
||||||
* gst/gstregistry.c: (gst_registry_add_plugin):
|
* gst/gstregistry.c: (gst_registry_add_plugin):
|
||||||
|
|
|
@ -44,6 +44,7 @@ enum
|
||||||
ERROR,
|
ERROR,
|
||||||
EOS,
|
EOS,
|
||||||
FOUND_TAG,
|
FOUND_TAG,
|
||||||
|
NO_MORE_PADS,
|
||||||
/* add more above */
|
/* add more above */
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
@ -147,6 +148,10 @@ gst_element_class_init (GstElementClass * klass)
|
||||||
G_STRUCT_OFFSET (GstElementClass, found_tag), NULL, NULL,
|
G_STRUCT_OFFSET (GstElementClass, found_tag), NULL, NULL,
|
||||||
gst_marshal_VOID__OBJECT_BOXED, G_TYPE_NONE, 2, GST_TYPE_ELEMENT,
|
gst_marshal_VOID__OBJECT_BOXED, G_TYPE_NONE, 2, GST_TYPE_ELEMENT,
|
||||||
GST_TYPE_TAG_LIST);
|
GST_TYPE_TAG_LIST);
|
||||||
|
gst_element_signals[FOUND_TAG] =
|
||||||
|
g_signal_new ("no-more-pads", G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstElementClass, no_more_pads), NULL,
|
||||||
|
NULL, gst_marshal_VOID__VOID, G_TYPE_NONE, 0);
|
||||||
|
|
||||||
gobject_class->set_property =
|
gobject_class->set_property =
|
||||||
GST_DEBUG_FUNCPTR (gst_element_real_set_property);
|
GST_DEBUG_FUNCPTR (gst_element_real_set_property);
|
||||||
|
@ -1220,6 +1225,23 @@ gst_element_remove_ghost_pad (GstElement * element, GstPad * pad)
|
||||||
gst_element_remove_pad (element, pad);
|
gst_element_remove_pad (element, pad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_element_no_more_pads:
|
||||||
|
* @element: a #GstElement
|
||||||
|
*
|
||||||
|
* Use this function to signal that the element does not expect any more pads
|
||||||
|
* to show up in the current pipeline. This function should be called whenever
|
||||||
|
* pads have been added by the element itself. Elements with GST_PAD_SOMETIMES
|
||||||
|
* pad templates use this in combination with autopluggers to figure out that
|
||||||
|
* the element is done initializing its pads.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_element_no_more_pads (GstElement * element)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GST_IS_ELEMENT (element));
|
||||||
|
|
||||||
|
g_signal_emit (element, gst_element_signals[NO_MORE_PADS], 0);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_element_get_pad:
|
* gst_element_get_pad:
|
||||||
|
|
|
@ -245,7 +245,11 @@ struct _GstElementClass {
|
||||||
void (*set_index) (GstElement *element, GstIndex *index);
|
void (*set_index) (GstElement *element, GstIndex *index);
|
||||||
|
|
||||||
GstElementStateReturn (*set_state) (GstElement *element, GstElementState state);
|
GstElementStateReturn (*set_state) (GstElement *element, GstElementState state);
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
|
||||||
|
/* FIXME 0.9: move up to signals */
|
||||||
|
void (*no_more_pads) (GstElement *element);
|
||||||
|
|
||||||
|
gpointer _gst_reserved[GST_PADDING - 1];
|
||||||
};
|
};
|
||||||
|
|
||||||
void gst_element_class_add_pad_template (GstElementClass *klass, GstPadTemplate *templ);
|
void gst_element_class_add_pad_template (GstElementClass *klass, GstPadTemplate *templ);
|
||||||
|
@ -313,7 +317,10 @@ GstScheduler* gst_element_get_scheduler (GstElement *element);
|
||||||
void gst_element_add_pad (GstElement *element, GstPad *pad);
|
void gst_element_add_pad (GstElement *element, GstPad *pad);
|
||||||
void gst_element_remove_pad (GstElement *element, GstPad *pad);
|
void gst_element_remove_pad (GstElement *element, GstPad *pad);
|
||||||
GstPad * gst_element_add_ghost_pad (GstElement *element, GstPad *pad, const gchar *name);
|
GstPad * gst_element_add_ghost_pad (GstElement *element, GstPad *pad, const gchar *name);
|
||||||
|
#ifndef GST_DISABLE_DEPRECATED
|
||||||
void gst_element_remove_ghost_pad (GstElement *element, GstPad *pad);
|
void gst_element_remove_ghost_pad (GstElement *element, GstPad *pad);
|
||||||
|
#endif
|
||||||
|
void gst_element_no_more_pads (GstElement *element);
|
||||||
|
|
||||||
GstPad* gst_element_get_pad (GstElement *element, const gchar *name);
|
GstPad* gst_element_get_pad (GstElement *element, const gchar *name);
|
||||||
GstPad* gst_element_get_static_pad (GstElement *element, const gchar *name);
|
GstPad* gst_element_get_static_pad (GstElement *element, const gchar *name);
|
||||||
|
|
Loading…
Reference in a new issue