#include "gstlog.h"
#include "gstscheduler.h"
+#include "gstindex.h"
GstElementDetails gst_bin_details = {
"Generic bin",
static GstElementStateReturn gst_bin_change_state (GstElement *element);
static GstElementStateReturn gst_bin_change_state_norecurse (GstBin *bin);
+static void gst_bin_set_index (GstBin *bin, GstIndex *index);
+
static gboolean gst_bin_iterate_func (GstBin * bin);
#ifndef GST_DISABLE_LOADSAVE
/* Bin signals and args */
enum
{
- OBJECT_ADDED,
+ ELEMENT_ADDED,
+ ELEMENT_REMOVED,
LAST_SIGNAL
};
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
- gst_bin_signals[OBJECT_ADDED] =
- g_signal_new ("object_added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GstBinClass, object_added), NULL, NULL,
+ gst_bin_signals[ELEMENT_ADDED] =
+ g_signal_new ("element_added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GstBinClass, element_added), NULL, NULL,
+ gst_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
+ gst_bin_signals[ELEMENT_REMOVED] =
+ g_signal_new ("element_removed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GstBinClass, element_removed), NULL, NULL,
gst_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_bin_dispose);
+ gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_bin_dispose);
#ifndef GST_DISABLE_LOADSAVE
gstobject_class->save_thyself = GST_DEBUG_FUNCPTR (gst_bin_save_thyself);
#endif
gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_bin_change_state);
+ gstelement_class->set_index = GST_DEBUG_FUNCPTR (gst_bin_set_index);
klass->iterate = GST_DEBUG_FUNCPTR (gst_bin_iterate_func);
}
bin->pre_iterate_func = NULL;
bin->post_iterate_func = NULL;
- bin->pre_iterate_private = NULL;
- bin->post_iterate_private = NULL;
+ bin->pre_iterate_data = NULL;
+ bin->post_iterate_data = NULL;
}
/**
}
static void
-gst_bin_set_element_sched (GstElement *element, GstScheduler *sched)
+gst_bin_set_index (GstBin *bin, GstIndex *index)
{
GList *children;
- GstElement *child;
+
+ g_return_if_fail (GST_IS_BIN (bin));
+
+ children = bin->children;
+ while (children) {
+ GstElement *child = GST_ELEMENT (children->data);
+ children = g_list_next (children);
+ gst_element_set_index (child, index);
+ }
+}
+
+static void
+gst_bin_set_element_sched (GstElement *element, GstScheduler *sched)
+{
GST_INFO (GST_CAT_SCHEDULING, "setting element \"%s\" sched to %p", GST_ELEMENT_NAME (element),
sched);
/* if it's actually a Bin */
if (GST_IS_BIN (element)) {
+ GList *children;
+
if (GST_FLAG_IS_SET (element, GST_BIN_FLAG_MANAGER)) {
GST_INFO_ELEMENT (GST_CAT_PARENTAGE, element, "child is already a manager, not resetting");
if (GST_ELEMENT_SCHED (element))
/* set the children's schedule */
children = GST_BIN (element)->children;
while (children) {
- child = GST_ELEMENT (children->data);
+ GstElement *child = GST_ELEMENT (children->data);
children = g_list_next (children);
gst_bin_set_element_sched (child, sched);
GST_INFO_ELEMENT (GST_CAT_PARENTAGE, bin, "added child \"%s\"", GST_ELEMENT_NAME (element));
- g_signal_emit (G_OBJECT (bin), gst_bin_signals[OBJECT_ADDED], 0, element);
+ g_signal_emit (G_OBJECT (bin), gst_bin_signals[ELEMENT_ADDED], 0, element);
}
/**
GST_INFO_ELEMENT (GST_CAT_PARENTAGE, bin, "removed child %s", GST_ELEMENT_NAME (element));
+ /* ref as we're going to emit a signal */
+ gst_object_ref (GST_OBJECT (element));
gst_object_unparent (GST_OBJECT (element));
/* if we're down to zero children, force state to NULL */
GST_STATE_PENDING (bin) = GST_STATE_NULL;
gst_bin_change_state_norecurse (bin);
}
+ g_signal_emit (G_OBJECT (bin), gst_bin_signals[ELEMENT_REMOVED], 0, element);
+
+ /* element is really out of our control now */
+ gst_object_unref (GST_OBJECT (element));
}
/**
g_return_val_if_fail (bin != NULL, FALSE);
g_return_val_if_fail (GST_IS_BIN (bin), FALSE);
- oclass = GST_BIN_CLASS (G_OBJECT_GET_CLASS (bin));
+ oclass = GST_BIN_GET_CLASS (bin);
if (bin->pre_iterate_func)
- (bin->pre_iterate_func) (bin, bin->pre_iterate_private);
+ (bin->pre_iterate_func) (bin, bin->pre_iterate_data);
if (oclass->iterate)
running = (oclass->iterate) (bin);
if (bin->post_iterate_func)
- (bin->post_iterate_func) (bin, bin->post_iterate_private);
+ (bin->post_iterate_func) (bin, bin->post_iterate_data);
GST_DEBUG_LEAVE ("(\"%s\") %d", GST_ELEMENT_NAME (bin), running);
* gst_bin_set_pre_iterate_function:
* @bin: #Gstbin to attach to
* @func: callback function to call
- * @func_data: private data to put in the function call
+ * @user_data: user data to put in the function call
*
* Attaches a callback which will be run before every iteration of the bin
*
*/
void
-gst_bin_set_pre_iterate_function (GstBin *bin, GstBinPrePostIterateFunction func, gpointer func_data)
+gst_bin_set_pre_iterate_function (GstBin *bin, GstBinPrePostIterateFunction func, gpointer user_data)
{
g_return_if_fail (GST_IS_BIN (bin));
g_warning ("setting pre_iterate on a non MANAGER bin has no effect");
bin->pre_iterate_func = func;
- bin->pre_iterate_private = func_data;
+ bin->pre_iterate_data = user_data;
}
/**
* gst_bin_set_post_iterate_function:
* @bin: #Gstbin to attach to
* @func: callback function to call
- * @func_data: private data to put in the function call
+ * @user_data: user data to put in the function call
*
* Attaches a callback which will be run after every iteration of the bin
*
*/
void
-gst_bin_set_post_iterate_function (GstBin *bin, GstBinPrePostIterateFunction func, gpointer func_data)
+gst_bin_set_post_iterate_function (GstBin *bin, GstBinPrePostIterateFunction func, gpointer user_data)
{
g_return_if_fail (GST_IS_BIN (bin));
g_warning ("setting post_iterate on a non MANAGER bin has no effect");
bin->post_iterate_func = func;
- bin->post_iterate_private = func_data;
+ bin->post_iterate_data = user_data;
}
extern GstElementDetails gst_bin_details;
extern GType _gst_bin_type;
-#define GST_TYPE_BIN (_gst_bin_type)
-# define GST_IS_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_BIN))
-# define GST_IS_BIN_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_BIN))
+#define GST_TYPE_BIN (_gst_bin_type)
+#define GST_IS_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_BIN))
+#define GST_IS_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_BIN))
+#define GST_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BIN, GstBinClass))
#define GST_BIN_CAST(obj) ((GstBin*)(obj))
#define GST_BIN_CLASS_CAST(klass) ((GstBinClass*)(klass))
# define GST_BIN_CLASS GST_BIN_CLASS_CAST
#endif
-typedef void (*GstBinPrePostIterateFunction) (GstBin *bin, gpointer data);
+typedef void (*GstBinPrePostIterateFunction) (GstBin *bin, gpointer user_data);
typedef enum {
/* this bin is a manager of child elements, i.e. a pipeline or thread */
GstElementState child_states[GST_NUM_STATES];
- gpointer sched_private;
-
GstBinPrePostIterateFunction pre_iterate_func;
GstBinPrePostIterateFunction post_iterate_func;
- gpointer pre_iterate_private;
- gpointer post_iterate_private;
+ gpointer pre_iterate_data;
+ gpointer post_iterate_data;
+
+ gpointer dummy[8];
};
struct _GstBinClass {
/* vtable */
void (*add_element) (GstBin *bin, GstElement);
void (*remove_element) (GstBin *bin, GstElement);
+
/* run a full iteration of operation */
gboolean (*iterate) (GstBin *bin);
/* signals */
- void (*object_added) (GstObject *object, GstObject *child);
- void (*object_removed) (GstObject *object, GstObject *child);
+ void (*element_added) (GstBin *bin, GstElement *child);
+ void (*element_removed) (GstBin *bin, GstElement *child);
+ gpointer dummy[8];
};
GType gst_bin_get_type (void);
/* internal */
/* one of our childs signaled a state change */
-void gst_bin_child_state_change (GstBin *bin, GstElementState oldstate,
- GstElementState newstate, GstElement *child);
-
-void gst_bin_set_pre_iterate_function (GstBin *bin, GstBinPrePostIterateFunction func, gpointer func_data);
-void gst_bin_set_post_iterate_function (GstBin *bin, GstBinPrePostIterateFunction func, gpointer func_data);
+void gst_bin_child_state_change (GstBin *bin, GstElementState oldstate,
+ GstElementState newstate, GstElement *child);
+
+void gst_bin_set_pre_iterate_function (GstBin *bin,
+ GstBinPrePostIterateFunction func,
+ gpointer user_data);
+void gst_bin_set_post_iterate_function (GstBin *bin,
+ GstBinPrePostIterateFunction func,
+ gpointer user_data);
G_END_DECLS
* Returns: the new #GstBuffer, or NULL if there was an error.
*/
GstBuffer*
-gst_buffer_new_from_pool (GstBufferPool *pool, guint64 offset, guint size)
+gst_buffer_new_from_pool (GstBufferPool *pool,
+ gint64 offset, guint size)
{
GstBuffer *buffer;
#define GST_BUFFER_SIZE(buf) (GST_BUFFER(buf)->size)
#define GST_BUFFER_MAXSIZE(buf) (GST_BUFFER(buf)->maxsize)
#define GST_BUFFER_TIMESTAMP(buf) (GST_BUFFER(buf)->timestamp)
+#define GST_BUFFER_FORMAT(buf) (GST_BUFFER(buf)->format)
#define GST_BUFFER_OFFSET(buf) (GST_BUFFER(buf)->offset)
#define GST_BUFFER_BUFFERPOOL(buf) (GST_BUFFER(buf)->pool)
#define GST_BUFFER_POOL_PRIVATE(buf) (GST_BUFFER(buf)->pool_private)
guint size; /* size of buffer data */
guint64 maxsize; /* max size of this buffer */
+ /* timestamp */
guint64 timestamp;
+ /* media specific offset */
guint64 offset;
/* this is a pointer to the buffer pool (if any) */
/* bufferpools */
-typedef GstBuffer* (*GstBufferPoolBufferNewFunction) (GstBufferPool *pool, guint64 offset, guint size, gpointer user_data);
-typedef GstBuffer* (*GstBufferPoolBufferCopyFunction) (GstBufferPool *pool, const GstBuffer *buffer, gpointer user_data);
-typedef void (*GstBufferPoolBufferFreeFunction) (GstBufferPool *pool, GstBuffer *buffer, gpointer user_data);
+typedef GstBuffer* (*GstBufferPoolBufferNewFunction) (GstBufferPool *pool, gint64 offset,
+ guint size, gpointer user_data);
+typedef GstBuffer* (*GstBufferPoolBufferCopyFunction) (GstBufferPool *pool,
+ const GstBuffer *buffer,
+ gpointer user_data);
+typedef void (*GstBufferPoolBufferFreeFunction) (GstBufferPool *pool,
+ GstBuffer *buffer,
+ gpointer user_data);
struct _GstBufferPool {
GstData data;
gpointer user_data;
};
-
-/*< private >*/
-void _gst_buffer_initialize (void);
-
-/* functions used by subclasses and bufferpools */
-void gst_buffer_default_free (GstBuffer *buffer);
-GstBuffer* gst_buffer_default_copy (GstBuffer *buffer);
-
-void gst_buffer_print_stats (void);
-
/* allocation */
GstBuffer* gst_buffer_new (void);
GstBuffer* gst_buffer_new_and_alloc (guint size);
/* creating a new buffer from a pool */
-GstBuffer* gst_buffer_new_from_pool (GstBufferPool *pool, guint64 offset, guint size);
+GstBuffer* gst_buffer_new_from_pool (GstBufferPool *pool,
+ gint64 offset, guint size);
#define gst_buffer_set_data(buf, data, size) \
G_STMT_START { \
gboolean gst_buffer_is_span_fast (GstBuffer *buf1, GstBuffer *buf2);
GstBuffer* gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len);
+/* --- private --- */
+void _gst_buffer_initialize (void);
+
+/* functions used by subclasses and bufferpools */
+void gst_buffer_default_free (GstBuffer *buffer);
+GstBuffer* gst_buffer_default_copy (GstBuffer *buffer);
+
+void gst_buffer_print_stats (void);
+
/* creating a new buffer pools */
GstBufferPool* gst_buffer_pool_new (GstDataFreeFunction free,
/* function used by subclasses and bufferpools */
void gst_buffer_pool_default_free (GstBufferPool *pool);
+/* check if pool is usable */
gboolean gst_buffer_pool_is_active (GstBufferPool *pool);
void gst_buffer_pool_set_active (GstBufferPool *pool, gboolean active);
* gstbuffer.c */
static GstBuffer* _gst_buffer_pool_default_buffer_new (GstBufferPool *pool,
- guint64 offset,
- guint size,
+ gint64 offset, guint size,
gpointer user_data);
static void _gst_buffer_pool_default_buffer_free (GstBufferPool *pool,
GstBuffer *buffer,
}
static GstBuffer*
-_gst_buffer_pool_default_buffer_new (GstBufferPool *pool, guint64 offset /*unused*/,
- guint size /*unused*/, gpointer user_data)
+_gst_buffer_pool_default_buffer_new (GstBufferPool *pool, gint64 offset,
+ guint size, gpointer user_data)
{
GstBuffer *buffer;
- GstBufferPoolDefault *def = (GstBufferPoolDefault*)user_data;
+ GstBufferPoolDefault *def = (GstBufferPoolDefault*) user_data;
GstMemChunk *data_chunk = def->mem_chunk;
buffer = gst_buffer_new ();
ARG_STATS,
};
-#define CLASS(clock) GST_CLOCK_CLASS (G_OBJECT_GET_CLASS (clock))
-
static GstMemChunk *_gst_clock_entries_chunk;
static void gst_clock_class_init (GstClockClass *klass);
GstClock *clock;
GstClockReturn res = GST_CLOCK_UNSUPPORTED;
GstClockTime requested;
+ GstClockClass *cclass;
g_return_val_if_fail (id != NULL, GST_CLOCK_ERROR);
}
clock = GST_CLOCK_ENTRY_CLOCK (entry);
+ cclass = GST_CLOCK_GET_CLASS (clock);
- if (CLASS (clock)->wait) {
+ if (cclass->wait) {
GstClockTime now;
do {
- res = CLASS (clock)->wait (clock, entry);
+ res = cclass->wait (clock, entry);
}
while (res == GST_CLOCK_ENTRY_RESTART);
GstClockEntry *entry;
GstClock *clock;
GstClockReturn res = GST_CLOCK_UNSUPPORTED;
+ GstClockClass *cclass;
g_return_val_if_fail (id != NULL, GST_CLOCK_ERROR);
g_return_val_if_fail (func != NULL, GST_CLOCK_ERROR);
return GST_CLOCK_TIMEOUT;
}
- if (CLASS (clock)->wait_async) {
- res = CLASS (clock)->wait_async (clock, entry, func, user_data);
+ cclass = GST_CLOCK_GET_CLASS (clock);
+
+ if (cclass->wait_async) {
+ entry->func = func;
+ entry->user_data = user_data;
+
+ res = cclass->wait_async (clock, entry);
}
return res;
{
GstClockEntry *entry;
GstClock *clock;
+ GstClockClass *cclass;
g_return_if_fail (id != NULL);
entry = (GstClockEntry *) id;
clock = entry->clock;
- if (CLASS (clock)->unschedule)
- CLASS (clock)->unschedule (clock, entry);
+ cclass = GST_CLOCK_GET_CLASS (clock);
+
+ if (cclass->unschedule)
+ cclass->unschedule (clock, entry);
}
/**
{
GstClockEntry *entry;
GstClock *clock;
+ GstClockClass *cclass;
g_return_if_fail (id != NULL);
entry = (GstClockEntry *) id;
clock = entry->clock;
- if (CLASS (clock)->unlock)
- CLASS (clock)->unlock (clock, entry);
+ cclass = GST_CLOCK_GET_CLASS (clock);
+
+ if (cclass->unlock)
+ cclass->unlock (clock, entry);
}
gdouble
gst_clock_set_speed (GstClock *clock, gdouble speed)
{
+ GstClockClass *cclass;
+
g_return_val_if_fail (GST_IS_CLOCK (clock), 0.0);
- if (CLASS (clock)->change_speed)
- clock->speed = CLASS (clock)->change_speed (clock, clock->speed, speed);
+ cclass = GST_CLOCK_GET_CLASS (clock);
+
+ if (cclass->change_speed)
+ clock->speed = cclass->change_speed (clock, clock->speed, speed);
return clock->speed;
}
guint64
gst_clock_set_resolution (GstClock *clock, guint64 resolution)
{
+ GstClockClass *cclass;
+
g_return_val_if_fail (GST_IS_CLOCK (clock), 0LL);
g_return_val_if_fail (resolution != 0, 0LL);
- if (CLASS (clock)->change_resolution)
- clock->resolution = CLASS (clock)->change_resolution (clock, clock->resolution, resolution);
+ cclass = GST_CLOCK_GET_CLASS (clock);
+
+ if (cclass->change_resolution)
+ clock->resolution = cclass->change_resolution (clock, clock->resolution, resolution);
return clock->resolution;
}
guint64
gst_clock_get_resolution (GstClock *clock)
{
+ GstClockClass *cclass;
+
g_return_val_if_fail (GST_IS_CLOCK (clock), 0LL);
- if (CLASS (clock)->get_resolution)
- return CLASS (clock)->get_resolution (clock);
+ cclass = GST_CLOCK_GET_CLASS (clock);
+
+ if (cclass->get_resolution)
+ return cclass->get_resolution (clock);
return 1LL;
}
gst_clock_set_active (GstClock *clock, gboolean active)
{
GstClockTime time = 0LL;
+ GstClockClass *cclass;
g_return_if_fail (GST_IS_CLOCK (clock));
clock->active = active;
+
+ cclass = GST_CLOCK_GET_CLASS (clock);
- if (CLASS (clock)->get_internal_time) {
- time = CLASS (clock)->get_internal_time (clock);
+ if (cclass->get_internal_time) {
+ time = cclass->get_internal_time (clock);
}
GST_LOCK (clock);
gst_clock_reset (GstClock *clock)
{
GstClockTime time = 0LL;
+ GstClockClass *cclass;
g_return_if_fail (GST_IS_CLOCK (clock));
- if (CLASS (clock)->get_internal_time) {
- time = CLASS (clock)->get_internal_time (clock);
+ cclass = GST_CLOCK_GET_CLASS (clock);
+
+ if (cclass->get_internal_time) {
+ time = cclass->get_internal_time (clock);
}
GST_LOCK (clock);
GST_LOCK (clock);
if (clock->accept_discont) {
- if (CLASS (clock)->get_internal_time) {
- itime = CLASS (clock)->get_internal_time (clock);
+ GstClockClass *cclass;
+
+ cclass = GST_CLOCK_GET_CLASS (clock);
+
+ if (cclass->get_internal_time) {
+ itime = cclass->get_internal_time (clock);
}
}
else {
ret = clock->last_time;
}
else {
- if (CLASS (clock)->get_internal_time) {
- ret = CLASS (clock)->get_internal_time (clock) - clock->start_time;
+ GstClockClass *cclass;
+
+ cclass = GST_CLOCK_GET_CLASS (clock);
+
+ if (cclass->get_internal_time) {
+ ret = cclass->get_internal_time (clock) - clock->start_time;
}
/* make sure the time is increasing, else return last_time */
if ((gint64) ret < (gint64) clock->last_time) {
G_BEGIN_DECLS
-#define GST_TYPE_CLOCK \
- (gst_clock_get_type())
-#define GST_CLOCK(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CLOCK,GstClock))
-#define GST_CLOCK_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CLOCK,GstClockClass))
-#define GST_IS_CLOCK(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CLOCK))
-#define GST_IS_CLOCK_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CLOCK))
+/* --- standard type macros --- */
+#define GST_TYPE_CLOCK (gst_clock_get_type ())
+#define GST_CLOCK(clock) (G_TYPE_CHECK_INSTANCE_CAST ((clock), GST_TYPE_CLOCK, GstClock))
+#define GST_IS_CLOCK(clock) (G_TYPE_CHECK_INSTANCE_TYPE ((clock), GST_TYPE_CLOCK))
+#define GST_CLOCK_CLASS(cclass) (G_TYPE_CHECK_CLASS_CAST ((cclass), GST_TYPE_CLOCK, GstClockClass))
+#define GST_IS_CLOCK_CLASS(cclass) (G_TYPE_CHECK_CLASS_TYPE ((cclass), GST_TYPE_CLOCK))
+#define GST_CLOCK_GET_CLASS(clock) (G_TYPE_INSTANCE_GET_CLASS ((clock), GST_TYPE_CLOCK, GstClockClass))
typedef guint64 GstClockTime;
typedef gint64 GstClockTimeDiff;
typedef struct _GstClock GstClock;
typedef struct _GstClockClass GstClockClass;
+/* --- prototype for async callbacks --- */
typedef gboolean (*GstClockCallback) (GstClock *clock, GstClockTime time,
GstClockID id, gpointer user_data);
GstClockFlags flags;
- /*< protected >*/
+ /* --- protected --- */
GstClockTime start_time;
GstClockTime last_time;
- /*< private >*/
+ /* --- private --- */
gboolean accept_discont;
gdouble speed;
guint64 resolution;
GMutex *active_mutex;
GCond *active_cond;
gboolean stats;
+
+ gpointer dummy[4];
};
struct _GstClockClass {
/* waiting on an ID */
GstClockEntryStatus (*wait) (GstClock *clock, GstClockEntry *entry);
- GstClockEntryStatus (*wait_async) (GstClock *clock, GstClockEntry *entry,
- GstClockCallback func, gpointer user_data);
+ GstClockEntryStatus (*wait_async) (GstClock *clock, GstClockEntry *entry);
void (*unschedule) (GstClock *clock, GstClockEntry *entry);
void (*unlock) (GstClock *clock, GstClockEntry *entry);
-
- /* signals */
- void (*object_sync) (GstClock *clock, GstObject *object,
- GstClockID id);
};
GType gst_clock_get_type (void);
/* FILL ME */
};
-#define CLASS(element) GST_ELEMENT_CLASS (G_OBJECT_GET_CLASS (element))
-
static void gst_element_class_init (GstElementClass *klass);
static void gst_element_init (GstElement *element);
static void gst_element_base_class_init (GstElementClass *klass);
static void
gst_element_real_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
- GstElementClass *oclass = CLASS (object);
+ GstElementClass *oclass = GST_ELEMENT_GET_CLASS (object);
if (oclass->set_property)
(oclass->set_property) (object, prop_id, value, pspec);
static void
gst_element_real_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
- GstElementClass *oclass = CLASS (object);
+ GstElementClass *oclass = GST_ELEMENT_GET_CLASS (object);
if (oclass->get_property)
(oclass->get_property) (object, prop_id, value, pspec);
GstPad *newpad = NULL;
GstElementClass *oclass;
- oclass = CLASS (element);
+ oclass = GST_ELEMENT_GET_CLASS (element);
+
if (oclass->request_new_pad)
newpad = (oclass->request_new_pad)(element, templ, name);
g_return_if_fail (GST_IS_ELEMENT (element));
g_return_if_fail (GST_IS_PAD (pad));
- oclass = CLASS (element);
+ oclass = GST_ELEMENT_GET_CLASS (element);
+
if (oclass->release_pad)
(oclass->release_pad) (element, pad);
}
{
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
- return (CLASS (element)->set_clock != NULL);
+ return (GST_ELEMENT_GET_CLASS (element)->set_clock != NULL);
}
/**
{
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
- return (CLASS (element)->get_clock != NULL);
+ return (GST_ELEMENT_GET_CLASS (element)->get_clock != NULL);
}
/**
void
gst_element_set_clock (GstElement *element, GstClock *clock)
{
+ GstElementClass *oclass;
+
g_return_if_fail (GST_IS_ELEMENT (element));
- if (CLASS (element)->set_clock)
- CLASS (element)->set_clock (element, clock);
+ oclass = GST_ELEMENT_GET_CLASS (element);
+
+ if (oclass->set_clock)
+ oclass->set_clock (element, clock);
element->clock = clock;
}
GstClock*
gst_element_get_clock (GstElement *element)
{
- g_return_val_if_fail (element != NULL, NULL);
+ GstElementClass *oclass;
+
g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
+
+ oclass = GST_ELEMENT_GET_CLASS (element);
- if (CLASS (element)->get_clock)
- return CLASS (element)->get_clock (element);
+ if (oclass->get_clock)
+ return oclass->get_clock (element);
return NULL;
}
{
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
- return (CLASS (element)->set_index != NULL);
+ return (GST_ELEMENT_GET_CLASS (element)->set_index != NULL);
}
/**
void
gst_element_set_index (GstElement *element, GstIndex *index)
{
+ GstElementClass *oclass;
+
g_return_if_fail (GST_IS_ELEMENT (element));
g_return_if_fail (GST_IS_INDEX (index));
- if (CLASS (element)->set_index)
- CLASS (element)->set_index (element, index);
+ oclass = GST_ELEMENT_GET_CLASS (element);
+
+ if (oclass->set_index)
+ oclass->set_index (element, index);
}
/**
GstIndex*
gst_element_get_index (GstElement *element)
{
+ GstElementClass *oclass;
+
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
- if (CLASS (element)->get_index)
- return CLASS (element)->get_index (element);
+ oclass = GST_ELEMENT_GET_CLASS (element);
+
+ if (oclass->get_index)
+ return oclass->get_index (element);
return NULL;
}
gboolean
gst_element_release_locks (GstElement *element)
{
+ GstElementClass *oclass;
+
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
- if (CLASS (element)->release_locks)
- return CLASS (element)->release_locks (element);
+ oclass = GST_ELEMENT_GET_CLASS (element);
+
+ if (oclass->release_locks)
+ return oclass->release_locks (element);
return TRUE;
}
g_return_val_if_fail (element != NULL, NULL);
g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
- return CLASS (element)->padtemplates;
+ return GST_ELEMENT_GET_CLASS (element)->padtemplates;
}
/**
gboolean
gst_element_send_event (GstElement *element, GstEvent *event)
{
+ GstElementClass *oclass;
+
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
- if (CLASS (element)->send_event)
- return CLASS (element)->send_event (element, event);
+ oclass = GST_ELEMENT_GET_CLASS (element);
+
+ if (oclass->send_event)
+ return oclass->send_event (element, event);
return FALSE;
}
gst_element_query (GstElement *element, GstPadQueryType type,
GstFormat *format, gint64 *value)
{
+ GstElementClass *oclass;
+
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
g_return_val_if_fail (format != NULL, FALSE);
g_return_val_if_fail (value != NULL, FALSE);
+
+ oclass = GST_ELEMENT_GET_CLASS (element);
- if (CLASS (element)->query)
- return CLASS (element)->query (element, type, format, value);
+ if (oclass->query)
+ return oclass->query (element, type, format, value);
return FALSE;
}
}
/* call the state change function so it can set the state */
- oclass = CLASS (element);
+ oclass = GST_ELEMENT_GET_CLASS (element);
if (oclass->change_state)
return_val = (oclass->change_state) (element);
GstElementFactory*
gst_element_get_factory (GstElement *element)
{
- GstElementClass *oclass;
-
g_return_val_if_fail (GST_IS_ELEMENT (element), NULL);
- oclass = CLASS (element);
-
- return oclass->elementfactory;
+ return GST_ELEMENT_GET_CLASS (element)->elementfactory;
}
static void
element = GST_ELEMENT (object);
- oclass = CLASS (element);
+ oclass = GST_ELEMENT_GET_CLASS (element);
xmlNewChild(parent, NULL, "name", GST_ELEMENT_NAME(element));
children = children->next;
}
- if (GST_OBJECT_CLASS(parent_class)->restore_thyself)
- (GST_OBJECT_CLASS(parent_class)->restore_thyself) (object, self);
+ if (GST_OBJECT_CLASS (parent_class)->restore_thyself)
+ (GST_OBJECT_CLASS (parent_class)->restore_thyself) (object, self);
}
#endif /* GST_DISABLE_LOADSAVE */
#define GST_ELEMENT_CAST(obj) ((GstElement*)(obj))
#define GST_ELEMENT_CLASS_CAST(klass) ((GstElementClass*)(klass))
#define GST_IS_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_ELEMENT))
-#define GST_IS_ELEMENT_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_ELEMENT))
+#define GST_IS_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_ELEMENT))
+#define GST_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_ELEMENT, GstElementClass))
#ifdef GST_TYPE_PARANOID
# define GST_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_ELEMENT, GstElement))
/* element state and scheduling */
guint8 current_state;
guint8 pending_state;
- GstElement *manager;
GstElementLoopFunction loopfunc;
GstScheduler *sched;
gpointer sched_private;
+
+ /* allocated clock */
GstClock *clock;
GstClockTime base_time;
guint16 numsrcpads;
guint16 numsinkpads;
GList *pads;
- GstPad *select_pad;
GMutex *state_mutex;
GCond *state_cond;
GstElementPostRunFunction post_run_func;
GAsyncQueue *prop_value_queue;
GMutex *property_mutex;
+
+ gpointer dummy[8];
};
struct _GstElementClass {
/* index */
GstIndex* (*get_index) (GstElement *element);
void (*set_index) (GstElement *element, GstIndex *index);
+
+ gpointer dummy[8];
};
void gst_element_class_add_pad_template (GstElementClass *klass, GstPadTemplate *templ);
*
* Returns: The #GstFormatDefinition for @format or NULL on failure.
*/
-const GstFormatDefinition *
+const GstFormatDefinition*
gst_format_get_details (GstFormat format)
{
return g_hash_table_lookup (_format_to_nick, GINT_TO_POINTER (format));
*
* Returns: A GList of #GstFormatDefinition.
*/
-const GList *
+const GList*
gst_format_get_definitions (void)
{
return _gst_formats;
} GstFormat;
typedef struct _GstFormatDefinition GstFormatDefinition;
+
struct _GstFormatDefinition
{
GstFormat value;
static void gst_index_class_init (GstIndexClass *klass);
static void gst_index_init (GstIndex *index);
-#define CLASS(index) GST_INDEX_CLASS (G_OBJECT_GET_CLASS (index))
-
static GstObject *parent_class = NULL;
static guint gst_index_signals[LAST_SIGNAL] = { 0 };
{
GstIndexEntry *entry;
const GstFormatDefinition* def;
+ GstIndexClass *iclass;
g_return_val_if_fail (GST_IS_INDEX (index), NULL);
g_return_val_if_fail (format != 0, NULL);
entry->type = GST_INDEX_ENTRY_FORMAT;
entry->id = id;
entry->data.format.format = format;
+
def = gst_format_get_details (format);
entry->data.format.key = def->nick;
+
+ iclass = GST_INDEX_GET_CLASS (index);
- if (CLASS (index)->add_entry)
- CLASS (index)->add_entry (index, entry);
+ if (iclass->add_entry)
+ iclass->add_entry (index, entry);
g_signal_emit (G_OBJECT (index), gst_index_signals[ENTRY_ADDED], 0, entry);
gst_index_add_id (GstIndex *index, gint id, gchar *description)
{
GstIndexEntry *entry;
+ GstIndexClass *iclass;
g_return_val_if_fail (GST_IS_INDEX (index), NULL);
g_return_val_if_fail (description != NULL, NULL);
entry->id = id;
entry->data.id.description = description;
- if (CLASS (index)->add_entry)
- CLASS (index)->add_entry (index, entry);
+ iclass = GST_INDEX_GET_CLASS (index);
+
+ if (iclass->add_entry)
+ iclass->add_entry (index, entry);
g_signal_emit (G_OBJECT (index), gst_index_signals[ENTRY_ADDED], 0, entry);
gchar *writer_string = NULL;
gboolean success = FALSE;
GstIndexEntry *entry;
+ GstIndexClass *iclass;
g_return_val_if_fail (GST_IS_INDEX (index), FALSE);
g_return_val_if_fail (GST_IS_OBJECT (writer), FALSE);
g_hash_table_insert (index->writers, writer, entry);
}
- if (CLASS (index)->resolve_writer) {
- success = CLASS (index)->resolve_writer (index, writer, id, &writer_string);
+ iclass = GST_INDEX_GET_CLASS (index);
+
+ if (iclass->resolve_writer) {
+ success = iclass->resolve_writer (index, writer, id, &writer_string);
}
if (index->resolver) {
gint nassocs = 0;
GstFormat cur_format;
volatile gint64 dummy;
+ GstIndexClass *iclass;
g_return_val_if_fail (GST_IS_INDEX (index), NULL);
g_return_val_if_fail (format != 0, NULL);
}
va_end (args);
- if (CLASS (index)->add_entry)
- CLASS (index)->add_entry (index, entry);
+ iclass = GST_INDEX_GET_CLASS (index);
+
+ if (iclass->add_entry)
+ iclass->add_entry (index, entry);
g_signal_emit (G_OBJECT (index), gst_index_signals[ENTRY_ADDED], 0, entry);
GCompareDataFunc func,
gpointer user_data)
{
+ GstIndexClass *iclass;
+
g_return_val_if_fail (GST_IS_INDEX (index), NULL);
- if (CLASS(index)->get_assoc_entry)
- return CLASS (index)->get_assoc_entry (index, id, method, format, value, func, user_data);
+ iclass = GST_INDEX_GET_CLASS (index);
+
+ if (iclass->get_assoc_entry)
+ return iclass->get_assoc_entry (index, id, method, format, value, func, user_data);
return NULL;
}
G_BEGIN_DECLS
-#define GST_TYPE_INDEX (gst_index_get_type ())
-#define GST_INDEX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_INDEX, GstIndex))
-#define GST_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_INDEX, GstIndexClass))
-#define GST_IS_INDEX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_INDEX))
-#define GST_IS_INDEX_CLASS(obj) (GST_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_INDEX))
+#define GST_TYPE_INDEX (gst_index_get_type ())
+#define GST_INDEX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_INDEX, GstIndex))
+#define GST_IS_INDEX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_INDEX))
+#define GST_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_INDEX, GstIndexClass))
+#define GST_IS_INDEX_CLASS(klass) (GST_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_INDEX))
+#define GST_INDEX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_INDEX, GstIndexClass))
typedef struct _GstIndexEntry GstIndexEntry;
typedef struct _GstIndexGroup GstIndexGroup;
} GstIndexLookupMethod;
#define GST_INDEX_NASSOCS(entry) ((entry)->data.assoc.nassocs)
-#define GST_INDEX_ASSOC_FLAGS(entry) ((entry)->data.assoc.flags)
-#define GST_INDEX_ASSOC_FORMAT(entry,i) ((entry)->data.assoc.assocs[(i)].format)
-#define GST_INDEX_ASSOC_VALUE(entry,i) ((entry)->data.assoc.assocs[(i)].value)
+#define GST_INDEX_ASSOC_FLAGS(entry) ((entry)->data.assoc.flags)
+#define GST_INDEX_ASSOC_FORMAT(entry,i) ((entry)->data.assoc.assocs[(i)].format)
+#define GST_INDEX_ASSOC_VALUE(entry,i) ((entry)->data.assoc.assocs[(i)].value)
typedef struct _GstIndexAssociation GstIndexAssociation;
GST_ACCOCIATION_FLAG_KEY_UNIT = (1 << 0),
} GstAssocFlags;
-#define GST_INDEX_FORMAT_FORMAT(entry) ((entry)->data.format.format)
-#define GST_INDEX_FORMAT_KEY(entry) ((entry)->data.format.key)
+#define GST_INDEX_FORMAT_FORMAT(entry) ((entry)->data.format.format)
+#define GST_INDEX_FORMAT_KEY(entry) ((entry)->data.format.key)
-#define GST_INDEX_ID_DESCRIPTION(entry) ((entry)->data.id.description)
+#define GST_INDEX_ID_DESCRIPTION(entry) ((entry)->data.id.description)
struct _GstIndexEntry {
GstIndexEntryType type;
GHashTable *writers;
gint last_id;
+
+ gpointer dummy[8];
};
struct _GstIndexClass {
gpointer user_data);
/* signals */
void (*entry_added) (GstIndex *index, GstIndexEntry *entry);
+
+ gpointer dummy[8];
};
GType gst_index_get_type (void);
* creating indexs
*
*/
-#define GST_TYPE_INDEX_FACTORY \
- (gst_index_factory_get_type())
-#define GST_INDEX_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_INDEX_FACTORY,GstIndexFactory))
-#define GST_INDEX_FACTORY_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_INDEX_FACTORY,GstIndexFactoryClass))
-#define GST_IS_INDEX_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_INDEX_FACTORY))
-#define GST_IS_INDEX_FACTORY_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_INDEX_FACTORY))
+#define GST_TYPE_INDEX_FACTORY (gst_index_factory_get_type())
+#define GST_INDEX_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_INDEX_FACTORY, GstIndexFactory))
+#define GST_IS_INDEX_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_INDEX_FACTORY))
+#define GST_INDEX_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_INDEX_FACTORY, GstIndexFactoryClass))
+#define GST_IS_INDEX_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_INDEX_FACTORY))
+#define GST_INDEX_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_INDEX_FACTORY, GstIndexFactoryClass))
typedef struct _GstIndexFactory GstIndexFactory;
typedef struct _GstIndexFactoryClass GstIndexFactoryClass;
klass->path_string_separator = "/";
klass->signal_object = g_object_new (gst_signal_object_get_type (), NULL);
- /* see the comments at gst_element_dispatch_properties_changed */
+ /* see the comments at gst_element_dispatch_properties_changed */
gobject_class->dispatch_properties_changed
= GST_DEBUG_FUNCPTR (gst_object_dispatch_properties_changed);
g_return_val_if_fail (GST_IS_OBJECT (object), parent);
g_return_val_if_fail (parent != NULL, parent);
- oclass = (GstObjectClass *)G_OBJECT_GET_CLASS(object);
+ oclass = GST_OBJECT_GET_CLASS (object);
+
if (oclass->save_thyself)
oclass->save_thyself (object, parent);
g_return_if_fail (GST_IS_OBJECT (object));
g_return_if_fail (self != NULL);
- oclass = (GstObjectClass *) G_OBJECT_GET_CLASS(object);
+ oclass = GST_OBJECT_GET_CLASS (object);
+
if (oclass->restore_thyself)
oclass->restore_thyself (object, self);
}
parents = parentage;
while (parents) {
if (GST_IS_OBJECT (parents->data)) {
- GstObjectClass *oclass = (GstObjectClass *)G_OBJECT_GET_CLASS(parents->data);
+ GstObjectClass *oclass = GST_OBJECT_GET_CLASS (parents->data);
component = gst_object_get_name (parents->data);
separator = oclass->path_string_separator;
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
gst_signal_object_signals[SO_OBJECT_LOADED] =
- g_signal_new("object_loaded", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST,
+ g_signal_new ("object_loaded", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstObjectClass, parent_set), NULL, NULL,
- gst_marshal_VOID__OBJECT_POINTER,G_TYPE_NONE,2,
- G_TYPE_OBJECT,G_TYPE_POINTER);
+ gst_marshal_VOID__OBJECT_POINTER, G_TYPE_NONE, 2,
+ G_TYPE_OBJECT, G_TYPE_POINTER);
#endif
}
{
GstObjectClass *oclass;
- oclass = (GstObjectClass *)G_OBJECT_GET_CLASS(object);
+ oclass = GST_OBJECT_GET_CLASS (object);
g_signal_emit_by_name (oclass->signal_object, name, object, self);
}
extern GType _gst_object_type;
#define GST_TYPE_OBJECT (_gst_object_type)
-# define GST_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_OBJECT))
-# define GST_IS_OBJECT_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_OBJECT))
+#define GST_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_OBJECT))
+#define GST_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_OBJECT))
+#define GST_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_OBJECT, GstObjectClass))
#define GST_OBJECT_CAST(obj) ((GstObject*)(obj))
#define GST_OBJECT_CLASS_CAST(klass) ((GstObjectClass*)(klass))
# define GST_OBJECT_CLASS GST_OBJECT_CLASS_CAST
#endif
-/*typedef struct _GstObject GstObject; */
-/*typedef struct _GstObjectClass GstObjectClass; */
-
typedef enum
{
GST_DESTROYED = 0,
xmlNodePtr (*save_thyself) (GstObject *object, xmlNodePtr parent);
void (*restore_thyself) (GstObject *object, xmlNodePtr self);
#endif
+
+ gpointer dummy[4];
};
#define GST_FLAGS(obj) (GST_OBJECT_CAST (obj)->flags)
#define GST_OBJECT_FLOATING(obj) (GST_FLAG_IS_SET (obj, GST_FLOATING))
/* CR1: object locking - GObject 2.0 doesn't have threadsafe locking */
-#define GST_LOCK(obj) (g_mutex_lock(GST_OBJECT_CAST(obj)->lock))
-#define GST_TRYLOCK(obj) (g_mutex_trylock(GST_OBJECT_CAST(obj)->lock))
-#define GST_UNLOCK(obj) (g_mutex_unlock(GST_OBJECT_CAST(obj)->lock))
-#define GST_GET_LOCK(obj) (GST_OBJECT_CAST(obj)->lock)
+#define GST_LOCK(obj) (g_mutex_lock(GST_OBJECT_CAST(obj)->lock))
+#define GST_TRYLOCK(obj) (g_mutex_trylock(GST_OBJECT_CAST(obj)->lock))
+#define GST_UNLOCK(obj) (g_mutex_unlock(GST_OBJECT_CAST(obj)->lock))
+#define GST_GET_LOCK(obj) (GST_OBJECT_CAST(obj)->lock)
/* normal GObject stuff */
#define GST_IS_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD))
#define GST_IS_PAD_FAST(obj) (G_OBJECT_TYPE(obj) == GST_TYPE_REAL_PAD || \
G_OBJECT_TYPE(obj) == GST_TYPE_GHOST_PAD)
-#define GST_IS_PAD_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PAD))
+#define GST_IS_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PAD))
#ifdef GST_TYPE_PARANOID
# define GST_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PAD, GstPad))
#define GST_REAL_PAD_CLASS_CAST(klass) ((GstRealPadClass*)(klass))
#define GST_IS_REAL_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_REAL_PAD))
#define GST_IS_REAL_PAD_FAST(obj) (G_OBJECT_TYPE(obj) == GST_TYPE_REAL_PAD)
-#define GST_IS_REAL_PAD_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_REAL_PAD))
+#define GST_IS_REAL_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_REAL_PAD))
#ifdef GST_TYPE_PARANOID
# define GST_REAL_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_REAL_PAD, GstRealPad))
#define GST_GHOST_PAD_CLASS_CAST(klass) ((GstGhostPadClass*)(klass))
#define GST_IS_GHOST_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GHOST_PAD))
#define GST_IS_GHOST_PAD_FAST(obj) (G_OBJECT_TYPE(obj) == GST_TYPE_GHOST_PAD)
-#define GST_IS_GHOST_PAD_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GHOST_PAD))
+#define GST_IS_GHOST_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GHOST_PAD))
#ifdef GST_TYPE_PARANOID
# define GST_GHOST_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GHOST_PAD, GstGhostPad))
#define GST_PAD_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PAD_TEMPLATE,GstPadTemplate))
#define GST_PAD_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PAD_TEMPLATE,GstPadTemplateClass))
#define GST_IS_PAD_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PAD_TEMPLATE))
-#define GST_IS_PAD_TEMPLATE_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PAD_TEMPLATE))
+#define GST_IS_PAD_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PAD_TEMPLATE))
typedef enum {
GST_PAD_ALWAYS,
#else /* GST_DISABLE_PARSE */
#pragma GCC poison gst_parse_launch
+#pragma GCC poison gst_parse_launchv
#endif /* GST_DISABLE_PARSE */
extern GstElementDetails gst_pipeline_details;
-#define GST_TYPE_PIPELINE \
- (gst_pipeline_get_type())
-#define GST_PIPELINE(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PIPELINE,GstPipeline))
-#define GST_PIPELINE_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PIPELINE,GstPipelineClass))
-#define GST_IS_PIPELINE(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PIPELINE))
-#define GST_IS_PIPELINE_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPELINE))
+#define GST_TYPE_PIPELINE (gst_pipeline_get_type ())
+#define GST_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PIPELINE, GstPipeline))
+#define GST_IS_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PIPELINE))
+#define GST_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PIPELINE, GstPipelineClass))
+#define GST_IS_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PIPELINE))
+#define GST_PIPELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PIPELINE, GstPipelineClass))
typedef struct _GstPipeline GstPipeline;
typedef struct _GstPipelineClass GstPipelineClass;
struct _GstPipeline {
- GstBin bin;
+ GstBin bin;
+
+ gpointer dummy[32];
};
struct _GstPipelineClass {
GstBinClass parent_class;
+
+ gpointer dummy[32];
};
GType gst_pipeline_get_type (void);
GError *error = NULL;
plugin = gst_registry_pool_find_plugin (name);
- if (plugin)
- {
+ if (plugin) {
gboolean result = gst_plugin_load_plugin (plugin, &error);
- if (error)
- {
+ if (error) {
GST_DEBUG (GST_CAT_PLUGIN_LOADING, "load_plugin error: %s\n",
error->message);
g_error_free (error);
g_return_if_fail (feature != NULL);
g_return_if_fail (GST_IS_PLUGIN_FEATURE (feature));
- oclass = (GstPluginFeatureClass *)G_OBJECT_GET_CLASS (feature);
+ oclass = GST_PLUGIN_FEATURE_GET_CLASS (feature);
if (oclass->unload_thyself)
oclass->unload_thyself (feature);
G_BEGIN_DECLS
-#define GST_TYPE_PLUGIN_FEATURE \
- (gst_plugin_feature_get_type())
-#define GST_PLUGIN_FEATURE(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLUGIN_FEATURE,GstPluginFeature))
-#define GST_PLUGIN_FEATURE_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLUGIN_FEATURE,GstPluginFeatureClass))
-#define GST_IS_PLUGIN_FEATURE(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLUGIN_FEATURE))
-#define GST_IS_PLUGIN_FEATURE_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLUGIN_FEATURE))
+#define GST_TYPE_PLUGIN_FEATURE (gst_plugin_feature_get_type())
+#define GST_PLUGIN_FEATURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PLUGIN_FEATURE, GstPluginFeature))
+#define GST_IS_PLUGIN_FEATURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PLUGIN_FEATURE))
+#define GST_PLUGIN_FEATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PLUGIN_FEATURE, GstPluginFeatureClass))
+#define GST_IS_PLUGIN_FEATURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PLUGIN_FEATURE))
+#define GST_PLUGIN_FEATURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PLUGIN_FEATURE, GstPluginFeatureClass))
#define GST_PLUGIN_FEATURE_NAME(feature) (GST_PLUGIN_FEATURE (feature)->name)
#include "gstlog.h"
#include "gstmarshal.h"
-#define CLASS(registry) GST_REGISTRY_CLASS (G_OBJECT_GET_CLASS (registry))
-
/* Element signals and args */
enum {
PLUGIN_ADDED,
gboolean
gst_registry_load (GstRegistry *registry)
{
+ GstRegistryClass *rclass;
+
g_return_val_if_fail (GST_IS_REGISTRY (registry), FALSE);
- if (CLASS (registry)->load)
- return CLASS (registry)->load (registry);
+ rclass = GST_REGISTRY_GET_CLASS (registry);
+
+ if (rclass->load)
+ return rclass->load (registry);
return FALSE;
}
gboolean
gst_registry_save (GstRegistry *registry)
{
+ GstRegistryClass *rclass;
+
g_return_val_if_fail (GST_IS_REGISTRY (registry), FALSE);
- if (CLASS (registry)->save)
- return CLASS (registry)->save (registry);
+ rclass = GST_REGISTRY_GET_CLASS (registry);
+
+ if (rclass->save)
+ return rclass->save (registry);
return FALSE;
}
gboolean
gst_registry_rebuild (GstRegistry *registry)
{
+ GstRegistryClass *rclass;
+
g_return_val_if_fail (GST_IS_REGISTRY (registry), FALSE);
- if (CLASS (registry)->rebuild)
- return CLASS (registry)->rebuild (registry);
+ rclass = GST_REGISTRY_GET_CLASS (registry);
+
+ if (rclass->rebuild)
+ return rclass->rebuild (registry);
return FALSE;
}
gboolean
gst_registry_unload (GstRegistry *registry)
{
+ GstRegistryClass *rclass;
+
g_return_val_if_fail (GST_IS_REGISTRY (registry), FALSE);
- if (CLASS (registry)->unload)
- return CLASS (registry)->unload (registry);
+ rclass = GST_REGISTRY_GET_CLASS (registry);
+
+ if (rclass->unload)
+ return rclass->unload (registry);
return FALSE;
}
GstRegistryReturn
gst_registry_load_plugin (GstRegistry *registry, GstPlugin *plugin)
{
+ GstRegistryClass *rclass;
+
g_return_val_if_fail (GST_IS_REGISTRY (registry), GST_REGISTRY_PLUGIN_LOAD_ERROR);
- if (CLASS (registry)->load_plugin)
- return CLASS (registry)->load_plugin (registry, plugin);
+ rclass = GST_REGISTRY_GET_CLASS (registry);
+
+ if (rclass->load_plugin)
+ return rclass->load_plugin (registry, plugin);
return GST_REGISTRY_PLUGIN_LOAD_ERROR;
}
GstRegistryReturn
gst_registry_unload_plugin (GstRegistry *registry, GstPlugin *plugin)
{
+ GstRegistryClass *rclass;
+
g_return_val_if_fail (GST_IS_REGISTRY (registry), GST_REGISTRY_PLUGIN_LOAD_ERROR);
- if (CLASS (registry)->unload_plugin)
- return CLASS (registry)->unload_plugin (registry, plugin);
+ rclass = GST_REGISTRY_GET_CLASS (registry);
+
+ if (rclass->unload_plugin)
+ return rclass->unload_plugin (registry, plugin);
return GST_REGISTRY_PLUGIN_LOAD_ERROR;
}
GstRegistryReturn
gst_registry_update_plugin (GstRegistry *registry, GstPlugin *plugin)
{
+ GstRegistryClass *rclass;
+
g_return_val_if_fail (GST_IS_REGISTRY (registry), GST_REGISTRY_PLUGIN_LOAD_ERROR);
- if (CLASS (registry)->update_plugin)
- return CLASS (registry)->update_plugin (registry, plugin);
+ rclass = GST_REGISTRY_GET_CLASS (registry);
+
+ if (rclass->update_plugin)
+ return rclass->update_plugin (registry, plugin);
return GST_REGISTRY_PLUGIN_LOAD_ERROR;
}
} GstRegistryFlags;
-#define GST_TYPE_REGISTRY \
- (gst_registry_get_type())
-#define GST_REGISTRY(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_REGISTRY,GstRegistry))
-#define GST_REGISTRY_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_REGISTRY,GstRegistryClass))
-#define GST_IS_REGISTRY(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_REGISTRY))
-#define GST_IS_REGISTRY_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_REGISTRY))
+#define GST_TYPE_REGISTRY (gst_registry_get_type ())
+#define GST_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_REGISTRY, GstRegistry))
+#define GST_IS_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_REGISTRY))
+#define GST_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_REGISTRY, GstRegistryClass))
+#define GST_IS_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_REGISTRY))
+#define GST_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_REGISTRY, GstRegistryClass))
typedef struct _GstRegistry GstRegistry;
typedef struct _GstRegistryClass GstRegistryClass;
GList *plugins;
GList *paths;
+
+ gpointer dummy[8];
};
struct _GstRegistryClass {
/* signals */
void (*plugin_added) (GstRegistry *registry, GstPlugin *plugin);
+
+ gpointer dummy[8];
};
* Boston, MA 02111-1307, USA.
*/
-#define CLASS(obj) GST_SCHEDULER_CLASS (G_OBJECT_GET_CLASS (obj))
-
#include "gst_private.h"
#include "gstsystemclock.h"
void
gst_scheduler_setup (GstScheduler *sched)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
- if (CLASS (sched)->setup)
- CLASS (sched)->setup (sched);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->setup)
+ sclass->setup (sched);
}
/**
void
gst_scheduler_reset (GstScheduler *sched)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
- if (CLASS (sched)->reset)
- CLASS (sched)->reset (sched);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->reset)
+ sclass->reset (sched);
}
/**
void
gst_scheduler_pad_connect (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_PAD (srcpad));
g_return_if_fail (GST_IS_PAD (sinkpad));
- if (CLASS (sched)->pad_connect)
- CLASS (sched)->pad_connect (sched, srcpad, sinkpad);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->pad_connect)
+ sclass->pad_connect (sched, srcpad, sinkpad);
}
/**
void
gst_scheduler_pad_disconnect (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_PAD (srcpad));
g_return_if_fail (GST_IS_PAD (sinkpad));
- if (CLASS (sched)->pad_disconnect)
- CLASS (sched)->pad_disconnect (sched, srcpad, sinkpad);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->pad_disconnect)
+ sclass->pad_disconnect (sched, srcpad, sinkpad);
}
/**
GstPad *
gst_scheduler_pad_select (GstScheduler *sched, GList *padlist)
{
+ GstSchedulerClass *sclass;
+
g_return_val_if_fail (GST_IS_SCHEDULER (sched), NULL);
g_return_val_if_fail (padlist != NULL, NULL);
- if (CLASS (sched)->pad_select)
- CLASS (sched)->pad_select (sched, padlist);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->pad_select)
+ sclass->pad_select (sched, padlist);
return NULL;
}
void
gst_scheduler_add_element (GstScheduler *sched, GstElement *element)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_ELEMENT (element));
gst_element_set_scheduler (element, sched);
- if (CLASS (sched)->add_element)
- CLASS (sched)->add_element (sched, element);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->add_element)
+ sclass->add_element (sched, element);
}
/**
void
gst_scheduler_remove_element (GstScheduler *sched, GstElement *element)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_ELEMENT (element));
sched->clock_providers = g_list_remove (sched->clock_providers, element);
sched->clock_receivers = g_list_remove (sched->clock_receivers, element);
- if (CLASS (sched)->remove_element)
- CLASS (sched)->remove_element (sched, element);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->remove_element)
+ sclass->remove_element (sched, element);
gst_element_set_scheduler (element, NULL);
}
GstElementStateReturn
gst_scheduler_state_transition (GstScheduler *sched, GstElement *element, gint transition)
{
+ GstSchedulerClass *sclass;
+
g_return_val_if_fail (GST_IS_SCHEDULER (sched), GST_STATE_FAILURE);
g_return_val_if_fail (GST_IS_ELEMENT (element), GST_STATE_FAILURE);
}
}
- if (CLASS (sched)->state_transition)
- return CLASS (sched)->state_transition (sched, element, transition);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->state_transition)
+ return sclass->state_transition (sched, element, transition);
return GST_STATE_SUCCESS;
}
void
gst_scheduler_scheduling_change (GstScheduler *sched, GstElement *element)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_ELEMENT (element));
- if (CLASS (sched)->scheduling_change)
- CLASS (sched)->scheduling_change (sched, element);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->scheduling_change)
+ sclass->scheduling_change (sched, element);
}
/**
void
gst_scheduler_add_scheduler (GstScheduler *sched, GstScheduler *sched2)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_SCHEDULER (sched2));
sched->schedulers = g_list_prepend (sched->schedulers, sched2);
sched2->parent_sched = sched;
- if (CLASS (sched)->add_scheduler)
- CLASS (sched)->add_scheduler (sched, sched2);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->add_scheduler)
+ sclass->add_scheduler (sched, sched2);
}
/**
void
gst_scheduler_remove_scheduler (GstScheduler *sched, GstScheduler *sched2)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_SCHEDULER (sched2));
sched->schedulers = g_list_remove (sched->schedulers, sched2);
sched2->parent_sched = NULL;
- if (CLASS (sched)->remove_scheduler)
- CLASS (sched)->remove_scheduler (sched, sched2);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->remove_scheduler)
+ sclass->remove_scheduler (sched, sched2);
}
/**
void
gst_scheduler_lock_element (GstScheduler *sched, GstElement *element)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_ELEMENT (element));
- if (CLASS (sched)->lock_element)
- CLASS (sched)->lock_element (sched, element);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->lock_element)
+ sclass->lock_element (sched, element);
}
/**
void
gst_scheduler_unlock_element (GstScheduler *sched, GstElement *element)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_ELEMENT (element));
- if (CLASS (sched)->unlock_element)
- CLASS (sched)->unlock_element (sched, element);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->unlock_element)
+ sclass->unlock_element (sched, element);
}
/**
void
gst_scheduler_error (GstScheduler *sched, GstElement *element)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_ELEMENT (element));
- if (CLASS (sched)->error)
- CLASS (sched)->error (sched, element);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->error)
+ sclass->error (sched, element);
}
/**
void
gst_scheduler_yield (GstScheduler *sched, GstElement *element)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
g_return_if_fail (GST_IS_ELEMENT (element));
- if (CLASS (sched)->yield)
- CLASS (sched)->yield (sched, element);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->yield)
+ sclass->yield (sched, element);
}
/**
gboolean
gst_scheduler_interrupt (GstScheduler *sched, GstElement *element)
{
+ GstSchedulerClass *sclass;
+
g_return_val_if_fail (GST_IS_SCHEDULER (sched), FALSE);
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
- if (CLASS (sched)->interrupt)
- return CLASS (sched)->interrupt (sched, element);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->interrupt)
+ return sclass->interrupt (sched, element);
return FALSE;
}
gst_scheduler_clock_wait (GstScheduler *sched, GstElement *element, GstClock *clock, GstClockTime time,
GstClockTimeDiff *jitter)
{
+ GstSchedulerClass *sclass;
+
g_return_val_if_fail (GST_IS_SCHEDULER (sched), GST_CLOCK_ERROR);
- if (CLASS (sched)->clock_wait)
- return CLASS (sched)->clock_wait (sched, element, clock, time, jitter);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->clock_wait)
+ return sclass->clock_wait (sched, element, clock, time, jitter);
else
{
GstClockID id = gst_clock_new_single_shot_id (clock, time);
gboolean
gst_scheduler_iterate (GstScheduler *sched)
{
+ GstSchedulerClass *sclass;
+
g_return_val_if_fail (GST_IS_SCHEDULER (sched), FALSE);
- if (CLASS (sched)->iterate)
- return CLASS (sched)->iterate (sched);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->iterate)
+ return sclass->iterate (sched);
return FALSE;
}
void
gst_scheduler_show (GstScheduler *sched)
{
+ GstSchedulerClass *sclass;
+
g_return_if_fail (GST_IS_SCHEDULER (sched));
- if (CLASS (sched)->show)
- CLASS (sched)->show (sched);
+ sclass = GST_SCHEDULER_GET_CLASS (sched);
+
+ if (sclass->show)
+ sclass->show (sched);
}
/*
G_BEGIN_DECLS
-#define GST_TYPE_SCHEDULER \
- (gst_scheduler_get_type())
-#define GST_SCHEDULER(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SCHEDULER,GstScheduler))
-#define GST_SCHEDULER_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SCHEDULER,GstSchedulerClass))
-#define GST_IS_SCHEDULER(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SCHEDULER))
-#define GST_IS_SCHEDULER_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SCHEDULER))
+#define GST_TYPE_SCHEDULER (gst_scheduler_get_type ())
+#define GST_SCHEDULER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SCHEDULER, GstScheduler))
+#define GST_IS_SCHEDULER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SCHEDULER))
+#define GST_SCHEDULER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SCHEDULER,GstSchedulerClass))
+#define GST_IS_SCHEDULER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SCHEDULER))
+#define GST_SCHEDULER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SCHEDULER, GstSchedulerClass))
typedef enum {
/* this scheduler works with a fixed clock */
GList *clock_receivers;
GList *schedulers;
+
+ gpointer dummy[8];
};
struct _GstSchedulerClass {
/* signals */
void (*object_sync) (GstScheduler *sched, GstClock *clock, GstObject *object,
GstClockID id);
+
+ gpointer dummy[8];
};
GType gst_scheduler_get_type (void);
* creating schedulers
*
*/
-#define GST_TYPE_SCHEDULER_FACTORY \
- (gst_scheduler_factory_get_type ())
-#define GST_SCHEDULER_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactory))
-#define GST_SCHEDULER_FACTORY_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactoryClass))
-#define GST_IS_SCHEDULER_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SCHEDULER_FACTORY))
-#define GST_IS_SCHEDULER_FACTORY_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SCHEDULER_FACTORY))
+#define GST_TYPE_SCHEDULER_FACTORY (gst_scheduler_factory_get_type ())
+#define GST_SCHEDULER_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactory))
+#define GST_IS_SCHEDULER_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SCHEDULER_FACTORY))
+#define GST_SCHEDULER_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactoryClass))
+#define GST_IS_SCHEDULER_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SCHEDULER_FACTORY))
+#define GST_SCHEDULER_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactoryClass))
typedef struct _GstSchedulerFactory GstSchedulerFactory;
typedef struct _GstSchedulerFactoryClass GstSchedulerFactoryClass;
#include "gstsystemclock.h"
-#define CLASS(clock) GST_SYSTEM_CLOCK_CLASS (G_OBJECT_GET_CLASS (clock))
-
static GstClock *_the_system_clock = NULL;
static void gst_system_clock_class_init (GstSystemClockClass *klass);
G_BEGIN_DECLS
-#define GST_TYPE_SYSTEM_CLOCK \
- (gst_system_clock_get_type())
-#define GST_SYSTEM_CLOCK(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SYSTEM_CLOCK,GstSystemClock))
-#define GST_SYSTEM_CLOCK_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SYSTEM_CLOCK,GstSystemClockClass))
-#define GST_IS_SYSTEM_CLOCK(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SYSTEM_CLOCK))
-#define GST_IS_SYSTEM_CLOCK_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SYSTEM_CLOCK))
+#define GST_TYPE_SYSTEM_CLOCK (gst_system_clock_get_type ())
+#define GST_SYSTEM_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SYSTEM_CLOCK, GstSystemClock))
+#define GST_IS_SYSTEM_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SYSTEM_CLOCK))
+#define GST_SYSTEM_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SYSTEM_CLOCK, GstSystemClockClass))
+#define GST_IS_SYSTEM_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SYSTEM_CLOCK))
+#define GST_SYSTEM_CLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SYSTEM_CLOCK, GstSystemClockClass))
typedef struct _GstSystemClock GstSystemClock;
GST_THREAD_FLAG_LAST = GST_BIN_FLAG_LAST + 4
} GstThreadState;
-#define GST_TYPE_THREAD \
- (gst_thread_get_type())
-#define GST_THREAD(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_THREAD,GstThread))
-#define GST_THREAD_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_THREAD,GstThreadClass))
-#define GST_IS_THREAD(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_THREAD))
-#define GST_IS_THREAD_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_THREAD))
+#define GST_TYPE_THREAD (gst_thread_get_type())
+#define GST_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_THREAD,GstThread))
+#define GST_IS_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_THREAD))
+#define GST_THREAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_THREAD,GstThreadClass))
+#define GST_IS_THREAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_THREAD))
+#define GST_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_THREAD, GstThreadClass))
typedef struct _GstThread GstThread;
typedef struct _GstThreadClass GstThreadClass;
GCond *cond; /* .... used to control the thread */
gint transition; /* the current state transition */
+
+ gpointer dummy[8];
};
struct _GstThreadClass {
/* signals */
void (*shutdown) (GstThread *thread);
+
+ gpointer dummy[8];
};
GType gst_thread_get_type (void);
G_BEGIN_DECLS
/* type of function used to check a stream for equality with type */
-typedef GstCaps *(*GstTypeFindFunc) (GstBuffer *buf, gpointer priv);
+typedef GstCaps* (*GstTypeFindFunc) (GstBuffer *buf, gpointer priv);
typedef struct _GstType GstType;
typedef struct _GstTypeDefinition GstTypeDefinition;
GstTypeFindFunc typefindfunc;
};
-#define GST_TYPE_TYPE_FACTORY \
- (gst_type_factory_get_type())
-#define GST_TYPE_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TYPE_FACTORY,GstTypeFactory))
-#define GST_TYPE_FACTORY_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TYPE_FACTORY,GstTypeFactoryClass))
-#define GST_IS_TYPE_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TYPE_FACTORY))
-#define GST_IS_TYPE_FACTORY_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TYPE_FACTORY))
+#define GST_TYPE_TYPE_FACTORY (gst_type_factory_get_type ())
+#define GST_TYPE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TYPE_FACTORY, GstTypeFactory))
+#define GST_IS_TYPE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TYPE_FACTORY))
+#define GST_TYPE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TYPE_FACTORY, GstTypeFactoryClass))
+#define GST_IS_TYPE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TYPE_FACTORY))
+#define GST_TYPE_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_TYPE_FACTORY, GstTypeFactoryClass))
struct _GstTypeFactory {
- GstPluginFeature feature;
+ GstPluginFeature feature;
- gchar *mime;
- gchar *exts;
- GstTypeFindFunc typefindfunc;
+ gchar *mime;
+ gchar *exts;
+ GstTypeFindFunc typefindfunc;
+
+ gpointer dummy[8];
};
struct _GstTypeFactoryClass {
GstPluginFeatureClass parent;
+
+ gpointer dummy[8];
};
extern GstElementDetails gst_type_find_details;
-#define GST_TYPE_TYPE_FIND \
- (gst_type_find_get_type())
-#define GST_TYPE_FIND(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TYPE_FIND,GstTypeFind))
-#define GST_TYPE_FIND_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TYPE_FIND,GstTypeFindClass))
-#define GST_IS_TYPE_FIND(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TYPE_FIND))
-#define GST_IS_TYPE_FIND_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TYPE_FIND))
+#define GST_TYPE_TYPE_FIND (gst_type_find_get_type ())
+#define GST_TYPE_FIND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TYPE_FIND, GstTypeFind))
+#define GST_IS_TYPE_FIND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TYPE_FIND))
+#define GST_TYPE_FIND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TYPE_FIND, GstTypeFindClass))
+#define GST_IS_TYPE_FIND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TYPE_FIND))
+#define GST_TYPE_FIND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_TYPE_FIND, GstTypeFindClass))
typedef struct _GstTypeFind GstTypeFind;
typedef struct _GstTypeFindClass GstTypeFindClass;
G_BEGIN_DECLS
-#define GST_TYPE_XML \
- (gst_xml_get_type())
-#define GST_XML(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_XML,GstXML))
-#define GST_XML_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_XML,GstXMLClass))
-#define GST_IS_XML(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_XML))
-#define GST_IS_XML_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_XML))
+#define GST_TYPE_XML (gst_xml_get_type ())
+#define GST_XML(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_XML, GstXML))
+#define GST_IS_XML(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_XML))
+#define GST_XML_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_XML, GstXMLClass))
+#define GST_IS_XML_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_XML))
+
+#define GST_XML_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_XML, GstXMLClass))
typedef struct _GstXML GstXML;
typedef struct _GstXMLClass GstXMLClass;
grammar.tab.h
lex.yy.c
parse.c
+lex._gst_parse_yy.c
GST_RPAD_BUFPEN (GST_RPAD_PEER (pad)) = buf;
GST_DEBUG (GST_CAT_DATAFLOW, "switching to %p",
GST_ELEMENT_THREADSTATE (parent));
- parent->select_pad = pad;
+ /* FIXME temporarily diabled */
+ /* parent->select_pad = pad; */
do_element_switch (parent);
do_element_switch (GST_PAD_PARENT (peer));
- pad = GST_ELEMENT (GST_PAD_PARENT (pad))->select_pad;
+ /* FIXME disabled for now */
+ /* pad = GST_ELEMENT (GST_PAD_PARENT (pad))->select_pad;*/
g_assert (pad != NULL);
}