From 7a1ebbe0e3a19c4e2108ddbb50095add3d265d9d Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Mon, 23 Mar 2015 12:12:51 +0100 Subject: [PATCH] input-selector: Remove obsolete 'block' signal This signal blocks the input-selector with no means of unblocking other than a state change back to READY. It seems this signal was part of an old way of synchronously switching the selector, together with the already-removed 'switch' signal. Removing the signal is safe, as attempting to use it could only end in deadlocks. Attempting to emit an unknown signal just causes g_criticals. https://bugzilla.gnome.org/show_bug.cgi?id=736891 --- plugins/elements/gstinputselector.c | 50 ----------------------------- plugins/elements/gstinputselector.h | 2 -- 2 files changed, 52 deletions(-) diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c index b861f56594..25881d5705 100644 --- a/plugins/elements/gstinputselector.c +++ b/plugins/elements/gstinputselector.c @@ -125,15 +125,6 @@ enum PROP_PAD_ALWAYS_OK }; -enum -{ - /* methods */ - SIGNAL_BLOCK, - SIGNAL_SWITCH, - LAST_SIGNAL -}; -static guint gst_input_selector_signals[LAST_SIGNAL] = { 0 }; - static void gst_input_selector_active_pad_changed (GstInputSelector * sel, GParamSpec * pspec, gpointer user_data); static inline gboolean gst_input_selector_is_active_sinkpad (GstInputSelector * @@ -1178,7 +1169,6 @@ static GstStateChangeReturn gst_input_selector_change_state (GstElement * static gboolean gst_input_selector_event (GstPad * pad, GstObject * parent, GstEvent * event); -static gint64 gst_input_selector_block (GstInputSelector * self); #define _do_init \ GST_DEBUG_CATEGORY_INIT (input_selector_debug, \ @@ -1264,20 +1254,6 @@ gst_input_selector_class_init (GstInputSelectorClass * klass) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_MUTABLE_READY)); - /** - * GstInputSelector::block: - * @inputselector: the #GstInputSelector - * - * Block all sink pads in preparation for a switch. Returns the stop time of - * the current switch segment, as a running time, or 0 if there is no current - * active pad or the current active pad never received data. - */ - gst_input_selector_signals[SIGNAL_BLOCK] = - g_signal_new ("block", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, - G_STRUCT_OFFSET (GstInputSelectorClass, block), NULL, NULL, - g_cclosure_marshal_generic, G_TYPE_INT64, 0); - gst_element_class_set_static_metadata (gstelement_class, "Input selector", "Generic", "N-to-1 input stream selector", "Julien Moutte , " @@ -1291,8 +1267,6 @@ gst_input_selector_class_init (GstInputSelectorClass * klass) gstelement_class->request_new_pad = gst_input_selector_request_new_pad; gstelement_class->release_pad = gst_input_selector_release_pad; gstelement_class->change_state = gst_input_selector_change_state; - - klass->block = GST_DEBUG_FUNCPTR (gst_input_selector_block); } static void @@ -1740,27 +1714,3 @@ gst_input_selector_change_state (GstElement * element, return result; } - -static gint64 -gst_input_selector_block (GstInputSelector * self) -{ - gint64 ret = 0; - GstSelectorPad *spad; - - GST_INPUT_SELECTOR_LOCK (self); - - if (self->blocked) - GST_WARNING_OBJECT (self, "switch already blocked"); - - self->blocked = TRUE; - spad = GST_SELECTOR_PAD_CAST (self->active_sinkpad); - - if (spad) - ret = gst_selector_pad_get_running_time (spad); - else - GST_DEBUG_OBJECT (self, "no active pad while blocking"); - - GST_INPUT_SELECTOR_UNLOCK (self); - - return ret; -} diff --git a/plugins/elements/gstinputselector.h b/plugins/elements/gstinputselector.h index d3abad9ae0..6c37a42fe9 100644 --- a/plugins/elements/gstinputselector.h +++ b/plugins/elements/gstinputselector.h @@ -83,8 +83,6 @@ struct _GstInputSelector { struct _GstInputSelectorClass { GstElementClass parent_class; - - gint64 (*block) (GstInputSelector *self); }; G_GNUC_INTERNAL GType gst_input_selector_get_type (void);