mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
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:
parent
075ca64022
commit
9546949ebf
2 changed files with 8 additions and 0 deletions
|
@ -59,6 +59,7 @@ static void gst_bin_restore_thyself (GstObject * object, xmlNodePtr self);
|
|||
enum
|
||||
{
|
||||
OBJECT_ADDED,
|
||||
ITERATE_STARTED,
|
||||
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_STRUCT_OFFSET (GstBinClass, object_added), NULL, NULL,
|
||||
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);
|
||||
|
||||
|
@ -845,6 +850,8 @@ gst_bin_iterate (GstBin * 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)
|
||||
running = (oclass->iterate) (bin);
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ struct _GstBinClass {
|
|||
/* signals */
|
||||
void (*object_added) (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 */
|
||||
gboolean (*change_state_type) (GstBin *bin,
|
||||
|
|
Loading…
Reference in a new issue