+ * gst_bin_set_suppressed_flags:
+ * @bin: a #GstBin
+ * @flags: the #GstElementFlags to suppress
+ *
+ * Suppress the given flags on the bin. #GstElementFlags of a
+ * child element are propagated when it is added to the bin.
+ * When suppressed flags are set, those specified flags will
+ * not be propagated to the bin.
+ *
+ * MT safe.
+ *
+ * Since: 1.10
+ */
+void
+gst_bin_set_suppressed_flags (GstBin * bin, GstElementFlags flags)
+{
+ g_return_if_fail (GST_IS_BIN (bin));
+
+ GST_OBJECT_LOCK (bin);
+ bin->priv->suppressed_flags = bin->priv->suppressed_flags | flags;
+ GST_OBJECT_UNLOCK (bin);
+
+ GST_DEBUG_OBJECT (bin, "Set suppressed flags(0x%x) to bin '%s'", flags,
+ GST_ELEMENT_NAME (bin));
+}
+
+/**
+ * gst_bin_get_suppressed_flags:
+ * @bin: a #GstBin
+ *
+ * Return the suppressed flags of the bin.
+ *
+ * MT safe.
+ *
+ * Returns: the bin's suppressed #GstElementFlags.
+ *
+ * Since: 1.10
+ */
+GstElementFlags
+gst_bin_get_suppressed_flags (GstBin * bin)
+{
+ GstElementFlags res;
+
+ g_return_val_if_fail (GST_IS_BIN (bin), 0);
+
+ GST_OBJECT_LOCK (bin);
+ res = bin->priv->suppressed_flags;
+ GST_OBJECT_UNLOCK (bin);
+
+ return res;
+}
+
+/* signal vfunc, will be called when a new element was added */
+static void
+gst_bin_deep_element_added_func (GstBin * bin, GstBin * sub_bin,
+ GstElement * child)
+{
+ GstBin *parent_bin;
+
+ parent_bin = (GstBin *) gst_object_get_parent (GST_OBJECT_CAST (bin));
+ if (parent_bin == NULL) {
+ GST_LOG_OBJECT (bin, "no parent, reached top-level");
+ return;
+ }
+
+ GST_LOG_OBJECT (parent_bin, "emitting deep-element-added for element "
+ "%" GST_PTR_FORMAT " which has just been added to %" GST_PTR_FORMAT,
+ child, sub_bin);
+
+ g_signal_emit (parent_bin, gst_bin_signals[DEEP_ELEMENT_ADDED], 0, sub_bin,
+ child);
+
+ gst_object_unref (parent_bin);
+}
+
+/* signal vfunc, will be called when an element was removed */
+static void
+gst_bin_deep_element_removed_func (GstBin * bin, GstBin * sub_bin,
+ GstElement * child)
+{
+ GstBin *parent_bin;
+
+ parent_bin = (GstBin *) gst_object_get_parent (GST_OBJECT_CAST (bin));
+ if (parent_bin == NULL) {
+ GST_LOG_OBJECT (bin, "no parent, reached top-level");
+ return;
+ }
+
+ GST_LOG_OBJECT (parent_bin, "emitting deep-element-removed for element "
+ "%" GST_PTR_FORMAT " which has just been removed from %" GST_PTR_FORMAT,
+ sub_bin, child);
+
+ g_signal_emit (parent_bin, gst_bin_signals[DEEP_ELEMENT_REMOVED], 0, sub_bin,
+ child);
+
+ gst_object_unref (parent_bin);
+}
+
+/**