mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
fixed up and turned back on GST_SCHEDULE_SAFETY
Original commit message from CVS: fixed up and turned back on GST_SCHEDULE_SAFETY
This commit is contained in:
parent
f3098e9546
commit
eb6a6267bd
1 changed files with 28 additions and 20 deletions
|
@ -77,27 +77,35 @@ struct _GstScheduleClass {
|
||||||
GstObjectClass parent_class;
|
GstObjectClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
//#define GST_SCHEDULE_SAFETY if (sched)
|
#define GST_SCHEDULE_SAFETY(sched) if (sched)
|
||||||
#define GST_SCHEDULE_SAFETY
|
//#define GST_SCHEDULE_SAFETY(sched)
|
||||||
|
|
||||||
#define GST_SCHEDULE_ADD_ELEMENT(sched,element) \
|
#define GST_SCHEDULE_ADD_ELEMENT(sched,element) G_STMT_START{ \
|
||||||
GST_SCHEDULE_SAFETY ((sched)->add_element((sched),(element)))
|
GST_SCHEDULE_SAFETY(sched) { ((sched)->add_element((sched),(element))); } \
|
||||||
#define GST_SCHEDULE_REMOVE_ELEMENT(sched,element) \
|
}G_STMT_END
|
||||||
GST_SCHEDULE_SAFETY ((sched)->remove_element((sched),(element)))
|
#define GST_SCHEDULE_REMOVE_ELEMENT(sched,element) G_STMT_START{ \
|
||||||
#define GST_SCHEDULE_ENABLE_ELEMENT(sched,element) \
|
GST_SCHEDULE_SAFETY(sched) { ((sched)->remove_element((sched),(element))); } \
|
||||||
GST_SCHEDULE_SAFETY ((sched)->enable_element((sched),(element)))
|
}G_STMT_END
|
||||||
#define GST_SCHEDULE_DISABLE_ELEMENT(sched,element) \
|
#define GST_SCHEDULE_ENABLE_ELEMENT(sched,element) G_STMT_START{ \
|
||||||
GST_SCHEDULE_SAFETY ((sched)->disable_element((sched),(element)))
|
GST_SCHEDULE_SAFETY(sched) { ((sched)->enable_element((sched),(element))); } \
|
||||||
#define GST_SCHEDULE_LOCK_ELEMENT(sched,element) \
|
}G_STMT_END
|
||||||
GST_SCHEDULE_SAFETY if ((sched)->lock_element != NULL) \
|
#define GST_SCHEDULE_DISABLE_ELEMENT(sched,element) G_STMT_START{ \
|
||||||
((sched)->lock_element((sched),(element)))
|
GST_SCHEDULE_SAFETY(sched) { ((sched)->disable_element((sched),(element))); } \
|
||||||
#define GST_SCHEDULE_UNLOCK_ELEMENT(sched,element) \
|
}G_STMT_END
|
||||||
GST_SCHEDULE_SAFETY if ((sched)->unlock_element != NULL) \
|
#define GST_SCHEDULE_LOCK_ELEMENT(sched,element) G_STMT_START{ \
|
||||||
((sched)->unlock_element((sched),(element)))
|
GST_SCHEDULE_SAFETY(sched) { if ((sched)->lock_element != NULL) \
|
||||||
#define GST_SCHEDULE_PAD_CONNECT(sched,srcpad,sinkpad) \
|
((sched)->lock_element((sched),(element))); } \
|
||||||
GST_SCHEDULE_SAFETY ((sched)->pad_connect((sched),(srcpad),(sinkpad)))
|
}G_STMT_END
|
||||||
#define GST_SCHEDULE_PAD_DISCONNECT(sched,srcpad,sinkpad) \
|
#define GST_SCHEDULE_UNLOCK_ELEMENT(sched,element) G_STMT_START{ \
|
||||||
GST_SCHEDULE_SAFETY ((sched)->pad_disconnect((sched),(srcpad),(sinkpad)))
|
GST_SCHEDULE_SAFETY(sched) { if ((sched)->unlock_element != NULL) \
|
||||||
|
((sched)->unlock_element((sched),(element))); } \
|
||||||
|
}G_STMT_END
|
||||||
|
#define GST_SCHEDULE_PAD_CONNECT(sched,srcpad,sinkpad) G_STMT_START{ \
|
||||||
|
GST_SCHEDULE_SAFETY(sched) { ((sched)->pad_connect((sched),(srcpad),(sinkpad))); } \
|
||||||
|
}G_STMT_END
|
||||||
|
#define GST_SCHEDULE_PAD_DISCONNECT(sched,srcpad,sinkpad) G_STMT_START{ \
|
||||||
|
GST_SCHEDULE_SAFETY(sched) { ((sched)->pad_disconnect((sched),(srcpad),(sinkpad))); } \
|
||||||
|
}G_STMT_END
|
||||||
#define GST_SCHEDULE_ITERATE(sched) \
|
#define GST_SCHEDULE_ITERATE(sched) \
|
||||||
((sched)->iterate((sched)))
|
((sched)->iterate((sched)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue