mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 02:30:35 +00:00
Change G_TYPE_POINTER to the appropriate type in g_signal_new()
Original commit message from CVS: Change G_TYPE_POINTER to the appropriate type in g_signal_new()
This commit is contained in:
parent
2fa95b4fac
commit
cd429e460c
18 changed files with 76 additions and 20 deletions
|
@ -119,7 +119,7 @@ gst_buffer_store_class_init (gpointer g_class, gpointer class_data)
|
|||
gst_buffer_store_signals[BUFFER_ADDED] = g_signal_new ("buffer-added",
|
||||
G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstBufferStoreClass, buffer_added), continue_accu, NULL,
|
||||
gst_marshal_BOOLEAN__POINTER, G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
gst_marshal_BOOLEAN__POINTER, G_TYPE_BOOLEAN, 1, GST_TYPE_BUFFER);
|
||||
|
||||
store_class->cleared = gst_buffer_store_cleared_func;
|
||||
store_class->buffer_added = gst_buffer_store_add_buffer_func;
|
||||
|
|
|
@ -173,8 +173,8 @@ gst_fakesink_class_init (GstFakeSinkClass *klass)
|
|||
gst_fakesink_signals[SIGNAL_HANDOFF] =
|
||||
g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstFakeSinkClass, handoff), NULL, NULL,
|
||||
g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1,
|
||||
G_TYPE_POINTER);
|
||||
gst_marshal_VOID__POINTER_OBJECT, G_TYPE_NONE, 1,
|
||||
GST_TYPE_BUFFER, GST_TYPE_PAD);
|
||||
|
||||
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_fakesink_set_property);
|
||||
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_fakesink_get_property);
|
||||
|
|
|
@ -269,8 +269,8 @@ gst_fakesrc_class_init (GstFakeSrcClass *klass)
|
|||
gst_fakesrc_signals[SIGNAL_HANDOFF] =
|
||||
g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstFakeSrcClass, handoff), NULL, NULL,
|
||||
g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1,
|
||||
G_TYPE_POINTER);
|
||||
gst_marshal_VOID__POINTER_OBJECT, G_TYPE_NONE, 2,
|
||||
GST_TYPE_BUFFER, GST_TYPE_PAD);
|
||||
|
||||
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_fakesrc_set_property);
|
||||
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_fakesrc_get_property);
|
||||
|
|
|
@ -145,8 +145,8 @@ gst_identity_class_init (GstIdentityClass *klass)
|
|||
gst_identity_signals[SIGNAL_HANDOFF] =
|
||||
g_signal_new ("handoff", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstIdentityClass, handoff), NULL, NULL,
|
||||
g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1,
|
||||
G_TYPE_POINTER);
|
||||
gst_marshal_VOID__POINTER, G_TYPE_NONE, 1,
|
||||
GST_TYPE_BUFFER);
|
||||
|
||||
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_identity_set_property);
|
||||
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_identity_get_property);
|
||||
|
|
|
@ -135,11 +135,11 @@ gst_bin_class_init (GstBinClass * klass)
|
|||
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_marshal_VOID__POINTER, G_TYPE_NONE, 1, GST_TYPE_ELEMENT);
|
||||
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);
|
||||
gst_marshal_VOID__POINTER, G_TYPE_NONE, 1, GST_TYPE_ELEMENT);
|
||||
gst_bin_signals[ITERATE] =
|
||||
g_signal_new ("iterate", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstBinClass, iterate),
|
||||
|
|
|
@ -88,6 +88,20 @@ gst_index_resolver_get_type (void)
|
|||
return index_resolver_type;
|
||||
}
|
||||
|
||||
GType
|
||||
gst_index_entry_get_type (void)
|
||||
{
|
||||
static GType index_entry_type = 0;
|
||||
|
||||
if (!index_entry_type) {
|
||||
index_entry_type = g_boxed_type_register_static ("GstIndexEntry",
|
||||
(GBoxedCopyFunc) gst_index_entry_copy,
|
||||
(GBoxedFreeFunc) gst_index_entry_free);
|
||||
}
|
||||
return index_entry_type;
|
||||
}
|
||||
|
||||
|
||||
GType
|
||||
gst_index_get_type (void) {
|
||||
static GType index_type = 0;
|
||||
|
@ -381,6 +395,18 @@ gst_index_set_resolver (GstIndex *index,
|
|||
index->method = GST_INDEX_RESOLVER_CUSTOM;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_index_entry_copy:
|
||||
* @entry: the entry to copy
|
||||
*
|
||||
* Copies an entry and returns the result.
|
||||
*/
|
||||
GstIndexEntry *
|
||||
gst_index_entry_copy (GstIndexEntry *entry)
|
||||
{
|
||||
return g_memdup(entry, sizeof(*entry));
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_index_entry_free:
|
||||
* @entry: the entry to free
|
||||
|
|
|
@ -229,6 +229,7 @@ GstIndexEntry* gst_index_get_assoc_entry_full (GstIndex *index, gint id,
|
|||
gpointer user_data);
|
||||
|
||||
/* working with index entries */
|
||||
GstIndexEntry * gst_index_entry_copy (GstIndexEntry *entry);
|
||||
void gst_index_entry_free (GstIndexEntry *entry);
|
||||
gboolean gst_index_entry_assoc_map (GstIndexEntry *entry,
|
||||
GstFormat format, gint64 *value);
|
||||
|
|
|
@ -3,6 +3,7 @@ VOID:BOOLEAN
|
|||
VOID:INT
|
||||
VOID:STRING
|
||||
VOID:POINTER
|
||||
VOID:POINTER,OBJECT
|
||||
VOID:OBJECT
|
||||
VOID:OBJECT,PARAM
|
||||
VOID:OBJECT,POINTER
|
||||
|
|
|
@ -139,6 +139,7 @@ gst_object_class_init (GstObjectClass *klass)
|
|||
g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1,
|
||||
G_TYPE_OBJECT);
|
||||
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
|
||||
/* FIXME This should be the GType of xmlNodePtr instead of G_TYPE_POINTER */
|
||||
gst_object_signals[OBJECT_SAVED] =
|
||||
g_signal_new ("object_saved", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstObjectClass, object_saved), NULL, NULL,
|
||||
|
|
|
@ -170,17 +170,17 @@ gst_real_pad_class_init (GstRealPadClass *klass)
|
|||
g_signal_new ("caps_nego_failed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstRealPadClass, caps_nego_failed), NULL, NULL,
|
||||
gst_marshal_VOID__POINTER, G_TYPE_NONE, 1,
|
||||
G_TYPE_POINTER);
|
||||
GST_TYPE_CAPS);
|
||||
gst_real_pad_signals[REAL_LINKED] =
|
||||
g_signal_new ("linked", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstRealPadClass, linked), NULL, NULL,
|
||||
gst_marshal_VOID__POINTER, G_TYPE_NONE, 1,
|
||||
G_TYPE_POINTER);
|
||||
GST_TYPE_PAD);
|
||||
gst_real_pad_signals[REAL_UNLINKED] =
|
||||
g_signal_new ("unlinked", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstRealPadClass, unlinked), NULL, NULL,
|
||||
gst_marshal_VOID__POINTER, G_TYPE_NONE, 1,
|
||||
G_TYPE_POINTER);
|
||||
GST_TYPE_PAD);
|
||||
|
||||
/* gtk_object_add_arg_type ("GstRealPad::active", G_TYPE_BOOLEAN, */
|
||||
/* GTK_ARG_READWRITE, REAL_ARG_ACTIVE); */
|
||||
|
|
|
@ -63,6 +63,19 @@ static void gst_plugin_desc_copy (GstPluginDesc *dest,
|
|||
static GstPlugin * gst_plugin_register_func (GstPlugin *plugin,
|
||||
GModule *module,
|
||||
GstPluginDesc *desc);
|
||||
|
||||
GType
|
||||
gst_plugin_get_type (void)
|
||||
{
|
||||
static GType plugin_type;
|
||||
|
||||
if (plugin_type == 0) {
|
||||
plugin_type = g_boxed_type_register_static ("GstPlugin", NULL, g_free);
|
||||
}
|
||||
|
||||
return plugin_type;
|
||||
}
|
||||
|
||||
GQuark
|
||||
gst_plugin_error_quark (void)
|
||||
{
|
||||
|
@ -248,6 +261,16 @@ gst_plugin_load_file (const gchar *filename, GError **error)
|
|||
}
|
||||
GST_LOG ("Plugin %p for file \"%s\" prepared, calling entry function...", plugin, filename);
|
||||
|
||||
if (g_module_symbol (module, "plugin_init", &ptr)) {
|
||||
g_print ("plugin %p from file \"%s\" exports a symbol named plugin_init\n",
|
||||
plugin, plugin->filename);
|
||||
g_set_error (error,
|
||||
GST_PLUGIN_ERROR,
|
||||
GST_PLUGIN_ERROR_NAME_MISMATCH,
|
||||
"plugin \"%s\" exports a symbol named plugin_init",
|
||||
desc->name);
|
||||
}
|
||||
|
||||
if (gst_plugin_register_func (plugin, module, desc)) {
|
||||
GST_INFO ("plugin \"%s\" loaded", plugin->filename);
|
||||
return plugin;
|
||||
|
|
|
@ -128,10 +128,13 @@ _gst_plugin_static_init__ ##init (void) \
|
|||
|
||||
#define GST_LICENSE_UNKNOWN "unknown"
|
||||
|
||||
|
||||
/* function for filters */
|
||||
typedef gboolean (*GstPluginFilter) (GstPlugin *plugin,
|
||||
gpointer user_data);
|
||||
|
||||
#define GST_TYPE_PLUGIN (gst_plugin_get_type())
|
||||
GType gst_plugin_get_type (void);
|
||||
void _gst_plugin_initialize (void);
|
||||
void _gst_plugin_register_static (GstPluginDesc *desc);
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ gst_registry_class_init (GstRegistryClass *klass)
|
|||
g_signal_new ("plugin_added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstRegistryClass, plugin_added), NULL, NULL,
|
||||
gst_marshal_VOID__POINTER, G_TYPE_NONE, 1,
|
||||
G_TYPE_POINTER);
|
||||
GST_TYPE_PLUGIN);
|
||||
|
||||
gobject_class->dispose = NULL;
|
||||
}
|
||||
|
|
|
@ -71,6 +71,7 @@ gst_xml_class_init (GstXMLClass *klass)
|
|||
|
||||
parent_class = g_type_class_ref (GST_TYPE_OBJECT);
|
||||
|
||||
/* FIXME G_TYPE_POINTER should be GType of xmlNodePtr */
|
||||
gst_xml_signals[OBJECT_LOADED] =
|
||||
g_signal_new ("object_loaded", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstXMLClass, object_loaded), NULL, NULL,
|
||||
|
|
|
@ -119,7 +119,7 @@ gst_buffer_store_class_init (gpointer g_class, gpointer class_data)
|
|||
gst_buffer_store_signals[BUFFER_ADDED] = g_signal_new ("buffer-added",
|
||||
G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstBufferStoreClass, buffer_added), continue_accu, NULL,
|
||||
gst_marshal_BOOLEAN__POINTER, G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
|
||||
gst_marshal_BOOLEAN__POINTER, G_TYPE_BOOLEAN, 1, GST_TYPE_BUFFER);
|
||||
|
||||
store_class->cleared = gst_buffer_store_cleared_func;
|
||||
store_class->buffer_added = gst_buffer_store_add_buffer_func;
|
||||
|
|
|
@ -173,8 +173,8 @@ gst_fakesink_class_init (GstFakeSinkClass *klass)
|
|||
gst_fakesink_signals[SIGNAL_HANDOFF] =
|
||||
g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstFakeSinkClass, handoff), NULL, NULL,
|
||||
g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1,
|
||||
G_TYPE_POINTER);
|
||||
gst_marshal_VOID__POINTER_OBJECT, G_TYPE_NONE, 1,
|
||||
GST_TYPE_BUFFER, GST_TYPE_PAD);
|
||||
|
||||
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_fakesink_set_property);
|
||||
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_fakesink_get_property);
|
||||
|
|
|
@ -269,8 +269,8 @@ gst_fakesrc_class_init (GstFakeSrcClass *klass)
|
|||
gst_fakesrc_signals[SIGNAL_HANDOFF] =
|
||||
g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstFakeSrcClass, handoff), NULL, NULL,
|
||||
g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1,
|
||||
G_TYPE_POINTER);
|
||||
gst_marshal_VOID__POINTER_OBJECT, G_TYPE_NONE, 2,
|
||||
GST_TYPE_BUFFER, GST_TYPE_PAD);
|
||||
|
||||
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_fakesrc_set_property);
|
||||
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_fakesrc_get_property);
|
||||
|
|
|
@ -145,8 +145,8 @@ gst_identity_class_init (GstIdentityClass *klass)
|
|||
gst_identity_signals[SIGNAL_HANDOFF] =
|
||||
g_signal_new ("handoff", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstIdentityClass, handoff), NULL, NULL,
|
||||
g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1,
|
||||
G_TYPE_POINTER);
|
||||
gst_marshal_VOID__POINTER, G_TYPE_NONE, 1,
|
||||
GST_TYPE_BUFFER);
|
||||
|
||||
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_identity_set_property);
|
||||
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_identity_get_property);
|
||||
|
|
Loading…
Reference in a new issue