mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
- Cleanups
Original commit message from CVS: - Cleanups - Added padding to structs - fixed typechecking/casts - reduced casts - implemented remove_element in gstbin - implemented set index on bin
This commit is contained in:
parent
54ad9d5e6b
commit
68b53ac4ab
33 changed files with 567 additions and 359 deletions
69
gst/gstbin.c
69
gst/gstbin.c
|
@ -30,6 +30,7 @@
|
|||
#include "gstlog.h"
|
||||
|
||||
#include "gstscheduler.h"
|
||||
#include "gstindex.h"
|
||||
|
||||
GstElementDetails gst_bin_details = {
|
||||
"Generic bin",
|
||||
|
@ -48,6 +49,8 @@ static void gst_bin_dispose (GObject * object);
|
|||
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
|
||||
|
@ -58,7 +61,8 @@ static void gst_bin_restore_thyself (GstObject * object, xmlNodePtr self);
|
|||
/* Bin signals and args */
|
||||
enum
|
||||
{
|
||||
OBJECT_ADDED,
|
||||
ELEMENT_ADDED,
|
||||
ELEMENT_REMOVED,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
|
@ -109,12 +113,17 @@ gst_bin_class_init (GstBinClass * klass)
|
|||
|
||||
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);
|
||||
|
@ -122,6 +131,7 @@ gst_bin_class_init (GstBinClass * klass)
|
|||
#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);
|
||||
}
|
||||
|
@ -137,8 +147,8 @@ gst_bin_init (GstBin * bin)
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -210,16 +220,31 @@ gst_bin_auto_clock (GstBin *bin)
|
|||
}
|
||||
|
||||
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))
|
||||
|
@ -233,7 +258,7 @@ gst_bin_set_element_sched (GstElement *element, GstScheduler *sched)
|
|||
/* 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);
|
||||
|
@ -431,7 +456,7 @@ gst_bin_add (GstBin *bin, GstElement *element)
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -486,6 +511,8 @@ gst_bin_remove (GstBin *bin, GstElement *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 */
|
||||
|
@ -493,6 +520,10 @@ gst_bin_remove (GstBin *bin, GstElement *element)
|
|||
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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -860,16 +891,16 @@ gst_bin_iterate (GstBin *bin)
|
|||
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);
|
||||
|
||||
|
@ -891,13 +922,13 @@ gst_bin_iterate (GstBin *bin)
|
|||
* 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));
|
||||
|
||||
|
@ -905,20 +936,20 @@ gst_bin_set_pre_iterate_function (GstBin *bin, GstBinPrePostIterateFunction func
|
|||
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));
|
||||
|
||||
|
@ -926,6 +957,6 @@ gst_bin_set_post_iterate_function (GstBin *bin, GstBinPrePostIterateFunction fun
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
35
gst/gstbin.h
35
gst/gstbin.h
|
@ -31,9 +31,10 @@ G_BEGIN_DECLS
|
|||
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))
|
||||
|
@ -46,7 +47,7 @@ extern GType _gst_bin_type;
|
|||
# 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 */
|
||||
|
@ -76,12 +77,12 @@ struct _GstBin {
|
|||
|
||||
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 {
|
||||
|
@ -90,13 +91,15 @@ 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);
|
||||
|
@ -121,11 +124,15 @@ void gst_bin_auto_clock (GstBin *bin);
|
|||
|
||||
/* 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_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_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
|
||||
|
||||
|
|
|
@ -219,7 +219,8 @@ gst_buffer_new_and_alloc (guint size)
|
|||
* 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;
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ extern GType _gst_buffer_pool_type;
|
|||
#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)
|
||||
|
@ -79,7 +80,9 @@ struct _GstBuffer {
|
|||
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) */
|
||||
|
@ -90,9 +93,14 @@ struct _GstBuffer {
|
|||
|
||||
/* 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;
|
||||
|
@ -106,22 +114,13 @@ struct _GstBufferPool {
|
|||
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 { \
|
||||
|
@ -147,6 +146,15 @@ GstBuffer* gst_buffer_merge (GstBuffer *buf1, GstBuffer *buf2);
|
|||
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,
|
||||
|
@ -159,6 +167,7 @@ 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);
|
||||
|
||||
|
|
|
@ -29,8 +29,7 @@
|
|||
* 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,
|
||||
|
@ -114,11 +113,11 @@ gst_buffer_pool_get_default (guint buffer_size, guint pool_size)
|
|||
}
|
||||
|
||||
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 ();
|
||||
|
|
|
@ -34,8 +34,6 @@ enum {
|
|||
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);
|
||||
|
@ -151,6 +149,7 @@ gst_clock_id_wait (GstClockID id, GstClockTimeDiff *jitter)
|
|||
GstClock *clock;
|
||||
GstClockReturn res = GST_CLOCK_UNSUPPORTED;
|
||||
GstClockTime requested;
|
||||
GstClockClass *cclass;
|
||||
|
||||
g_return_val_if_fail (id != NULL, GST_CLOCK_ERROR);
|
||||
|
||||
|
@ -163,12 +162,13 @@ gst_clock_id_wait (GstClockID id, GstClockTimeDiff *jitter)
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
|
@ -208,6 +208,7 @@ gst_clock_id_wait_async (GstClockID id,
|
|||
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);
|
||||
|
@ -220,8 +221,13 @@ gst_clock_id_wait_async (GstClockID id,
|
|||
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;
|
||||
|
@ -238,14 +244,17 @@ gst_clock_id_unschedule (GstClockID id)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -273,14 +282,17 @@ gst_clock_id_unlock (GstClockID id)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -368,10 +380,14 @@ gst_clock_init (GstClock *clock)
|
|||
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;
|
||||
}
|
||||
|
@ -404,11 +420,15 @@ gst_clock_get_speed (GstClock *clock)
|
|||
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;
|
||||
}
|
||||
|
@ -424,10 +444,14 @@ gst_clock_set_resolution (GstClock *clock, guint64 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;
|
||||
}
|
||||
|
@ -444,13 +468,16 @@ void
|
|||
gst_clock_set_active (GstClock *clock, gboolean active)
|
||||
{
|
||||
GstClockTime time = 0LL;
|
||||
GstClockClass *cclass;
|
||||
|
||||
g_return_if_fail (GST_IS_CLOCK (clock));
|
||||
|
||||
clock->active = active;
|
||||
|
||||
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);
|
||||
|
@ -495,11 +522,14 @@ void
|
|||
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);
|
||||
|
@ -534,8 +564,12 @@ gst_clock_handle_discont (GstClock *clock, guint64 time)
|
|||
|
||||
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 {
|
||||
|
@ -582,8 +616,12 @@ gst_clock_get_time (GstClock *clock)
|
|||
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) {
|
||||
|
|
|
@ -27,16 +27,13 @@
|
|||
|
||||
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;
|
||||
|
@ -61,6 +58,7 @@ typedef struct _GstClockEntry GstClockEntry;
|
|||
typedef struct _GstClock GstClock;
|
||||
typedef struct _GstClockClass GstClockClass;
|
||||
|
||||
/* --- prototype for async callbacks --- */
|
||||
typedef gboolean (*GstClockCallback) (GstClock *clock, GstClockTime time,
|
||||
GstClockID id, gpointer user_data);
|
||||
|
||||
|
@ -121,11 +119,11 @@ struct _GstClock {
|
|||
|
||||
GstClockFlags flags;
|
||||
|
||||
/*< protected >*/
|
||||
/* --- protected --- */
|
||||
GstClockTime start_time;
|
||||
GstClockTime last_time;
|
||||
|
||||
/*< private >*/
|
||||
/* --- private --- */
|
||||
gboolean accept_discont;
|
||||
gdouble speed;
|
||||
guint64 resolution;
|
||||
|
@ -134,6 +132,8 @@ struct _GstClock {
|
|||
GMutex *active_mutex;
|
||||
GCond *active_cond;
|
||||
gboolean stats;
|
||||
|
||||
gpointer dummy[4];
|
||||
};
|
||||
|
||||
struct _GstClockClass {
|
||||
|
@ -151,14 +151,9 @@ 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);
|
||||
|
|
|
@ -49,8 +49,6 @@ enum {
|
|||
/* 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);
|
||||
|
@ -186,7 +184,7 @@ gst_element_init (GstElement *element)
|
|||
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);
|
||||
|
@ -195,7 +193,7 @@ gst_element_real_set_property (GObject *object, guint prop_id, const GValue *val
|
|||
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);
|
||||
|
@ -641,7 +639,8 @@ gst_element_request_pad (GstElement *element, GstPadTemplate *templ, const gchar
|
|||
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);
|
||||
|
||||
|
@ -664,7 +663,8 @@ gst_element_release_request_pad (GstElement *element, GstPad *pad)
|
|||
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);
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ gst_element_requires_clock (GstElement *element)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -698,7 +698,7 @@ gst_element_provides_clock (GstElement *element)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -711,10 +711,14 @@ gst_element_provides_clock (GstElement *element)
|
|||
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;
|
||||
}
|
||||
|
@ -730,11 +734,14 @@ gst_element_set_clock (GstElement *element, GstClock *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);
|
||||
|
||||
if (CLASS (element)->get_clock)
|
||||
return CLASS (element)->get_clock (element);
|
||||
oclass = GST_ELEMENT_GET_CLASS (element);
|
||||
|
||||
if (oclass->get_clock)
|
||||
return oclass->get_clock (element);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -779,7 +786,7 @@ gst_element_is_indexable (GstElement *element)
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -792,11 +799,15 @@ gst_element_is_indexable (GstElement *element)
|
|||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -811,10 +822,14 @@ gst_element_set_index (GstElement *element, GstIndex *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;
|
||||
}
|
||||
|
@ -831,10 +846,14 @@ gst_element_get_index (GstElement *element)
|
|||
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;
|
||||
}
|
||||
|
@ -1171,7 +1190,7 @@ gst_element_get_pad_template_list (GstElement *element)
|
|||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1778,11 +1797,15 @@ gst_element_send_event_default (GstElement *element, GstEvent *event)
|
|||
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;
|
||||
}
|
||||
|
@ -1827,12 +1850,16 @@ gboolean
|
|||
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);
|
||||
|
||||
if (CLASS (element)->query)
|
||||
return CLASS (element)->query (element, type, format, value);
|
||||
oclass = GST_ELEMENT_GET_CLASS (element);
|
||||
|
||||
if (oclass->query)
|
||||
return oclass->query (element, type, format, value);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1956,7 +1983,7 @@ gst_element_set_state (GstElement *element, GstElementState state)
|
|||
}
|
||||
|
||||
/* 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);
|
||||
|
||||
|
@ -2168,13 +2195,9 @@ failure:
|
|||
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
|
||||
|
@ -2249,7 +2272,7 @@ gst_element_save_thyself (GstObject *object,
|
|||
|
||||
element = GST_ELEMENT (object);
|
||||
|
||||
oclass = CLASS (element);
|
||||
oclass = GST_ELEMENT_GET_CLASS (element);
|
||||
|
||||
xmlNewChild(parent, NULL, "name", GST_ELEMENT_NAME(element));
|
||||
|
||||
|
@ -2352,8 +2375,8 @@ gst_element_restore_thyself (GstObject *object, xmlNodePtr self)
|
|||
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 */
|
||||
|
||||
|
|
|
@ -58,7 +58,8 @@ extern GType _gst_element_type;
|
|||
#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))
|
||||
|
@ -119,11 +120,12 @@ struct _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;
|
||||
|
||||
|
@ -132,7 +134,6 @@ struct _GstElement {
|
|||
guint16 numsrcpads;
|
||||
guint16 numsinkpads;
|
||||
GList *pads;
|
||||
GstPad *select_pad;
|
||||
|
||||
GMutex *state_mutex;
|
||||
GCond *state_cond;
|
||||
|
@ -141,6 +142,8 @@ struct _GstElement {
|
|||
GstElementPostRunFunction post_run_func;
|
||||
GAsyncQueue *prop_value_queue;
|
||||
GMutex *property_mutex;
|
||||
|
||||
gpointer dummy[8];
|
||||
};
|
||||
|
||||
struct _GstElementClass {
|
||||
|
@ -179,6 +182,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);
|
||||
|
|
|
@ -130,7 +130,7 @@ gst_format_get_by_nick (const gchar *nick)
|
|||
*
|
||||
* 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));
|
||||
|
@ -143,7 +143,7 @@ gst_format_get_details (GstFormat format)
|
|||
*
|
||||
* Returns: A GList of #GstFormatDefinition.
|
||||
*/
|
||||
const GList *
|
||||
const GList*
|
||||
gst_format_get_definitions (void)
|
||||
{
|
||||
return _gst_formats;
|
||||
|
|
|
@ -41,6 +41,7 @@ typedef enum {
|
|||
} GstFormat;
|
||||
|
||||
typedef struct _GstFormatDefinition GstFormatDefinition;
|
||||
|
||||
struct _GstFormatDefinition
|
||||
{
|
||||
GstFormat value;
|
||||
|
|
|
@ -40,8 +40,6 @@ enum {
|
|||
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 };
|
||||
|
||||
|
@ -293,6 +291,7 @@ gst_index_add_format (GstIndex *index, gint id, GstFormat format)
|
|||
{
|
||||
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);
|
||||
|
@ -301,11 +300,14 @@ gst_index_add_format (GstIndex *index, gint id, GstFormat format)
|
|||
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;
|
||||
|
||||
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);
|
||||
|
||||
|
@ -326,6 +328,7 @@ GstIndexEntry*
|
|||
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);
|
||||
|
@ -335,8 +338,10 @@ gst_index_add_id (GstIndex *index, gint id, gchar *description)
|
|||
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);
|
||||
|
||||
|
@ -364,6 +369,7 @@ gst_index_get_writer_id (GstIndex *index, GstObject *writer, gint *id)
|
|||
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);
|
||||
|
@ -382,8 +388,10 @@ gst_index_get_writer_id (GstIndex *index, GstObject *writer, gint *id)
|
|||
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) {
|
||||
|
@ -419,6 +427,7 @@ gst_index_add_association (GstIndex *index, gint id, GstAssocFlags flags,
|
|||
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);
|
||||
|
@ -460,8 +469,10 @@ gst_index_add_association (GstIndex *index, gint id, GstAssocFlags flags,
|
|||
}
|
||||
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);
|
||||
|
||||
|
@ -542,10 +553,14 @@ gst_index_get_assoc_entry_full (GstIndex *index, gint id,
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -30,11 +30,12 @@
|
|||
|
||||
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;
|
||||
|
@ -61,9 +62,9 @@ typedef enum {
|
|||
} 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;
|
||||
|
||||
|
@ -77,10 +78,10 @@ typedef enum {
|
|||
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;
|
||||
|
@ -145,6 +146,8 @@ struct _GstIndex {
|
|||
|
||||
GHashTable *writers;
|
||||
gint last_id;
|
||||
|
||||
gpointer dummy[8];
|
||||
};
|
||||
|
||||
struct _GstIndexClass {
|
||||
|
@ -163,6 +166,8 @@ struct _GstIndexClass {
|
|||
gpointer user_data);
|
||||
/* signals */
|
||||
void (*entry_added) (GstIndex *index, GstIndexEntry *entry);
|
||||
|
||||
gpointer dummy[8];
|
||||
};
|
||||
|
||||
GType gst_index_get_type (void);
|
||||
|
@ -208,16 +213,12 @@ gboolean gst_index_entry_assoc_map (GstIndexEntry *entry,
|
|||
* 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;
|
||||
|
|
|
@ -147,8 +147,8 @@ gst_object_class_init (GstObjectClass *klass)
|
|||
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);
|
||||
|
||||
|
@ -555,7 +555,8 @@ gst_object_save_thyself (GstObject *object, xmlNodePtr parent)
|
|||
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);
|
||||
|
||||
|
@ -580,7 +581,8 @@ gst_object_restore_thyself (GstObject *object, xmlNodePtr self)
|
|||
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);
|
||||
}
|
||||
|
@ -683,7 +685,7 @@ gst_object_get_path_string (GstObject *object)
|
|||
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;
|
||||
|
@ -757,10 +759,10 @@ gst_signal_object_class_init (GstSignalObjectClass *klass)
|
|||
|
||||
#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
|
||||
}
|
||||
|
||||
|
@ -805,7 +807,7 @@ gst_class_signal_emit_by_name (GstObject *object,
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -41,8 +41,9 @@ G_BEGIN_DECLS
|
|||
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))
|
||||
|
@ -55,9 +56,6 @@ extern GType _gst_object_type;
|
|||
# define GST_OBJECT_CLASS GST_OBJECT_CLASS_CAST
|
||||
#endif
|
||||
|
||||
/*typedef struct _GstObject GstObject; */
|
||||
/*typedef struct _GstObjectClass GstObjectClass; */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GST_DESTROYED = 0,
|
||||
|
@ -101,6 +99,8 @@ struct _GstObjectClass {
|
|||
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)
|
||||
|
@ -115,10 +115,10 @@ struct _GstObjectClass {
|
|||
#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 */
|
||||
|
|
|
@ -51,7 +51,7 @@ extern GType _gst_ghost_pad_type;
|
|||
#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))
|
||||
|
@ -70,7 +70,7 @@ extern GType _gst_ghost_pad_type;
|
|||
#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))
|
||||
|
@ -89,7 +89,7 @@ extern GType _gst_ghost_pad_type;
|
|||
#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))
|
||||
|
@ -312,7 +312,7 @@ struct _GstGhostPadClass {
|
|||
#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,
|
||||
|
|
|
@ -47,6 +47,7 @@ GstBin* gst_parse_launchv (const gchar **argv, GError **error);
|
|||
#else /* GST_DISABLE_PARSE */
|
||||
|
||||
#pragma GCC poison gst_parse_launch
|
||||
#pragma GCC poison gst_parse_launchv
|
||||
|
||||
#endif /* GST_DISABLE_PARSE */
|
||||
|
||||
|
|
|
@ -30,26 +30,26 @@ G_BEGIN_DECLS
|
|||
|
||||
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);
|
||||
|
|
|
@ -436,11 +436,9 @@ gst_plugin_load (const gchar *name)
|
|||
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);
|
||||
|
|
|
@ -116,7 +116,7 @@ gst_plugin_feature_unload_thyself (GstPluginFeature *feature)
|
|||
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);
|
||||
|
|
|
@ -28,16 +28,12 @@
|
|||
|
||||
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)
|
||||
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
#include "gstlog.h"
|
||||
#include "gstmarshal.h"
|
||||
|
||||
#define CLASS(registry) GST_REGISTRY_CLASS (G_OBJECT_GET_CLASS (registry))
|
||||
|
||||
/* Element signals and args */
|
||||
enum {
|
||||
PLUGIN_ADDED,
|
||||
|
@ -112,10 +110,14 @@ gst_registry_init (GstRegistry *registry)
|
|||
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;
|
||||
}
|
||||
|
@ -147,10 +149,14 @@ gst_registry_is_loaded (GstRegistry *registry)
|
|||
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;
|
||||
}
|
||||
|
@ -166,10 +172,14 @@ gst_registry_save (GstRegistry *registry)
|
|||
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;
|
||||
}
|
||||
|
@ -185,10 +195,14 @@ gst_registry_rebuild (GstRegistry *registry)
|
|||
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;
|
||||
}
|
||||
|
@ -381,10 +395,14 @@ gst_registry_find_feature (GstRegistry *registry, const gchar *name, GType type)
|
|||
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;
|
||||
}
|
||||
|
@ -401,10 +419,14 @@ gst_registry_load_plugin (GstRegistry *registry, GstPlugin *plugin)
|
|||
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;
|
||||
}
|
||||
|
@ -421,10 +443,14 @@ gst_registry_unload_plugin (GstRegistry *registry, GstPlugin *plugin)
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -62,16 +62,12 @@ typedef enum {
|
|||
} 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;
|
||||
|
@ -89,6 +85,8 @@ struct _GstRegistry {
|
|||
GList *plugins;
|
||||
|
||||
GList *paths;
|
||||
|
||||
gpointer dummy[8];
|
||||
};
|
||||
|
||||
struct _GstRegistryClass {
|
||||
|
@ -106,6 +104,8 @@ struct _GstRegistryClass {
|
|||
|
||||
/* signals */
|
||||
void (*plugin_added) (GstRegistry *registry, GstPlugin *plugin);
|
||||
|
||||
gpointer dummy[8];
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#define CLASS(obj) GST_SCHEDULER_CLASS (G_OBJECT_GET_CLASS (obj))
|
||||
|
||||
#include "gst_private.h"
|
||||
|
||||
#include "gstsystemclock.h"
|
||||
|
@ -88,10 +86,14 @@ gst_scheduler_init (GstScheduler *sched)
|
|||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -103,10 +105,14 @@ gst_scheduler_setup (GstScheduler *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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -120,12 +126,16 @@ gst_scheduler_reset (GstScheduler *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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -139,12 +149,16 @@ gst_scheduler_pad_connect (GstScheduler *sched, GstPad *srcpad, GstPad *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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,11 +173,15 @@ gst_scheduler_pad_disconnect (GstScheduler *sched, GstPad *srcpad, GstPad *sinkp
|
|||
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;
|
||||
}
|
||||
|
@ -178,6 +196,8 @@ gst_scheduler_pad_select (GstScheduler *sched, GList *padlist)
|
|||
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));
|
||||
|
||||
|
@ -202,8 +222,10 @@ gst_scheduler_add_element (GstScheduler *sched, GstElement *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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -216,14 +238,18 @@ gst_scheduler_add_element (GstScheduler *sched, GstElement *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);
|
||||
}
|
||||
|
@ -242,6 +268,8 @@ gst_scheduler_remove_element (GstScheduler *sched, GstElement *element)
|
|||
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);
|
||||
|
||||
|
@ -288,8 +316,10 @@ gst_scheduler_state_transition (GstScheduler *sched, GstElement *element, gint t
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -306,11 +336,15 @@ gst_scheduler_state_transition (GstScheduler *sched, GstElement *element, gint t
|
|||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -323,14 +357,18 @@ gst_scheduler_scheduling_change (GstScheduler *sched, GstElement *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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -343,14 +381,18 @@ gst_scheduler_add_scheduler (GstScheduler *sched, GstScheduler *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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -363,11 +405,15 @@ gst_scheduler_remove_scheduler (GstScheduler *sched, GstScheduler *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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -380,11 +426,15 @@ gst_scheduler_lock_element (GstScheduler *sched, GstElement *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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -397,11 +447,15 @@ gst_scheduler_unlock_element (GstScheduler *sched, GstElement *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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -414,11 +468,15 @@ gst_scheduler_error (GstScheduler *sched, GstElement *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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -434,11 +492,15 @@ gst_scheduler_yield (GstScheduler *sched, GstElement *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;
|
||||
}
|
||||
|
@ -591,10 +653,14 @@ GstClockReturn
|
|||
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);
|
||||
|
@ -616,10 +682,14 @@ gst_scheduler_clock_wait (GstScheduler *sched, GstElement *element, GstClock *cl
|
|||
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;
|
||||
}
|
||||
|
@ -634,10 +704,14 @@ gst_scheduler_iterate (GstScheduler *sched)
|
|||
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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -30,16 +30,12 @@
|
|||
|
||||
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 */
|
||||
|
@ -75,6 +71,8 @@ struct _GstScheduler {
|
|||
GList *clock_receivers;
|
||||
|
||||
GList *schedulers;
|
||||
|
||||
gpointer dummy[8];
|
||||
};
|
||||
|
||||
struct _GstSchedulerClass {
|
||||
|
@ -106,6 +104,8 @@ struct _GstSchedulerClass {
|
|||
/* signals */
|
||||
void (*object_sync) (GstScheduler *sched, GstClock *clock, GstObject *object,
|
||||
GstClockID id);
|
||||
|
||||
gpointer dummy[8];
|
||||
};
|
||||
|
||||
GType gst_scheduler_get_type (void);
|
||||
|
@ -144,16 +144,12 @@ void gst_scheduler_show (GstScheduler *sched);
|
|||
* 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;
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
|
||||
#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);
|
||||
|
|
|
@ -28,16 +28,12 @@
|
|||
|
||||
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;
|
||||
|
|
|
@ -43,16 +43,12 @@ typedef enum {
|
|||
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;
|
||||
|
@ -70,6 +66,8 @@ struct _GstThread {
|
|||
GCond *cond; /* .... used to control the thread */
|
||||
|
||||
gint transition; /* the current state transition */
|
||||
|
||||
gpointer dummy[8];
|
||||
};
|
||||
|
||||
struct _GstThreadClass {
|
||||
|
@ -77,6 +75,8 @@ struct _GstThreadClass {
|
|||
|
||||
/* signals */
|
||||
void (*shutdown) (GstThread *thread);
|
||||
|
||||
gpointer dummy[8];
|
||||
};
|
||||
|
||||
GType gst_thread_get_type (void);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
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;
|
||||
|
@ -54,27 +54,27 @@ struct _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];
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -32,16 +32,12 @@ G_BEGIN_DECLS
|
|||
|
||||
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;
|
||||
|
|
17
gst/gstxml.h
17
gst/gstxml.h
|
@ -31,16 +31,13 @@
|
|||
|
||||
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;
|
||||
|
|
1
gst/parse/.gitignore
vendored
1
gst/parse/.gitignore
vendored
|
@ -4,3 +4,4 @@ grammar.tab.c
|
|||
grammar.tab.h
|
||||
lex.yy.c
|
||||
parse.c
|
||||
lex._gst_parse_yy.c
|
||||
|
|
|
@ -469,7 +469,8 @@ gst_basic_scheduler_select_proxy (GstPad * pad, GstBuffer * buf)
|
|||
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);
|
||||
|
||||
|
@ -1250,7 +1251,8 @@ gst_basic_scheduler_pad_select (GstScheduler * sched, GList * padlist)
|
|||
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue