pad: fix some macros

Remove a rather usless macro to check if a pad mode is active and
add GST_PAD_IS_ACTIVE().
This commit is contained in:
Wim Taymans 2011-08-15 13:24:11 +02:00
parent 61143b7840
commit cbccf7d5bf
2 changed files with 3 additions and 10 deletions

View file

@ -1021,7 +1021,7 @@ gst_pad_is_active (GstPad * pad)
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
GST_OBJECT_LOCK (pad);
result = GST_PAD_MODE_ACTIVATE (GST_PAD_ACTIVATE_MODE (pad));
result = GST_PAD_IS_ACTIVE (pad);
GST_OBJECT_UNLOCK (pad);
return result;

View file

@ -227,15 +227,6 @@ typedef enum {
GST_ACTIVATE_PULL
} GstActivateMode;
/**
* GST_PAD_MODE_ACTIVATE:
* @mode: a #GstActivateMode
*
* Macro to test if the given #GstActivateMode value indicates that datapassing
* is possible or not.
*/
#define GST_PAD_MODE_ACTIVATE(mode) ((mode) != GST_ACTIVATE_NONE)
/* pad states */
/**
* GstPadActivateFunction:
@ -718,6 +709,8 @@ struct _GstPadClass {
#define GST_PAD_IS_LINKED(pad) (GST_PAD_PEER(pad) != NULL)
#define GST_PAD_IS_ACTIVE(pad) (GST_PAD_ACTIVATE_MODE(pad) != GST_ACTIVATE_NONE)
#define GST_PAD_IS_BLOCKED(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_BLOCKED))
#define GST_PAD_IS_BLOCKING(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_BLOCKING))
#define GST_PAD_IS_FLUSHING(pad) (GST_OBJECT_FLAG_IS_SET (pad, GST_PAD_FLUSHING))