Commit 85a63494 authored by David Schleef's avatar David Schleef

Add padding to structures and objects

Original commit message from CVS:
Add padding to structures and objects
parent f2064427
......@@ -54,6 +54,8 @@ typedef enum {
struct _GstAutoplug {
GstObject object;
GST_OBJECT_PADDING
};
struct _GstAutoplugClass {
......@@ -65,6 +67,8 @@ struct _GstAutoplugClass {
/* perform the autoplugging */
GstElement* (*autoplug_to_caps) (GstAutoplug *autoplug, GstCaps *srccaps, GstCaps *sinkcaps, va_list args);
GstElement* (*autoplug_to_renderers) (GstAutoplug *autoplug, GstCaps *srccaps, GstElement *target, va_list args);
GST_CLASS_PADDING
};
......
......@@ -82,7 +82,7 @@ struct _GstBin {
gpointer pre_iterate_data;
gpointer post_iterate_data;
gpointer dummy[8];
GST_OBJECT_PADDING
};
struct _GstBinClass {
......@@ -101,7 +101,7 @@ struct _GstBinClass {
void (*element_added) (GstBin *bin, GstElement *child);
void (*element_removed) (GstBin *bin, GstElement *child);
gpointer dummy[8];
GST_CLASS_PADDING
};
GType gst_bin_get_type (void);
......
......@@ -108,6 +108,8 @@ struct _GstBuffer {
GstBufferPool *pool;
/* pointer to pool private data of parent buffer in case of a subbuffer */
gpointer pool_private;
GST_STRUCT_PADDING
};
/* bufferpools */
......@@ -131,6 +133,8 @@ struct _GstBufferPool {
GstBufferPoolBufferFreeFunction buffer_free;
gpointer user_data;
GST_STRUCT_PADDING
};
/* allocation */
......
......@@ -47,6 +47,8 @@ struct _GstByteStream {
/* if we are in the seek state (waiting for DISCONT) */
gboolean in_seek;
GST_OBJECT_PADDING
};
GstByteStream* gst_bytestream_new (GstPad *pad);
......
......@@ -137,7 +137,7 @@ struct _GstClock {
GCond *active_cond;
gboolean stats;
gpointer dummy[4];
GST_OBJECT_PADDING
};
struct _GstClockClass {
......@@ -158,6 +158,8 @@ struct _GstClockClass {
GstClockEntryStatus (*wait_async) (GstClock *clock, GstClockEntry *entry);
void (*unschedule) (GstClock *clock, GstClockEntry *entry);
void (*unlock) (GstClock *clock, GstClockEntry *entry);
GST_CLASS_PADDING
};
GType gst_clock_get_type (void);
......
......@@ -26,6 +26,7 @@
#include <glib-object.h>
#include <gst/gstatomic.h>
#include <gst/gsttypes.h>
G_BEGIN_DECLS
......@@ -73,6 +74,8 @@ struct _GstData {
/* utility function pointers, can override default */
GstDataFreeFunction free; /* free the data */
GstDataCopyFunction copy; /* copy the data */
GST_STRUCT_PADDING
};
/* function used by subclasses only */
......
......@@ -166,7 +166,7 @@ struct _GstElement {
GAsyncQueue *prop_value_queue;
GMutex *property_mutex;
gpointer dummy[8];
GST_OBJECT_PADDING
};
struct _GstElementClass {
......@@ -218,8 +218,7 @@ struct _GstElementClass {
GstIndex* (*get_index) (GstElement *element);
void (*set_index) (GstElement *element, GstIndex *index);
/* padding */
gpointer dummy[8];
GST_CLASS_PADDING
};
void gst_element_class_add_pad_template (GstElementClass *klass, GstPadTemplate *templ);
......@@ -360,6 +359,8 @@ struct _GstElementDetails {
gchar *version; /* version of the element */
gchar *author; /* who wrote this thing? */
gchar *copyright; /* copyright details (year, etc.) */
GST_STRUCT_PADDING
};
#define GST_TYPE_ELEMENT_FACTORY (gst_element_factory_get_type())
......@@ -386,10 +387,14 @@ struct _GstElementFactory {
GList *padtemplates;
guint16 numpadtemplates;
GST_OBJECT_PADDING
};
struct _GstElementFactoryClass {
GstPluginFeatureClass parent_class;
GST_CLASS_PADDING
};
GType gst_element_factory_get_type (void);
......
......@@ -184,6 +184,8 @@ struct _GstEvent {
GstCaps *caps;
} caps;
} event_data;
GST_STRUCT_PADDING
};
void _gst_event_initialize (void);
......
......@@ -168,7 +168,7 @@ struct _GstIndex {
GHashTable *writers;
gint last_id;
gpointer dummy[8];
GST_OBJECT_PADDING
};
struct _GstIndexClass {
......@@ -189,7 +189,7 @@ struct _GstIndexClass {
/* signals */
void (*entry_added) (GstIndex *index, GstIndexEntry *entry);
gpointer dummy[8];
GST_CLASS_PADDING;
};
GType gst_index_get_type (void);
......@@ -251,10 +251,14 @@ struct _GstIndexFactory {
gchar *longdesc; /* long description of the index (well, don't overdo it..) */
GType type; /* unique GType of the index */
GST_OBJECT_PADDING
};
struct _GstIndexFactoryClass {
GstPluginFeatureClass parent;
GST_CLASS_PADDING
};
GType gst_index_factory_get_type (void);
......
......@@ -52,6 +52,8 @@ typedef struct _GstInterfaceClass {
/* virtual functions */
gboolean (* supported) (GstInterface *iface,
GType iface_type);
GST_CLASS_PADDING
} GstInterfaceClass;
#define GST_INTERFACE_CHECK_INSTANCE_CAST(obj, type, cast_t) \
......
......@@ -76,6 +76,8 @@ struct _GstObject {
GstObject *parent;
guint32 flags;
GST_OBJECT_PADDING
};
/* signal_object is used to signal to the whole class */
......@@ -97,7 +99,7 @@ struct _GstObjectClass {
xmlNodePtr (*save_thyself) (GstObject *object, xmlNodePtr parent);
void (*restore_thyself) (GstObject *object, xmlNodePtr self);
gpointer dummy[4];
GST_CLASS_PADDING
};
#define GST_FLAGS(obj) (GST_OBJECT_CAST (obj)->flags)
......
......@@ -172,10 +172,14 @@ struct _GstPad {
gpointer element_private;
GstPadTemplate *padtemplate; /* the template for this pad */
GST_OBJECT_PADDING
};
struct _GstPadClass {
GstObjectClass parent_class;
GST_CLASS_PADDING
};
struct _GstRealPad {
......@@ -216,6 +220,8 @@ struct _GstRealPad {
GstPadBufferPoolFunction bufferpoolfunc;
GstProbeDispatcher probedisp;
GST_OBJECT_PADDING
};
struct _GstRealPadClass {
......@@ -226,16 +232,22 @@ struct _GstRealPadClass {
void (*linked) (GstPad *pad, GstPad *peer);
void (*unlinked) (GstPad *pad, GstPad *peer);
GST_CLASS_PADDING
};
struct _GstGhostPad {
GstPad pad;
GstRealPad *realpad;
GST_OBJECT_PADDING
};
struct _GstGhostPadClass {
GstPadClass parent_class;
GST_CLASS_PADDING
};
......@@ -321,6 +333,8 @@ struct _GstPadTemplate {
GstPadDirection direction;
GstPadPresence presence;
GstCaps *caps;
GST_OBJECT_PADDING
};
struct _GstPadTemplateClass {
......@@ -328,6 +342,8 @@ struct _GstPadTemplateClass {
/* signal callbacks */
void (*pad_created) (GstPadTemplate *templ, GstPad *pad);
GST_CLASS_PADDING
};
#ifdef G_HAVE_ISO_VARARGS
......
......@@ -43,13 +43,13 @@ typedef struct _GstPipelineClass GstPipelineClass;
struct _GstPipeline {
GstBin bin;
gpointer dummy[32];
GST_OBJECT_PADDING
};
struct _GstPipelineClass {
GstBinClass parent_class;
gpointer dummy[32];
GST_CLASS_PADDING
};
GType gst_pipeline_get_type (void);
......
......@@ -57,6 +57,8 @@ struct _GstPlugin {
gpointer manager; /* managing registry */
GModule *module; /* contains the module if the plugin is loaded */
gboolean init_called; /* if the init function has been called */
GST_STRUCT_PADDING
};
/* Initialiser function: returns TRUE if plugin initialised successfully */
......
......@@ -25,6 +25,7 @@
#define __GST_PLUGIN_FEATURE_H__
#include <glib-object.h>
#include <gst/gsttypes.h>
G_BEGIN_DECLS
......@@ -48,12 +49,16 @@ struct _GstPluginFeature {
/* --- private --- */
gpointer manager;
GST_OBJECT_PADDING
};
struct _GstPluginFeatureClass {
GObjectClass parent_class;
void (*unload_thyself) (GstPluginFeature *feature);
GST_CLASS_PADDING
};
typedef struct {
......
......@@ -85,6 +85,8 @@ struct _GstQueue {
GTimeVal *timeval; /* the timeout for the queue locking */
GAsyncQueue *events; /* upstream events get decoupled here */
GST_OBJECT_PADDING
};
struct _GstQueueClass {
......@@ -92,6 +94,8 @@ struct _GstQueueClass {
/* signal callbacks */
void (*full) (GstQueue *queue);
GST_CLASS_PADDING
};
GType gst_queue_get_type (void);
......
......@@ -86,7 +86,7 @@ struct _GstRegistry {
GList *paths;
gpointer dummy[8];
GST_OBJECT_PADDING
};
struct _GstRegistryClass {
......@@ -105,7 +105,7 @@ struct _GstRegistryClass {
/* signals */
void (*plugin_added) (GstRegistry *registry, GstPlugin *plugin);
gpointer dummy[8];
GST_CLASS_PADDING
};
......
......@@ -72,7 +72,7 @@ struct _GstScheduler {
GList *schedulers;
gpointer dummy[8];
GST_OBJECT_PADDING
};
struct _GstSchedulerClass {
......@@ -105,7 +105,7 @@ struct _GstSchedulerClass {
void (*object_sync) (GstScheduler *sched, GstClock *clock, GstObject *object,
GstClockID id);
gpointer dummy[8];
GST_CLASS_PADDING
};
GType gst_scheduler_get_type (void);
......@@ -160,10 +160,14 @@ struct _GstSchedulerFactory {
gchar *longdesc; /* long description of the scheduler (well, don't overdo it..) */
GType type; /* unique GType of the scheduler */
GST_OBJECT_PADDING
};
struct _GstSchedulerFactoryClass {
GstPluginFeatureClass parent;
GST_CLASS_PADDING
};
GType gst_scheduler_factory_get_type (void);
......
......@@ -44,10 +44,14 @@ struct _GstSystemClock {
GMutex * mutex;
GCond * cond;
GST_OBJECT_PADDING
};
struct _GstSystemClockClass {
GstClockClass parent_class;
GST_CLASS_PADDING
};
GType gst_system_clock_get_type (void);
......
......@@ -65,7 +65,7 @@ struct _GstThread {
GMutex *lock; /* thread lock/condititon pairs */
GCond *cond; /* used to control the thread */
gpointer dummy[8];
GST_OBJECT_PADDING
};
struct _GstThreadClass {
......@@ -74,7 +74,7 @@ struct _GstThreadClass {
/* signals */
void (*shutdown) (GstThread *thread);
gpointer dummy[8];
GST_CLASS_PADDING
};
GType gst_thread_get_type (void);
......
......@@ -45,6 +45,8 @@ struct _GstType {
gchar *exts; /* space-delimited list of extensions */
GSList *factories; /* factories providing this type */
GST_STRUCT_PADDING
};
struct _GstTypeDefinition {
......@@ -68,13 +70,13 @@ struct _GstTypeFactory {
gchar *exts;
GstTypeFindFunc typefindfunc;
gpointer dummy[8];
GST_OBJECT_PADDING
};
struct _GstTypeFactoryClass {
GstPluginFeatureClass parent;
gpointer dummy[8];
GST_CLASS_PADDING
};
......
......@@ -50,6 +50,8 @@ struct _GstTypeFind {
GstByteStream *bs;
GstCaps *caps;
GST_OBJECT_PADDING
};
struct _GstTypeFindClass {
......@@ -58,6 +60,8 @@ struct _GstTypeFindClass {
/* signals */
void (*have_type) (GstElement *element,
GstCaps *caps);
GST_CLASS_PADDING
};
GType gst_type_find_get_type (void);
......
......@@ -58,6 +58,10 @@ typedef enum {
GST_RESULT_NOT_IMPL
} GstResult;
#define GST_STRUCT_PADDING gpointer _gst_reserved[4];
#define GST_CLASS_PADDING gpointer _gst_reserved[4];
#define GST_OBJECT_PADDING gpointer _gst_reserved[4];
G_END_DECLS
#endif /* __GST_TYPES_H__ */
......@@ -49,10 +49,14 @@ struct _GstURIHandler {
gchar *longdesc; /* description of the uri */
gchar *element; /* The element that can handle this uri */
gchar *property; /* The property on the element to set the uri */
GST_OBJECT_PADDING
};
struct _GstURIHandlerClass {
GstPluginFeatureClass parent;
GST_CLASS_PADDING
};
GType gst_uri_handler_get_type (void);
......
......@@ -48,6 +48,8 @@ struct _GstXML {
GList *topelements;
xmlNsPtr ns;
GST_OBJECT_PADDING
};
typedef struct _GstXMLNs GstXMLNs;
......@@ -58,6 +60,8 @@ struct _GstXMLClass {
/* signal callbacks */
void (*object_loaded) (GstXML *xml, GstObject *object, xmlNodePtr self);
void (*object_saved) (GstXML *xml, GstObject *object, xmlNodePtr self);
GST_CLASS_PADDING
};
GType gst_xml_get_type (void);
......
......@@ -85,6 +85,8 @@ struct _GstQueue {
GTimeVal *timeval; /* the timeout for the queue locking */
GAsyncQueue *events; /* upstream events get decoupled here */
GST_OBJECT_PADDING
};
struct _GstQueueClass {
......@@ -92,6 +94,8 @@ struct _GstQueueClass {
/* signal callbacks */
void (*full) (GstQueue *queue);
GST_CLASS_PADDING
};
GType gst_queue_get_type (void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment