added a "iterate_started" signal which fires before the iterate of a bin. useful for non-threadsafe operations like s...

Original commit message from CVS:
added a "iterate_started" signal which fires before the iterate of a bin. useful for non-threadsafe operations like seek in threaded pipelines
This commit is contained in:
Steve Baker 2002-06-07 19:34:52 +00:00
parent 075ca64022
commit 9546949ebf
2 changed files with 8 additions and 0 deletions

View file

@ -59,6 +59,7 @@ static void gst_bin_restore_thyself (GstObject * object, xmlNodePtr self);
enum enum
{ {
OBJECT_ADDED, OBJECT_ADDED,
ITERATE_STARTED,
LAST_SIGNAL LAST_SIGNAL
}; };
@ -113,6 +114,10 @@ gst_bin_class_init (GstBinClass * klass)
g_signal_new ("object_added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, g_signal_new ("object_added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GstBinClass, object_added), NULL, NULL, G_STRUCT_OFFSET (GstBinClass, object_added), NULL, NULL,
gst_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); gst_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
gst_bin_signals[ITERATE_STARTED] =
g_signal_new ("iterate_started", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GstBinClass, iterate_started), NULL, NULL,
gst_marshal_VOID__VOID, G_TYPE_NONE, 0);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_bin_dispose); gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_bin_dispose);
@ -845,6 +850,8 @@ gst_bin_iterate (GstBin * bin)
oclass = GST_BIN_CLASS (G_OBJECT_GET_CLASS (bin)); oclass = GST_BIN_CLASS (G_OBJECT_GET_CLASS (bin));
g_signal_emit (G_OBJECT (bin), gst_bin_signals[ITERATE_STARTED], 0);
if (oclass->iterate) if (oclass->iterate)
running = (oclass->iterate) (bin); running = (oclass->iterate) (bin);

View file

@ -88,6 +88,7 @@ struct _GstBinClass {
/* signals */ /* signals */
void (*object_added) (GstObject *object, GstObject *child); void (*object_added) (GstObject *object, GstObject *child);
void (*object_removed) (GstObject *object, GstObject *child); void (*object_removed) (GstObject *object, GstObject *child);
void (*iterate_started) (GstObject *object);
/* change the state of elements of the given type */ /* change the state of elements of the given type */
gboolean (*change_state_type) (GstBin *bin, gboolean (*change_state_type) (GstBin *bin,