mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-06-18 05:50:41 +00:00
Added gobject to gtkobject bridge (gobject2gtk.[ch]) and configure-time support for selecting between glib and gtk (-...
Original commit message from CVS: Added gobject to gtkobject bridge (gobject2gtk.[ch]) and configure-time support for selecting between glib and gtk (--enable-glib2 to build with gobject).
This commit is contained in:
parent
704c3be21f
commit
f0c9187f69
|
@ -8,6 +8,8 @@
|
|||
#undef HAVE_LC_MESSAGES
|
||||
#undef HAVE_STPCPY
|
||||
|
||||
#undef USE_GLIB2
|
||||
|
||||
#undef PLUGINS_DIR
|
||||
#undef PLUGINS_SRCDIR
|
||||
#undef PLUGINS_USE_SRCDIR
|
||||
|
|
|
@ -169,11 +169,58 @@ dnl Check for essential libraries first:
|
|||
dnl ====================================
|
||||
|
||||
|
||||
PKG_CHECK_MODULES(GLIB, glib-2.0 gobject-2.0 gthread-2.0 gmodule-2.0, , AC_MSG_ERROR(Cannot find glib-2.0))
|
||||
CORE_LIBS="$GLIB_LIBS"
|
||||
CORE_CFLAGS="$GLIB_CFLAGS"
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_ARG_ENABLE(glib2,
|
||||
[ --enable-glib2 enable the use of glib-2.0 and GObject if available],
|
||||
[ case "${enableval}" in
|
||||
yes) USE_GLIB2=yes ;;
|
||||
no) USE_GLIB2=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-glib2) ;;
|
||||
esac],
|
||||
[:])
|
||||
HAVE_OBJECT_MODEL=no
|
||||
|
||||
if test x$USE_GLIB2 = xyes; then
|
||||
AC_MSG_CHECKING(glib-2.0)
|
||||
PKG_CHECK_MODULES(GLIB2, glib-2.0 gobject-2.0 gthread-2.0 gmodule-2.0,
|
||||
HAVE_GLIB2=yes,HAVE_GLIB2=yes)
|
||||
|
||||
if test x$HAVE_GLIB2 = xyes; then
|
||||
CORE_LIBS="$GLIB2_LIBS"
|
||||
CORE_CFLAGS="$GLIB2_CFLAGS"
|
||||
AC_SUBST(GLIB2_LIBS)
|
||||
AC_SUBST(GLIB2_CFLAGS)
|
||||
|
||||
AC_DEFINE(USE_GLIB2)
|
||||
|
||||
HAVE_OBJECT_MODEL=yes
|
||||
else
|
||||
USE_GLIB2=no
|
||||
|
||||
HAVE_OBJECT_MODEL=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USE_GLIB2, test "x$USE_GLIB2" = "xyes")
|
||||
AC_SUBST(USE_GLIB2)
|
||||
|
||||
if test x$HAVE_OBJECT_MODEL = xno; then
|
||||
dnl Check for glib
|
||||
AM_PATH_GLIB(1.2.0,,
|
||||
AC_MSG_ERROR(Cannot find glib: Is glib-config in path?),
|
||||
glib gmodule gthread)
|
||||
dnl Put the glib flags into $LIBS and $CFLAGS since we always use them
|
||||
CORE_LIBS="$GLIB_LIBS"
|
||||
CORE_CFLAGS="$GLIB_CFLAGS"
|
||||
|
||||
dnl Check for gtk
|
||||
AM_PATH_GTK(1.2.0,,
|
||||
AC_MSG_ERROR(Cannot find gtk: Is gtk-config in path?))
|
||||
dnl Put the gtk flags into $LIBS and $CFLAGS since we always use them
|
||||
CORE_LIBS="$CORE_LIBS $GTK_LIBS"
|
||||
CORE_CFLAGS="$CORE_CFLAGS $GTK_CFLAGS"
|
||||
|
||||
HAVE_OBJECT_MODEL=yes
|
||||
fi
|
||||
|
||||
|
||||
dnl Check for libxml
|
||||
|
|
|
@ -12,11 +12,19 @@ endif
|
|||
EXTRA_libgst_la_SOURCES = \
|
||||
gstcpuid_i386.s
|
||||
|
||||
if USE_GLIB2
|
||||
GST_OBJECT_MODEL_SRC = gstmarshal.c
|
||||
GST_OBJECT_MODEL_HDR = gstmarshal.h
|
||||
else
|
||||
GST_OBJECT_MODEL_SRC = gobject2gtk.c
|
||||
GST_OBJECT_MODEL_HDR = gobject2gtk.h
|
||||
endif
|
||||
|
||||
libgst_la_SOURCES = \
|
||||
cothreads.c \
|
||||
gst.c \
|
||||
$(GST_OBJECT_MODEL_SRC) \
|
||||
gstobject.c \
|
||||
gstmarshal.c \
|
||||
gstautoplug.c \
|
||||
gstbin.c \
|
||||
gstbuffer.c \
|
||||
|
@ -92,6 +100,8 @@ libgstincludedir = $(includedir)/gst
|
|||
libgstinclude_HEADERS = \
|
||||
cothreads.h \
|
||||
gst.h \
|
||||
$(GST_OBJECT_MODEL_HDR) \
|
||||
gstobject.h \
|
||||
gsttypes.h \
|
||||
gstautoplug.h \
|
||||
gstbin.h \
|
||||
|
@ -105,7 +115,6 @@ libgstinclude_HEADERS = \
|
|||
gstinfo.h \
|
||||
gstlog.h \
|
||||
gstmeta.h \
|
||||
gstobject.h \
|
||||
gstpad.h \
|
||||
gstpipeline.h \
|
||||
gstplugin.h \
|
||||
|
|
199
gst/gobject2gtk.c
Normal file
199
gst/gobject2gtk.c
Normal file
|
@ -0,0 +1,199 @@
|
|||
#include <stdio.h>
|
||||
#include "gobject2gtk.h"
|
||||
|
||||
|
||||
|
||||
// GObject dummy implementation
|
||||
static void
|
||||
g_object_set_arg(GtkObject *object, GtkArg *arg, guint id)
|
||||
{
|
||||
((GObjectClass *)object->klass)->set_property((GObject *)object,id,arg,NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
g_object_get_arg(GtkObject *object, GtkArg *arg, guint id)
|
||||
{
|
||||
((GObjectClass *)object->klass)->get_property((GObject *)object,id,arg,NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
g_object_base_class_init (GObjectClass *klass)
|
||||
{
|
||||
GtkObjectClass *gtkobject_class;
|
||||
|
||||
gtkobject_class = (GtkObjectClass*) klass;
|
||||
|
||||
gtkobject_class->set_arg = g_object_set_arg;
|
||||
gtkobject_class->get_arg = g_object_get_arg;
|
||||
}
|
||||
|
||||
GType
|
||||
g_object_get_type (void)
|
||||
{
|
||||
static GType object_type = 0;
|
||||
|
||||
if (!object_type) {
|
||||
static const GtkTypeInfo object_info = {
|
||||
"GObject",
|
||||
sizeof(GObject),
|
||||
sizeof(GObjectClass),
|
||||
(GtkClassInitFunc)NULL,
|
||||
(GtkObjectInitFunc)NULL,
|
||||
(GtkArgSetFunc)NULL,
|
||||
(GtkArgGetFunc)NULL,
|
||||
(GtkClassInitFunc)g_object_base_class_init,
|
||||
};
|
||||
object_type = gtk_type_unique(gtk_object_get_type(),&object_info);
|
||||
}
|
||||
return object_type;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
guint
|
||||
g_type_register_static (GtkType parent_type, gchar *type_name,
|
||||
const GTypeInfo *info, guint flags)
|
||||
{
|
||||
GtkTypeInfo gtkinfo = {
|
||||
type_name,
|
||||
info->instance_size,
|
||||
info->class_size,
|
||||
info->class_init,
|
||||
info->instance_init,
|
||||
NULL,
|
||||
NULL,
|
||||
info->base_init,
|
||||
};
|
||||
return gtk_type_unique(parent_type,>kinfo);
|
||||
}
|
||||
|
||||
|
||||
gpointer
|
||||
g_object_new(GtkType type,gpointer blah_varargs_stuff) {
|
||||
return gtk_type_new(type);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
g_object_class_install_property(GtkObjectClass *oclass,guint property_id,GParamSpec *pspec)
|
||||
{
|
||||
gchar *arg_fullname;
|
||||
|
||||
arg_fullname = g_strdup_printf("%s::%s",gtk_type_name(oclass->type),pspec->shortname);
|
||||
fprintf(stderr,"installing arg \"%s\" into class \"%s\"\n",arg_fullname,"");
|
||||
gtk_object_add_arg_type(arg_fullname,pspec->value_type,pspec->flags,property_id);
|
||||
g_free(pspec);
|
||||
}
|
||||
|
||||
GParamSpec *
|
||||
g_object_class_find_property(GtkObjectClass *class,const gchar *name)
|
||||
{
|
||||
GtkArgInfo *info;
|
||||
gchar *result;
|
||||
GParamSpec *spec;
|
||||
|
||||
fprintf(stderr,"class name is %s\n",gtk_type_name(class->type));
|
||||
|
||||
gtk_object_arg_get_info(class->type,name,&info);
|
||||
spec = g_new0(GParamSpec,1);
|
||||
|
||||
if (info) {
|
||||
spec->shortname = name;
|
||||
spec->value_type = info->type;
|
||||
spec->flags = info->arg_flags;
|
||||
} else {
|
||||
spec->value_type = GTK_TYPE_NONE;
|
||||
}
|
||||
|
||||
return spec;
|
||||
}
|
||||
|
||||
GParamSpec *
|
||||
g_param_spec_boolean(gchar *name,gchar *nick,gchar *blurb,gboolean def,gint flags) {
|
||||
GParamSpec *spec = g_new(GParamSpec,1);
|
||||
|
||||
spec->shortname = name;
|
||||
spec->value_type = GTK_TYPE_BOOL;
|
||||
spec->flags = flags;
|
||||
|
||||
return spec;
|
||||
}
|
||||
|
||||
GParamSpec *
|
||||
g_param_spec_enum(gchar *name,gchar *nick,gchar *blurb,GtkType e,guint def,gint flags) {
|
||||
GParamSpec *spec = g_new(GParamSpec,1);
|
||||
|
||||
spec->shortname = name;
|
||||
spec->value_type = e;
|
||||
spec->flags = flags;
|
||||
|
||||
return spec;
|
||||
}
|
||||
|
||||
GParamSpec *
|
||||
g_param_spec_int(gchar *name,gchar *nick,gchar *blurb,gint min,gint max,gint def,gint flags) {
|
||||
GParamSpec *spec = g_new(GParamSpec,1);
|
||||
|
||||
spec->shortname = name;
|
||||
spec->value_type = GTK_TYPE_INT;
|
||||
spec->flags = flags;
|
||||
|
||||
return spec;
|
||||
}
|
||||
|
||||
GParamSpec *
|
||||
g_param_spec_uint(gchar *name,gchar *nick,gchar *blurb,guint min,guint max,guint def,gint flags) {
|
||||
GParamSpec *spec = g_new(GParamSpec,1);
|
||||
|
||||
spec->shortname = name;
|
||||
spec->value_type = GTK_TYPE_UINT;
|
||||
spec->flags = flags;
|
||||
|
||||
return spec;
|
||||
}
|
||||
|
||||
GParamSpec *
|
||||
g_param_spec_long(gchar *name,gchar *nick,gchar *blurb,glong min,glong max,glong def,gint flags) {
|
||||
GParamSpec *spec = g_new(GParamSpec,1);
|
||||
|
||||
spec->shortname = name;
|
||||
spec->value_type = GTK_TYPE_LONG;
|
||||
spec->flags = flags;
|
||||
|
||||
return spec;
|
||||
}
|
||||
|
||||
GParamSpec *
|
||||
g_param_spec_ulong(gchar *name,gchar *nick,gchar *blurb,gulong min,gulong max,gulong def,gint flags) {
|
||||
GParamSpec *spec = g_new(GParamSpec,1);
|
||||
|
||||
spec->shortname = name;
|
||||
spec->value_type = GTK_TYPE_ULONG;
|
||||
spec->flags = flags;
|
||||
|
||||
return spec;
|
||||
}
|
||||
|
||||
GParamSpec *
|
||||
g_param_spec_pointer(gchar *name,gchar *nick,gchar *blurb,gint flags) {
|
||||
GParamSpec *spec = g_new(GParamSpec,1);
|
||||
|
||||
spec->shortname = name;
|
||||
spec->value_type = GTK_TYPE_POINTER;
|
||||
spec->flags = flags;
|
||||
|
||||
return spec;
|
||||
}
|
||||
|
||||
GParamSpec *
|
||||
g_param_spec_string(gchar *name,gchar *nick,gchar *blurb,gchar *def,gint flags) {
|
||||
GParamSpec *spec = g_new(GParamSpec,1);
|
||||
|
||||
spec->shortname = name;
|
||||
spec->value_type = GTK_TYPE_STRING;
|
||||
spec->flags = flags;
|
||||
|
||||
return spec;
|
||||
}
|
||||
|
286
gst/gobject2gtk.h
Normal file
286
gst/gobject2gtk.h
Normal file
|
@ -0,0 +1,286 @@
|
|||
#include <gtk/gtk.h>
|
||||
|
||||
#define G_MAXUINT UINT_MAX
|
||||
#define G_MAXULONG ULONG_MAX
|
||||
|
||||
#define g_object_ref(obj) gtk_object_ref((GtkObject *)(obj))
|
||||
#define g_object_unref(obj) gtk_object_unref((GtkObject *)(obj))
|
||||
|
||||
// the helper macros for type checking
|
||||
#define G_TYPE_CHECK_INSTANCE_CAST GTK_CHECK_CAST
|
||||
#define G_TYPE_CHECK_INSTANCE_TYPE GTK_CHECK_TYPE
|
||||
#define G_TYPE_CHECK_CLASS_CAST GTK_CHECK_CLASS_CAST
|
||||
#define G_TYPE_CHECK_CLASS_TYPE GTK_CHECK_CLASS_TYPE
|
||||
#define G_TYPE_FROM_CLASS(klass) (((GtkObjectClass *)(klass))->type)
|
||||
#define G_OBJECT_GET_CLASS(object) (GTK_OBJECT(object)->klass)
|
||||
|
||||
// types
|
||||
#define G_TYPE_NONE GTK_TYPE_NONE
|
||||
#define G_TYPE_CHAR GTK_TYPE_CHAR
|
||||
#define G_TYPE_UCHAR GTK_TYPE_UCHAR
|
||||
#define G_TYPE_BOOLEAN GTK_TYPE_BOOL
|
||||
#define G_TYPE_INT GTK_TYPE_INT
|
||||
#define G_TYPE_UINT GTK_TYPE_UINT
|
||||
#define G_TYPE_LONG GTK_TYPE_LONG
|
||||
#define G_TYPE_ULONG GTK_TYPE_ULONG
|
||||
#define G_TYPE_ENUM GTK_TYPE_ENUM
|
||||
#define G_TYPE_FLAGS GTK_TYPE_FLAGS
|
||||
#define G_TYPE_FLOAT GTK_TYPE_FLOAT
|
||||
#define G_TYPE_DOUBLE GTK_TYPE_DOUBLE
|
||||
#define G_TYPE_STRING GTK_TYPE_STRING
|
||||
#define G_TYPE_POINTER GTK_TYPE_POINTER
|
||||
#define G_TYPE_BOXED GTK_TYPE_BOXED
|
||||
#define G_TYPE_PARAM GTK_TYPE_PARAM
|
||||
|
||||
// marshallers
|
||||
#define g_cclosure_marshal_VOID__VOID gtk_marshal_NONE__NONE
|
||||
#define g_cclosure_marshal_VOID__BOOLEAN gtk_marshal_NONE__BOOL
|
||||
#define g_cclosure_marshal_VOID__CHAR gtk_marshal_NONE__CHAR
|
||||
#define g_cclosure_marshal_VOID__UCHAR gtk_marshal_NONE__UCHAR
|
||||
#define g_cclosure_marshal_VOID__INT gtk_marshal_NONE__INT
|
||||
#define g_cclosure_marshal_VOID__UINT gtk_marshal_NONE__UINT
|
||||
#define g_cclosure_marshal_VOID__LONG gtk_marshal_NONE__LONG
|
||||
#define g_cclosure_marshal_VOID__ULONG gtk_marshal_NONE__ULONG
|
||||
#define g_cclosure_marshal_VOID__ENUM gtk_marshal_NONE__ENUM
|
||||
#define g_cclosure_marshal_VOID__FLAGS gtk_marshal_NONE__FLAGS
|
||||
#define g_cclosure_marshal_VOID__FLOAT gtk_marshal_NONE__FLOAT
|
||||
#define g_cclosure_marshal_VOID__DOUBLE gtk_marshal_NONE__DOUBLE
|
||||
#define g_cclosure_marshal_VOID__STRING gtk_marshal_NONE__STRING
|
||||
#define g_cclosure_marshal_VOID__PARAM gtk_marshal_NONE__PARAM
|
||||
#define g_cclosure_marshal_VOID__BOXED gtk_marshal_NONE__BOXED
|
||||
#define g_cclosure_marshal_VOID__POINTER gtk_marshal_NONE__POINTER
|
||||
#define g_cclosure_marshal_VOID__OBJECT gtk_marshal_NONE__OBJECT
|
||||
#define g_cclosure_marshal_STRING__OBJECT_POINTER gtk_marshal_STRING__OBJECT_POINTER
|
||||
#define g_cclosure_marshal_VOID__UINT_POINTER gtk_marshal_NONE__UINT_POINTER
|
||||
|
||||
#define gst_marshal_VOID__OBJECT_POINTER gtk_marshal_NONE__POINTER_POINTER
|
||||
|
||||
|
||||
// args
|
||||
//#define set_property set_arg
|
||||
//#define get_property get_arg
|
||||
|
||||
#define g_object_get_property gtk_object_get
|
||||
#define g_object_set gtk_object_set
|
||||
|
||||
|
||||
// type system
|
||||
#define GType GtkType
|
||||
#define GClassInitFunc GtkClassInitFunc
|
||||
#define GBaseInitFunc GtkClassInitFunc
|
||||
#define GInstanceInitFunc GtkObjectInitFunc
|
||||
//#define g_type_register_static gtk_type_unique
|
||||
#define g_type_class_ref gtk_type_class
|
||||
#define GEnumValue GtkEnumValue
|
||||
#define g_enum_register_static gtk_type_register_enum
|
||||
|
||||
|
||||
// type registration
|
||||
typedef struct _GTypeInfo GTypeInfo;
|
||||
struct _GTypeInfo
|
||||
{
|
||||
/* interface types, classed types, instantiated types */
|
||||
guint16 class_size;
|
||||
|
||||
gpointer base_init;
|
||||
gpointer base_finalize;
|
||||
|
||||
/* classed types, instantiated types */
|
||||
gpointer class_init;
|
||||
gpointer class_finalize;
|
||||
gconstpointer class_data;
|
||||
|
||||
/* instantiated types */
|
||||
guint16 instance_size;
|
||||
guint16 n_preallocs;
|
||||
gpointer instance_init;
|
||||
|
||||
/* value handling */
|
||||
const gpointer value_table;
|
||||
};
|
||||
|
||||
#define G_TYPE_FLAG_ABSTRACT 0
|
||||
|
||||
guint g_type_register_static (GtkType parent_type, gchar *type_name,
|
||||
const GTypeInfo *info, guint flags);
|
||||
|
||||
|
||||
|
||||
// object creation
|
||||
gpointer g_object_new(GtkType type,gpointer blah_varargs_stuff);
|
||||
|
||||
|
||||
// signals
|
||||
#define G_SIGNAL_RUN_LAST GTK_RUN_LAST
|
||||
#define G_SIGNAL_RUN_FIRST GTK_RUN_FIRST
|
||||
|
||||
#define GCallback gpointer // FIXME?
|
||||
|
||||
#define \
|
||||
g_signal_newc(name,type,location,offset,null1,null2,marshal,ret,count,args...) \
|
||||
gtk_signal_new(name,location,type,offset,marshal,ret,count, ## args )
|
||||
|
||||
#define \
|
||||
g_signal_emit(object,signal,detail,args...) \
|
||||
gtk_signal_emit((GtkObject *)object,signal, ## args )
|
||||
|
||||
#define \
|
||||
g_signal_connectc(object,name,func,func_data,swap) \
|
||||
gtk_signal_connect((GtkObject *)object,name,func,func_data)
|
||||
|
||||
#define \
|
||||
g_signal_emit_by_name(object,name,data,self) \
|
||||
gtk_signal_emit_by_name ((GtkObject *)object,name,data,self)
|
||||
|
||||
|
||||
|
||||
|
||||
// arguments/parameters
|
||||
|
||||
// first define GValue and GParamSpec
|
||||
#define GValue GtkArg
|
||||
#define G_PARAM_READWRITE GTK_ARG_READWRITE
|
||||
#define G_PARAM_READABLE GTK_ARG_READABLE
|
||||
#define G_PARAM_WRITABLE GTK_ARG_WRITABLE
|
||||
#define G_OBJECT_WARN_INVALID_PROPERTY_ID(a,b,c)
|
||||
typedef struct _GParamSpec GParamSpec;
|
||||
struct _GParamSpec {
|
||||
gchar *shortname;
|
||||
gint value_type;
|
||||
gint flags;
|
||||
};
|
||||
|
||||
void g_object_class_install_property(GtkObjectClass *oclass,guint property_id,GParamSpec *pspec);
|
||||
GParamSpec *g_object_class_find_property(GtkObjectClass *class,const gchar *name);
|
||||
|
||||
#define G_IS_PARAM_SPEC_ENUM(pspec) (GTK_FUNDAMENTAL_TYPE(pspec->value_type) == GTK_TYPE_ENUM)
|
||||
|
||||
GParamSpec *g_param_spec_boolean(gchar *name,gchar *nick,gchar *blurb,gboolean def,gint flags);
|
||||
GParamSpec *g_param_spec_int(gchar *name,gchar *nick,gchar *blurb,gint min,gint max,gint def,gint flags);
|
||||
GParamSpec *g_param_spec_uint(gchar *name,gchar *nick,gchar *blurb,guint min,guint max,guint def,gint flags);
|
||||
GParamSpec *g_param_spec_long(gchar *name,gchar *nick,gchar *blurb,glong min,glong max,glong def,gint flags);
|
||||
GParamSpec *g_param_spec_ulong(gchar *name,gchar *nick,gchar *blurb,gulong min,gulong max,gulong def,gint flags);
|
||||
GParamSpec *g_param_spec_enum(gchar *name,gchar *nick,gchar *blurb,GtkType e,guint def,gint flags);
|
||||
GParamSpec *g_param_spec_pointer(gchar *name,gchar *nick,gchar *blurb,gint flags);
|
||||
GParamSpec *g_param_spec_string(gchar *name,gchar *nick,gchar *blurb,gchar *def,gint flags);
|
||||
|
||||
#define g_value_get_boolean(value) GTK_VALUE_BOOL(*value)
|
||||
#define g_value_set_boolean(value,data) (GTK_VALUE_BOOL(*value) = (data))
|
||||
#define g_value_get_enum(value) GTK_VALUE_INT(*value)
|
||||
#define g_value_set_enum(value,data) (GTK_VALUE_INT(*value) = (data))
|
||||
#define g_value_get_int(value) GTK_VALUE_INT(*value)
|
||||
#define g_value_set_int(value,data) (GTK_VALUE_INT(*value) = (data))
|
||||
#define g_value_get_uint(value) GTK_VALUE_UINT(*value)
|
||||
#define g_value_set_uint(value,data) (GTK_VALUE_UINT(*value) = (data))
|
||||
#define g_value_get_long(value) GTK_VALUE_LONG(*value)
|
||||
#define g_value_set_long(value,data) (GTK_VALUE_LONG(*value) = (data))
|
||||
#define g_value_get_ulong(value) GTK_VALUE_ULONG(*value)
|
||||
#define g_value_set_ulong(value,data) (GTK_VALUE_ULONG(*value) = (data))
|
||||
#define g_value_get_float(value) GTK_VALUE_FLOAT(*value)
|
||||
#define g_value_set_float(value,data) (GTK_VALUE_FLAT(*value) = (data))
|
||||
#define g_value_get_double(value) GTK_VALUE_DOUBLE(*value)
|
||||
#define g_value_set_double(value,data) (GTK_VALUE_DOUBLE(*value) = (data))
|
||||
#define g_value_get_string(value) GTK_VALUE_STRING(*value)
|
||||
#define g_value_set_string(value,data) (GTK_VALUE_STRING(*value) = (data))
|
||||
#define g_value_get_pointer(value) GTK_VALUE_POINTER(*value)
|
||||
#define g_value_set_pointer(value,data) (GTK_VALUE_POINTER(*value) = (data))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// the object itself
|
||||
//#define GObject GtkObject
|
||||
//#define GObjectClass GtkObjectClass
|
||||
#define G_OBJECT GTK_OBJECT
|
||||
#define G_OBJECT_CLASS GTK_OBJECT_CLASS
|
||||
|
||||
#define G_TYPE_OBJECT \
|
||||
(g_object_get_type())
|
||||
//#define G_OBJECT(obj)
|
||||
// (GTK_CHECK_CAST((obj),G_TYPE_OBJECT,GObject))
|
||||
//#define G_OBJECT_CLASS(klass)
|
||||
// (GTK_CHECK_CLASS_CAST((klass),G_TYPE_OBJECT,GObjectClass))
|
||||
#define G_IS_OBJECT(obj) \
|
||||
(GTK_CHECK_TYPE((obj),G_TYPE_OBJECT))
|
||||
#define G_IS_OBJECT_CLASS(obj) \
|
||||
(GTK_CHECK_CLASS_TYPE((klass),G_TYPE_OBJECT))
|
||||
|
||||
typedef struct _GObject GObject;
|
||||
typedef struct _GObjectClass GObjectClass;
|
||||
|
||||
struct _GObject {
|
||||
/***** THE FOLLOWING IS A VERBATIM COPY FROM GTKOBJECT *****/
|
||||
/* GtkTypeObject related fields: */
|
||||
GtkObjectClass *klass;
|
||||
|
||||
|
||||
/* 32 bits of flags. GtkObject only uses 4 of these bits and
|
||||
* GtkWidget uses the rest. This is done because structs are
|
||||
* aligned on 4 or 8 byte boundaries. If a new bitfield were
|
||||
* used in GtkWidget much space would be wasted.
|
||||
*/
|
||||
guint32 flags;
|
||||
|
||||
/* reference count.
|
||||
* refer to the file docs/refcounting.txt on this issue.
|
||||
*/
|
||||
guint ref_count;
|
||||
|
||||
/* A list of keyed data pointers, used for e.g. the list of signal
|
||||
* handlers or an object's user_data.
|
||||
*/
|
||||
GData *object_data;
|
||||
/***** END OF COPY FROM GTKOBJECT *****/
|
||||
};
|
||||
|
||||
struct _GObjectClass {
|
||||
/***** THE FOLLOWING IS A VERBATIM COPY FROM GTKOBJECT *****/
|
||||
/* GtkTypeClass fields: */
|
||||
GtkType type;
|
||||
|
||||
|
||||
/* The signals this object class handles. "signals" is an
|
||||
* array of signal ID's.
|
||||
*/
|
||||
guint *signals;
|
||||
|
||||
/* The number of signals listed in "signals".
|
||||
*/
|
||||
guint nsignals;
|
||||
|
||||
/* The number of arguments per class.
|
||||
*/
|
||||
guint n_args;
|
||||
GSList *construct_args;
|
||||
|
||||
/* Non overridable class methods to set and get per class arguments */
|
||||
void (*set_arg) (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
void (*get_arg) (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
|
||||
/* The functions that will end an objects life time. In one way ore
|
||||
* another all three of them are defined for all objects. If an
|
||||
* object class overrides one of the methods in order to perform class
|
||||
* specific destruction then it must still invoke its superclass'
|
||||
* implementation of the method after it is finished with its
|
||||
* own cleanup. (See the destroy function for GtkWidget for
|
||||
* an example of how to do this).
|
||||
*/
|
||||
void (* shutdown) (GObject *object);
|
||||
void (* destroy) (GObject *object);
|
||||
|
||||
void (* finalize) (GObject *object);
|
||||
/***** END OF COPY FROM GTKOBJECT *****/
|
||||
|
||||
void (*set_property) (GObject *object, guint prop_id,
|
||||
const GValue *value, GParamSpec *pspec);
|
||||
void (*get_property) (GObject *object, guint prop_id,
|
||||
GValue *value, GParamSpec *pspec);
|
||||
};
|
||||
|
||||
GType g_object_get_type (void);
|
||||
|
37
gst/gst.c
37
gst/gst.c
|
@ -57,25 +57,28 @@ void
|
|||
gst_init (int *argc, char **argv[])
|
||||
{
|
||||
GstTrace *gst_trace;
|
||||
// gchar *display;
|
||||
|
||||
GST_INFO (GST_CAT_GST_INIT, "Initializing GStreamer Core Library");
|
||||
|
||||
if (!g_thread_supported ()) g_thread_init (NULL);
|
||||
|
||||
#ifdef USE_GLIB2
|
||||
g_type_init(0);
|
||||
|
||||
/* Only initialise gtk fully if we have an X display.
|
||||
* FIXME: this fails if the display is specified differently, eg, by
|
||||
* a command line parameter. This is okay though, since this is only
|
||||
* a quick hack and should be replaced when we move to gobject.*/
|
||||
/*
|
||||
display = g_getenv("DISPLAY");
|
||||
if (display == NULL) {
|
||||
gtk_type_init ();
|
||||
} else {
|
||||
gtk_init (argc,argv);
|
||||
}*/
|
||||
#else
|
||||
{
|
||||
gchar *display;
|
||||
/* Only initialise gtk fully if we have an X display.
|
||||
* FIXME: this fails if the display is specified differently, eg, by
|
||||
* a command line parameter. This is okay though, since this is only
|
||||
* a quick hack and should be replaced when we move to gobject.*/
|
||||
display = g_getenv("DISPLAY");
|
||||
if (display == NULL) {
|
||||
gtk_type_init ();
|
||||
} else {
|
||||
gtk_init (argc,argv);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!gst_init_check (argc,argv)) {
|
||||
exit (0);
|
||||
|
@ -272,7 +275,9 @@ gst_init_check (int *argc,
|
|||
void
|
||||
gst_main (void)
|
||||
{
|
||||
// gtk_main ();
|
||||
#ifndef USE_GLIB2
|
||||
gtk_main ();
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -283,5 +288,7 @@ gst_main (void)
|
|||
void
|
||||
gst_main_quit (void)
|
||||
{
|
||||
// gtk_main_quit ();
|
||||
#ifndef USE_GLIB2
|
||||
gtk_main_quit ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include <gst/gstcpu.h>
|
||||
#include <gst/gstclock.h>
|
||||
#include <gst/gstelement.h>
|
||||
#include <gst/gstextratypes.h>
|
||||
#include <gst/gstbin.h>
|
||||
#include <gst/gstpipeline.h>
|
||||
#include <gst/gstthread.h>
|
||||
|
@ -52,6 +51,7 @@
|
|||
#include <gst/gstscheduler.h>
|
||||
|
||||
#include <gst/gstparse.h>
|
||||
#include <gst/gstextratypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
|
||||
#include "gst_private.h"
|
||||
|
||||
#include "gstextratypes.h"
|
||||
#include <gst/gstobject.h>
|
||||
#include <gst/gstextratypes.h>
|
||||
|
||||
GType
|
||||
gst_extra_get_filename_type (void)
|
||||
|
|
|
@ -24,17 +24,16 @@
|
|||
#ifndef __GST_EXTRA_TYPES_H__
|
||||
#define __GST_EXTRA_TYPES_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GST_TYPE_FILENAME (gst_extra_get_filename_type())
|
||||
|
||||
GType gst_extra_get_filename_type(void);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
|
|
@ -53,9 +53,9 @@ static guint gst_signal_object_signals[SO_LAST_SIGNAL] = { 0 };
|
|||
static void gst_object_class_init (GstObjectClass *klass);
|
||||
static void gst_object_init (GstObject *object);
|
||||
|
||||
static void gst_object_real_destroy (GObject *gtk_object);
|
||||
static void gst_object_shutdown (GObject *gtk_object);
|
||||
static void gst_object_finalize (GObject *gtk_object);
|
||||
static void gst_object_real_destroy (GObject *object);
|
||||
static void gst_object_shutdown (GObject *object);
|
||||
static void gst_object_finalize (GObject *object);
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
static guint gst_object_signals[LAST_SIGNAL] = { 0 };
|
||||
|
@ -220,7 +220,7 @@ gst_object_shutdown (GObject *object)
|
|||
{
|
||||
GST_DEBUG (GST_CAT_REFCOUNTING, "shutdown '%s'\n",GST_OBJECT_NAME(object));
|
||||
GST_FLAG_SET (GST_OBJECT (object), GST_DESTROYED);
|
||||
parent_class->shutdown (G_OBJECT (object));
|
||||
parent_class->shutdown (object);
|
||||
}
|
||||
|
||||
/* finilize is called when the object has to free its resources */
|
||||
|
@ -237,20 +237,20 @@ gst_object_real_destroy (GObject *g_object)
|
|||
|
||||
/* finilize is called when the object has to free its resources */
|
||||
static void
|
||||
gst_object_finalize (GObject *gtk_object)
|
||||
gst_object_finalize (GObject *object)
|
||||
{
|
||||
GstObject *object;
|
||||
GstObject *gstobject;
|
||||
|
||||
object = GST_OBJECT (gtk_object);
|
||||
gstobject = GST_OBJECT (object);
|
||||
|
||||
GST_DEBUG (GST_CAT_REFCOUNTING, "finalize '%s'\n",GST_OBJECT_NAME(object));
|
||||
|
||||
if (object->name != NULL)
|
||||
g_free (object->name);
|
||||
if (gstobject->name != NULL)
|
||||
g_free (gstobject->name);
|
||||
|
||||
g_mutex_free (object->lock);
|
||||
g_mutex_free (gstobject->lock);
|
||||
|
||||
parent_class->finalize (gtk_object);
|
||||
parent_class->finalize (object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,18 +24,23 @@
|
|||
#ifndef __GST_OBJECT_H__
|
||||
#define __GST_OBJECT_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gst/gsttrace.h>
|
||||
#include <parser.h>
|
||||
|
||||
#include <gst/gstmarshal.h>
|
||||
|
||||
#include <gst/gsttypes.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef USE_GLIB2
|
||||
#include <glib-object.h>
|
||||
#include <gst/gstmarshal.h>
|
||||
#else
|
||||
#include <gobject2gtk.h>
|
||||
#endif
|
||||
|
||||
#include <gst/gsttrace.h>
|
||||
#include <parser.h>
|
||||
|
||||
#include <gst/gsttypes.h>
|
||||
|
||||
#ifdef HAVE_ATOMIC_H
|
||||
#include <asm/atomic.h>
|
||||
#endif
|
||||
|
@ -143,12 +148,12 @@ gboolean gst_object_check_uniqueness (GList *list, const gchar *name);
|
|||
xmlNodePtr gst_object_save_thyself (GstObject *object, xmlNodePtr parent);
|
||||
|
||||
/* refcounting */
|
||||
GstObject * gst_object_ref (GstObject *object);
|
||||
void gst_object_unref (GstObject *object);
|
||||
void gst_object_sink (GstObject *object);
|
||||
GstObject * gst_object_ref (GstObject *object);
|
||||
void gst_object_unref (GstObject *object);
|
||||
void gst_object_sink (GstObject *object);
|
||||
|
||||
/* destroying an object */
|
||||
void gst_object_destroy (GstObject *object);
|
||||
void gst_object_destroy (GstObject *object);
|
||||
|
||||
/* printing out the 'path' of the object */
|
||||
gchar * gst_object_get_path_string (GstObject *object);
|
||||
|
|
|
@ -199,9 +199,8 @@ if (GST_IS_GHOST_PAD(srcpad)) GST_DEBUG(0,"it's a ghost pad\n");
|
|||
argname = arg;
|
||||
pos[0] = '\0';
|
||||
argval = pos+1;
|
||||
DEBUG("attempting to set argument '%s' to '%s' on element '%s'\n",
|
||||
GST_DEBUG(0,"attempting to set argument '%s' to '%s' on element '%s'\n",
|
||||
argname,argval,GST_ELEMENT_NAME(previous));
|
||||
//gtk_object_set(G_OBJECT(previous),argname,argval,NULL);
|
||||
gst_util_set_object_arg (G_OBJECT(previous), argname, argval);
|
||||
g_free(argname);
|
||||
|
||||
|
|
|
@ -137,14 +137,6 @@ gst_queue_class_init (GstQueueClass *klass)
|
|||
|
||||
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
||||
|
||||
/*
|
||||
gtk_object_add_arg_type ("GstQueue::leaky", GST_TYPE_QUEUE_LEAKY,
|
||||
GTK_ARG_READWRITE, ARG_LEAKY);
|
||||
gtk_object_add_arg_type ("GstQueue::level", G_TYPE_INT,
|
||||
GTK_ARG_READABLE, ARG_LEVEL);
|
||||
gtk_object_add_arg_type ("GstQueue::max_level", G_TYPE_INT,
|
||||
GTK_ARG_READWRITE, ARG_MAX_LEVEL);
|
||||
*/
|
||||
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_LEAKY,
|
||||
g_param_spec_enum("leaky","Leaky","Where the queue leaks, if at all.",
|
||||
GST_TYPE_QUEUE_LEAKY,GST_QUEUE_NO_LEAK,G_PARAM_READWRITE));
|
||||
|
|
|
@ -61,7 +61,7 @@ enum {
|
|||
static void gst_thread_class_init (GstThreadClass *klass);
|
||||
static void gst_thread_init (GstThread *thread);
|
||||
|
||||
static void gst_thread_real_destroy (GObject *gtk_object);
|
||||
static void gst_thread_real_destroy (GObject *object);
|
||||
|
||||
static void gst_thread_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
|
||||
static void gst_thread_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
|
||||
|
@ -114,10 +114,6 @@ gst_thread_class_init (GstThreadClass *klass)
|
|||
|
||||
parent_class = g_type_class_ref (GST_TYPE_BIN);
|
||||
|
||||
/*
|
||||
gtk_object_add_arg_type ("GstThread::create_thread", G_TYPE_BOOL,
|
||||
GTK_ARG_READWRITE, ARG_CREATE_THREAD);
|
||||
*/
|
||||
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_CREATE_THREAD,
|
||||
g_param_spec_boolean("create_thread", "Create Thread", "Whether to create a thread.",
|
||||
TRUE,G_PARAM_READWRITE));
|
||||
|
@ -161,9 +157,9 @@ gst_thread_init (GstThread *thread)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_thread_real_destroy (GObject *gtk_object)
|
||||
gst_thread_real_destroy (GObject *object)
|
||||
{
|
||||
GstThread *thread = GST_THREAD (gtk_object);
|
||||
GstThread *thread = GST_THREAD (object);
|
||||
|
||||
GST_DEBUG (GST_CAT_REFCOUNTING,"destroy()\n");
|
||||
|
||||
|
@ -172,7 +168,7 @@ gst_thread_real_destroy (GObject *gtk_object)
|
|||
|
||||
// FIXME!
|
||||
// if (G_OBJECT_CLASS (parent_class)->destroy)
|
||||
// G_OBJECT_CLASS (parent_class)->destroy (gtk_object);
|
||||
// G_OBJECT_CLASS (parent_class)->destroy (object);
|
||||
|
||||
gst_object_destroy (GST_OBJECT (GST_ELEMENT_SCHED (thread)));
|
||||
gst_object_unref (GST_OBJECT (GST_ELEMENT_SCHED (thread)));
|
||||
|
|
|
@ -23,10 +23,11 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "gstextratypes.h"
|
||||
|
||||
#include "gst_private.h"
|
||||
#include "gstutils.h"
|
||||
|
||||
#include "gstextratypes.h"
|
||||
|
||||
/**
|
||||
* gst_util_get_int_arg:
|
||||
* @object: the object to query
|
||||
|
@ -37,11 +38,10 @@
|
|||
* Returns: the property of the object
|
||||
*/
|
||||
gint
|
||||
gst_util_get_int_arg (GObject *object, const gchar *argname)
|
||||
gst_util_get_int_arg (GObject *object,gchar *argname)
|
||||
{
|
||||
GValue value;
|
||||
|
||||
g_value_init (&value, G_TYPE_INT);
|
||||
g_object_get_property(G_OBJECT(object),argname,&value);
|
||||
return g_value_get_int(&value);
|
||||
}
|
||||
|
@ -56,11 +56,10 @@ gst_util_get_int_arg (GObject *object, const gchar *argname)
|
|||
* Returns: the property of the object
|
||||
*/
|
||||
gint
|
||||
gst_util_get_bool_arg (GObject *object, const gchar *argname)
|
||||
gst_util_get_bool_arg (GObject *object,gchar *argname)
|
||||
{
|
||||
GValue value;
|
||||
|
||||
g_value_init (&value, G_TYPE_BOOLEAN);
|
||||
g_object_get_property(G_OBJECT(object),argname,&value);
|
||||
return g_value_get_boolean(&value);
|
||||
}
|
||||
|
@ -75,11 +74,10 @@ gst_util_get_bool_arg (GObject *object, const gchar *argname)
|
|||
* Returns: the property of the object
|
||||
*/
|
||||
glong
|
||||
gst_util_get_long_arg (GObject *object, const gchar *argname)
|
||||
gst_util_get_long_arg (GObject *object,gchar *argname)
|
||||
{
|
||||
GValue value;
|
||||
|
||||
g_value_init (&value, G_TYPE_LONG);
|
||||
g_object_get_property(G_OBJECT(object),argname,&value);
|
||||
return g_value_get_long(&value);
|
||||
}
|
||||
|
@ -94,11 +92,10 @@ gst_util_get_long_arg (GObject *object, const gchar *argname)
|
|||
* Returns: the property of the object
|
||||
*/
|
||||
gfloat
|
||||
gst_util_get_float_arg (GObject *object, const gchar *argname)
|
||||
gst_util_get_float_arg (GObject *object,gchar *argname)
|
||||
{
|
||||
GValue value;
|
||||
|
||||
g_value_init (&value, G_TYPE_FLOAT);
|
||||
g_object_get_property(G_OBJECT(object),argname,&value);
|
||||
return g_value_get_float(&value);
|
||||
}
|
||||
|
@ -113,11 +110,10 @@ gst_util_get_float_arg (GObject *object, const gchar *argname)
|
|||
* Returns: the property of the object
|
||||
*/
|
||||
gdouble
|
||||
gst_util_get_double_arg (GObject *object, const gchar *argname)
|
||||
gst_util_get_double_arg (GObject *object,gchar *argname)
|
||||
{
|
||||
GValue value;
|
||||
|
||||
g_value_init (&value, G_TYPE_DOUBLE);
|
||||
g_object_get_property(G_OBJECT(object),argname,&value);
|
||||
return g_value_get_double(&value);
|
||||
}
|
||||
|
@ -131,12 +127,11 @@ gst_util_get_double_arg (GObject *object, const gchar *argname)
|
|||
*
|
||||
* Returns: the property of the object
|
||||
*/
|
||||
const gchar*
|
||||
gst_util_get_string_arg (GObject *object, const gchar *argname)
|
||||
gchar*
|
||||
gst_util_get_string_arg (GObject *object,gchar *argname)
|
||||
{
|
||||
GValue value;
|
||||
|
||||
g_value_init (&value, G_TYPE_STRING);
|
||||
g_object_get_property(G_OBJECT(object),argname,&value);
|
||||
return g_value_get_string(&value);
|
||||
}
|
||||
|
@ -151,11 +146,10 @@ gst_util_get_string_arg (GObject *object, const gchar *argname)
|
|||
* Returns: the property of the object
|
||||
*/
|
||||
gpointer
|
||||
gst_util_get_pointer_arg (GObject *object, const gchar *argname)
|
||||
gst_util_get_pointer_arg (GObject *object,gchar *argname)
|
||||
{
|
||||
GValue value;
|
||||
|
||||
g_value_init (&value, G_TYPE_POINTER);
|
||||
g_object_get_property(G_OBJECT(object),argname,&value);
|
||||
return g_value_get_pointer(&value);
|
||||
}
|
||||
|
@ -171,7 +165,7 @@ gst_util_get_pointer_arg (GObject *object, const gchar *argname)
|
|||
*/
|
||||
/* COMMENTED OUT BECAUSE WE HAVE NO MORE gtk.h
|
||||
GtkWidget*
|
||||
gst_util_get_widget_property (GObject *object, const gchar *argname)
|
||||
gst_util_get_widget_property (GObject *object,gchar *argname)
|
||||
{
|
||||
GtkArg arg;
|
||||
|
||||
|
@ -219,13 +213,16 @@ gst_util_dump_mem (guchar *mem, guint size)
|
|||
* sets the argument with it.
|
||||
*/
|
||||
void
|
||||
gst_util_set_object_arg (GObject *object, const gchar *name, const gchar *value)
|
||||
gst_util_set_object_arg (GObject *object, gchar *name, gchar *value)
|
||||
{
|
||||
if (name && value) {
|
||||
GParamSpec *paramspec;
|
||||
|
||||
paramspec = g_object_class_find_property(G_OBJECT_GET_CLASS(object),name);
|
||||
|
||||
GST_DEBUG(0,"paramspec->flags is %d, paramspec->value_type is %d\n",
|
||||
paramspec->flags,paramspec->value_type);
|
||||
|
||||
if (paramspec->flags & G_PARAM_WRITABLE) {
|
||||
switch (paramspec->value_type) {
|
||||
case G_TYPE_STRING:
|
||||
|
|
|
@ -25,21 +25,22 @@
|
|||
#define __GST_UTILS_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <gst/gstobject.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
gint gst_util_get_int_arg (GObject *object, const gchar *argname);
|
||||
gboolean gst_util_get_bool_arg (GObject *object, const gchar *argname);
|
||||
glong gst_util_get_long_arg (GObject *object, const gchar *argname);
|
||||
gfloat gst_util_get_float_arg (GObject *object, const gchar *argname);
|
||||
gdouble gst_util_get_double_arg (GObject *object, const gchar *argname);
|
||||
const gchar* gst_util_get_string_arg (GObject *object, const gchar *argname);
|
||||
gpointer gst_util_get_pointer_arg (GObject *object, const gchar *argname);
|
||||
gint gst_util_get_int_arg (GObject *object, gchar *argname);
|
||||
gboolean gst_util_get_bool_arg (GObject *object, gchar *argname);
|
||||
glong gst_util_get_long_arg (GObject *object, gchar *argname);
|
||||
gfloat gst_util_get_float_arg (GObject *object, gchar *argname);
|
||||
gdouble gst_util_get_double_arg (GObject *object, gchar *argname);
|
||||
gchar* gst_util_get_string_arg (GObject *object, gchar *argname);
|
||||
gpointer gst_util_get_pointer_arg (GObject *object, gchar *argname);
|
||||
//GtkWidget* gst_util_get_widget_property (GObject *object, gchar *argname);
|
||||
|
||||
void gst_util_set_object_arg (GObject *object, const gchar *name, const gchar *value);
|
||||
void gst_util_set_object_arg (GObject *object, gchar *name, gchar *value);
|
||||
|
||||
void gst_util_dump_mem (guchar *mem, guint size);
|
||||
|
||||
|
|
|
@ -137,14 +137,6 @@ gst_queue_class_init (GstQueueClass *klass)
|
|||
|
||||
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
||||
|
||||
/*
|
||||
gtk_object_add_arg_type ("GstQueue::leaky", GST_TYPE_QUEUE_LEAKY,
|
||||
GTK_ARG_READWRITE, ARG_LEAKY);
|
||||
gtk_object_add_arg_type ("GstQueue::level", G_TYPE_INT,
|
||||
GTK_ARG_READABLE, ARG_LEVEL);
|
||||
gtk_object_add_arg_type ("GstQueue::max_level", G_TYPE_INT,
|
||||
GTK_ARG_READWRITE, ARG_MAX_LEVEL);
|
||||
*/
|
||||
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_LEAKY,
|
||||
g_param_spec_enum("leaky","Leaky","Where the queue leaks, if at all.",
|
||||
GST_TYPE_QUEUE_LEAKY,GST_QUEUE_NO_LEAK,G_PARAM_READWRITE));
|
||||
|
|
Loading…
Reference in a new issue