From 99d4880f319bc224672c5ac14689401e97340961 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 4 Aug 2011 17:12:21 +0200 Subject: [PATCH] pad: add method to mark reconfigure --- gst/gstpad.c | 17 +++++++++++++++++ gst/gstpad.h | 1 + 2 files changed, 18 insertions(+) diff --git a/gst/gstpad.c b/gst/gstpad.c index bf1c70d..6e83033 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -1264,6 +1264,23 @@ gst_pad_check_reconfigure (GstPad * pad) } /** + * gst_pad_mark_reconfigure: + * @pad: the #GstPad to mark + * + * Mark a pad for needing reconfiguration. The next call to + * gst_pad_check_reconfigure() will return %TRUE after this call. + */ +void +gst_pad_mark_reconfigure (GstPad * pad) +{ + g_return_if_fail (GST_IS_PAD (pad)); + + GST_OBJECT_LOCK (pad); + GST_OBJECT_FLAG_SET (pad, GST_PAD_NEED_RECONFIGURE); + GST_OBJECT_UNLOCK (pad); +} + +/** * gst_pad_set_activate_function: * @pad: a #GstPad. * @activate: the #GstPadActivateFunction to set. diff --git a/gst/gstpad.h b/gst/gstpad.h index b22bfad..999a537 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -827,6 +827,7 @@ void gst_pad_remove_probe (GstPad *pad, gu gboolean gst_pad_is_blocked (GstPad *pad); gboolean gst_pad_is_blocking (GstPad *pad); +void gst_pad_mark_reconfigure (GstPad *pad); gboolean gst_pad_check_reconfigure (GstPad *pad); void gst_pad_set_element_private (GstPad *pad, gpointer priv); -- 2.7.4