diff --git a/gst/gstbuffer.h b/gst/gstbuffer.h index dc3a50161d..68c3e73088 100644 --- a/gst/gstbuffer.h +++ b/gst/gstbuffer.h @@ -40,7 +40,7 @@ typedef struct _GstBuffer GstBuffer; #define GST_BUFFER_TRACE_NAME "GstBuffer" #define GST_TYPE_BUFFER (gst_buffer_get_type()) -#define GST_IS_BUFFER(obj) (GST_MINI_OBJECT_TYPE(obj) == GST_TYPE_BUFFER) +#define GST_IS_BUFFER(obj) (GST_IS_MINI_OBJECT_TYPE(obj, GST_TYPE_BUFFER)) #define GST_BUFFER_CAST(obj) ((GstBuffer *)(obj)) #define GST_BUFFER(obj) (GST_BUFFER_CAST(obj)) diff --git a/gst/gstbufferlist.h b/gst/gstbufferlist.h index 8d536912c7..80f26fea94 100644 --- a/gst/gstbufferlist.h +++ b/gst/gstbufferlist.h @@ -27,10 +27,10 @@ G_BEGIN_DECLS -#define GST_TYPE_BUFFER_LIST (gst_buffer_list_get_type ()) -#define GST_IS_BUFFER_LIST(obj) (GST_MINI_OBJECT_TYPE(obj) == GST_TYPE_BUFFER_LIST) +#define GST_TYPE_BUFFER_LIST (gst_buffer_list_get_type ()) +#define GST_IS_BUFFER_LIST(obj) (GST_IS_MINI_OBJECT_TYPE(obj, GST_TYPE_BUFFER_LIST)) #define GST_BUFFER_LIST_CAST(obj) ((GstBufferList *)obj) -#define GST_BUFFER_LIST(obj) (GST_BUFFER_LIST_CAST(obj)) +#define GST_BUFFER_LIST(obj) (GST_BUFFER_LIST_CAST(obj)) typedef struct _GstBufferList GstBufferList; typedef struct _GstBufferListIterator GstBufferListIterator; diff --git a/gst/gstcaps.c b/gst/gstcaps.c index e57ea60ad2..7245d64ece 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -204,7 +204,6 @@ gst_caps_init (GstCaps * caps) caps->structs = g_ptr_array_new (); } - /** * gst_caps_new_empty: * diff --git a/gst/gstcaps.h b/gst/gstcaps.h index b95439cc91..c58c630525 100644 --- a/gst/gstcaps.h +++ b/gst/gstcaps.h @@ -29,7 +29,7 @@ G_BEGIN_DECLS #define GST_TYPE_CAPS (gst_caps_get_type()) #define GST_CAPS(object) ((GstCaps*)object) -#define GST_IS_CAPS(object) ((object) && (GST_MINI_OBJECT_TYPE(object) == GST_TYPE_CAPS)) +#define GST_IS_CAPS(object) (GST_IS_MINI_OBJECT_TYPE(object, GST_TYPE_CAPS)) #define GST_TYPE_STATIC_CAPS (gst_static_caps_get_type()) diff --git a/gst/gstevent.h b/gst/gstevent.h index d2ab2d7777..a8b35d3d0d 100644 --- a/gst/gstevent.h +++ b/gst/gstevent.h @@ -159,7 +159,7 @@ typedef enum { typedef struct _GstEvent GstEvent; #define GST_TYPE_EVENT (gst_event_get_type()) -#define GST_IS_EVENT(obj) ((obj) && GST_MINI_OBJECT_TYPE (obj) == GST_TYPE_EVENT) +#define GST_IS_EVENT(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_EVENT)) #define GST_EVENT(obj) ((GstEvent *)(obj)) #define GST_EVENT_CAST(obj) ((GstEvent *)(obj)) diff --git a/gst/gstmessage.h b/gst/gstmessage.h index 7c6f464c3a..2b4783b474 100644 --- a/gst/gstmessage.h +++ b/gst/gstmessage.h @@ -141,7 +141,7 @@ typedef enum #define GST_MESSAGE_TRACE_NAME "GstMessage" #define GST_TYPE_MESSAGE (gst_message_get_type()) -#define GST_IS_MESSAGE(obj) (GST_MINI_OBJECT_TYPE (obj) == GST_TYPE_MESSAGE) +#define GST_IS_MESSAGE(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_MESSAGE)) #define GST_MESSAGE_CAST(obj) ((GstMessage*)(obj)) #define GST_MESSAGE(obj) (GST_MESSAGE_CAST(obj)) diff --git a/gst/gstminiobject.h b/gst/gstminiobject.h index 139a6ca638..86cc56a8a4 100644 --- a/gst/gstminiobject.h +++ b/gst/gstminiobject.h @@ -29,8 +29,10 @@ G_BEGIN_DECLS -#define GST_MINI_OBJECT_CAST(obj) ((GstMiniObject*)(obj)) -#define GST_MINI_OBJECT_CONST_CAST(obj) ((const GstMiniObject*)(obj)) +#define GST_IS_MINI_OBJECT_TYPE(obj,type) ((obj) && GST_MINI_OBJECT_TYPE(obj) == (type)) +#define GST_MINI_OBJECT_CAST(obj) ((GstMiniObject*)(obj)) +#define GST_MINI_OBJECT_CONST_CAST(obj) ((const GstMiniObject*)(obj)) +#define GST_MINI_OBJECT(obj) (GST_MINI_OBJECT_CAST(obj)) typedef struct _GstMiniObject GstMiniObject; diff --git a/gst/gstquery.h b/gst/gstquery.h index af3fe85aca..5abd4d0aa7 100644 --- a/gst/gstquery.h +++ b/gst/gstquery.h @@ -109,7 +109,7 @@ struct _GstQueryTypeDefinition }; #define GST_TYPE_QUERY (gst_query_get_type()) -#define GST_IS_QUERY(obj) (GST_MINI_OBJECT_TYPE (obj) == GST_TYPE_QUERY) +#define GST_IS_QUERY(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_QUERY)) #define GST_QUERY_CAST(obj) ((GstQuery*)(obj)) #define GST_QUERY(obj) (GST_QUERY_CAST(obj))