pad: add _check_reconfigure() method

Add a method to check and clear the RECONFIGURE flag on a pad.
This commit is contained in:
Wim Taymans 2011-06-10 17:32:20 +02:00
parent eeb07b3f3d
commit 2d6a59aa83
2 changed files with 26 additions and 0 deletions

View file

@ -1239,6 +1239,30 @@ gst_pad_is_blocking (GstPad * pad)
return result;
}
/**
* gst_pad_check_reconfigure:
* @pad: the #GstPad to check
*
* Check and clear the #GST_PAD_NEED_RECONFIGURE flag on @pad and return %TRUE
* if the flag was set.
*
* Returns: %TRUE is the GST_PAD_NEED_RECONFIGURE flag was set on @pad.
*/
gboolean
gst_pad_check_reconfigure (GstPad * pad)
{
gboolean reconfigure;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
GST_OBJECT_LOCK (pad);
reconfigure = GST_PAD_NEEDS_RECONFIGURE (pad);
GST_OBJECT_FLAG_UNSET (pad, GST_PAD_NEED_RECONFIGURE);
GST_OBJECT_UNLOCK (pad);
return reconfigure;
}
/**
* gst_pad_set_activate_function:
* @pad: a #GstPad.

View file

@ -827,6 +827,8 @@ void gst_pad_remove_probe (GstPad *pad, gu
gboolean gst_pad_is_blocked (GstPad *pad);
gboolean gst_pad_is_blocking (GstPad *pad);
gboolean gst_pad_check_reconfigure (GstPad *pad);
void gst_pad_set_element_private (GstPad *pad, gpointer priv);
gpointer gst_pad_get_element_private (GstPad *pad);