mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-28 14:52:24 +00:00
pad: add _check_reconfigure() method
Add a method to check and clear the RECONFIGURE flag on a pad.
This commit is contained in:
parent
eeb07b3f3d
commit
2d6a59aa83
2 changed files with 26 additions and 0 deletions
24
gst/gstpad.c
24
gst/gstpad.c
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue