mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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:
parent
61143b7840
commit
cbccf7d5bf
2 changed files with 3 additions and 10 deletions
|
@ -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;
|
||||
|
|
11
gst/gstpad.h
11
gst/gstpad.h
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue