Commit 77a56957 authored by Stefan Kost's avatar Stefan Kost

Fix #337365 (g_type_class_ref <-> g_type_class_peek_parent)

Original commit message from CVS:
* gst/gstbuffer.c: (gst_subbuffer_class_init):
* gst/gstclock.c: (gst_clock_class_init):
* gst/gstelement.c: (gst_element_class_init):
* gst/gstindex.c: (gst_index_class_init):
* gst/gstindexfactory.c: (gst_index_factory_class_init):
* gst/gstobject.c: (gst_object_class_init),
(gst_signal_object_class_init):
* gst/gstpad.c: (gst_pad_class_init):
* gst/gstpadtemplate.c: (gst_pad_template_class_init):
* gst/gstpluginfeature.c: (gst_plugin_feature_class_init):
* gst/gstregistry.c: (gst_registry_class_init):
* gst/gstsystemclock.c: (gst_system_clock_class_init):
* gst/gsttask.c: (gst_task_class_init):
* gst/gstxml.c: (gst_xml_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_loop):
* libs/gst/controller/gstcontroller.c:
(_gst_controller_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init):
* plugins/indexers/gstfileindex.c: (gst_file_index_class_init):
* plugins/indexers/gstmemindex.c: (gst_mem_index_class_init):
* tests/old/examples/plugins/example.c: (gst_example_class_init):
* tests/old/testsuite/threads/signals.c: (gst_test_class_init):
Fix #337365 (g_type_class_ref <-> g_type_class_peek_parent)
parent ed95eff8
2006-04-08 Stefan Kost <ensonic@users.sf.net>
* gst/gstbuffer.c: (gst_subbuffer_class_init):
* gst/gstclock.c: (gst_clock_class_init):
* gst/gstelement.c: (gst_element_class_init):
* gst/gstindex.c: (gst_index_class_init):
* gst/gstindexfactory.c: (gst_index_factory_class_init):
* gst/gstobject.c: (gst_object_class_init),
(gst_signal_object_class_init):
* gst/gstpad.c: (gst_pad_class_init):
* gst/gstpadtemplate.c: (gst_pad_template_class_init):
* gst/gstpluginfeature.c: (gst_plugin_feature_class_init):
* gst/gstregistry.c: (gst_registry_class_init):
* gst/gstsystemclock.c: (gst_system_clock_class_init):
* gst/gsttask.c: (gst_task_class_init):
* gst/gstxml.c: (gst_xml_class_init):
* libs/gst/base/gstbasesink.c: (gst_base_sink_class_init):
* libs/gst/base/gstbasesrc.c: (gst_base_src_class_init),
(gst_base_src_loop):
* libs/gst/controller/gstcontroller.c:
(_gst_controller_class_init):
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init):
* plugins/indexers/gstfileindex.c: (gst_file_index_class_init):
* plugins/indexers/gstmemindex.c: (gst_mem_index_class_init):
* tests/old/examples/plugins/example.c: (gst_example_class_init):
* tests/old/testsuite/threads/signals.c: (gst_test_class_init):
Fix #337365 (g_type_class_ref <-> g_type_class_peek_parent)
2006-04-08 Tim-Philipp Müller <tim at centricular dot net>
* gst/gstpad.c: (gst_pad_link):
......
......@@ -438,7 +438,7 @@ gst_subbuffer_class_init (gpointer g_class, gpointer class_data)
{
GstBufferClass *buffer_class = GST_BUFFER_CLASS (g_class);
sub_parent_class = g_type_class_ref (GST_TYPE_BUFFER);
sub_parent_class = g_type_class_peek_parent (g_class);
buffer_class->mini_object_class.finalize =
(GstMiniObjectFinalizeFunction) gst_subbuffer_finalize;
......
......@@ -563,7 +563,7 @@ gst_clock_class_init (GstClockClass * klass)
gobject_class = (GObjectClass *) klass;
gstobject_class = (GstObjectClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (klass);
if (!g_thread_supported ())
g_thread_init (NULL);
......
......@@ -171,7 +171,7 @@ gst_element_class_init (GstElementClass * klass)
gobject_class = (GObjectClass *) klass;
gstobject_class = (GstObjectClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (klass);
/**
* GstElement::pad-added:
......
......@@ -157,7 +157,7 @@ gst_index_class_init (GstIndexClass * klass)
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (klass);
/**
* GstIndex::entry-added
......
......@@ -81,7 +81,7 @@ gst_index_factory_class_init (GstIndexFactoryClass * klass)
gstobject_class = (GstObjectClass *) klass;
gstpluginfeature_class = (GstPluginFeatureClass *) klass;
factory_parent_class = g_type_class_ref (GST_TYPE_PLUGIN_FEATURE);
factory_parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_index_factory_finalize);
}
......
......@@ -217,7 +217,7 @@ gst_object_class_init (GstObjectClass * klass)
gobject_class = (GObjectClass *) klass;
parent_class = g_type_class_ref (G_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (klass);
#ifndef GST_DISABLE_TRACE
_gst_object_trace = gst_alloc_trace_register (g_type_name (GST_TYPE_OBJECT));
......@@ -1202,6 +1202,7 @@ gst_object_get_path_string (GstObject * object)
return path;
}
struct _GstSignalObject
{
GObject object;
......@@ -1251,7 +1252,7 @@ gst_signal_object_class_init (GstSignalObjectClass * klass)
gobject_class = (GObjectClass *) klass;
parent_class = g_type_class_ref (G_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (klass);
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
gst_signal_object_signals[SO_OBJECT_LOADED] =
......
......@@ -243,7 +243,7 @@ gst_pad_class_init (GstPadClass * klass)
gobject_class = (GObjectClass *) klass;
gstobject_class = (GstObjectClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (klass);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_pad_dispose);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_pad_finalize);
......@@ -759,14 +759,14 @@ failure:
/**
* gst_pad_activate_push:
* @pad: the #GstPad to activate or deactivate.
* @active: whether or not the pad should be active.
* @active: whether the pad should be active or not.
*
* Activates or deactivates the given pad in push mode via dispatching to the
* pad's activatepushfunc. For use from within pad activation functions only.
*
* If you don't know what this is, you probably don't want to call it.
*
* Returns: TRUE if the operation was successfull.
* Returns: %TRUE if the operation was successful.
*
* MT safe.
*/
......
......@@ -153,7 +153,7 @@ gst_pad_template_class_init (GstPadTemplateClass * klass)
gobject_class = (GObjectClass *) klass;
gstobject_class = (GstObjectClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (klass);
/**
* GstPadTemplate::pad-created:
......
......@@ -51,7 +51,7 @@ static GstObjectClass *parent_class = NULL;
static void
gst_plugin_feature_class_init (GstPluginFeatureClass * klass)
{
parent_class = g_type_class_ref (GST_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (klass);
G_OBJECT_CLASS (klass)->finalize =
GST_DEBUG_FUNCPTR (gst_plugin_feature_finalize);
......
......@@ -138,7 +138,7 @@ gst_registry_class_init (GstRegistryClass * klass)
gobject_class = (GObjectClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (klass);
gst_registry_signals[PLUGIN_ADDED] =
g_signal_new ("plugin-added", G_TYPE_FROM_CLASS (klass),
......
......@@ -104,7 +104,7 @@ gst_system_clock_class_init (GstSystemClockClass * klass)
gstobject_class = (GstObjectClass *) klass;
gstclock_class = (GstClockClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_CLOCK);
parent_class = g_type_class_peek_parent (klass);
gobject_class->dispose = gst_system_clock_dispose;
......
......@@ -110,7 +110,7 @@ gst_task_class_init (GstTaskClass * klass)
gobject_class = (GObjectClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_task_finalize);
......
......@@ -87,7 +87,7 @@ gst_xml_class_init (GstXMLClass * klass)
gobject_class = (GObjectClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (klass);
/* FIXME G_TYPE_POINTER should be GType of xmlNodePtr
* (ensonic) can't be fixed, as libxml does not use GObject (unfortunately)
......
......@@ -300,7 +300,7 @@ gst_base_sink_class_init (GstBaseSinkClass * klass)
g_type_class_add_private (klass, sizeof (GstBaseSinkPrivate));
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_base_sink_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_base_sink_set_property);
......
......@@ -297,7 +297,7 @@ gst_base_src_class_init (GstBaseSrcClass * klass)
g_type_class_add_private (klass, sizeof (GstBaseSrcPrivate));
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_base_src_finalize);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_base_src_set_property);
......@@ -1383,8 +1383,11 @@ gst_base_src_loop (GstPad * pad)
if (G_UNLIKELY (ret != GST_FLOW_OK)) {
if (ret == GST_FLOW_UNEXPECTED)
goto eos;
else
else {
GST_INFO_OBJECT (src, "pausing after gst_base_src_get_range() = %d",
ret);
goto pause;
}
}
if (G_UNLIKELY (buf == NULL))
goto error;
......@@ -1434,8 +1437,10 @@ gst_base_src_loop (GstPad * pad)
}
ret = gst_pad_push (pad, buf);
if (G_UNLIKELY (ret != GST_FLOW_OK))
if (G_UNLIKELY (ret != GST_FLOW_OK)) {
GST_INFO_OBJECT (src, "pausing after gst_pad_push() = %d", ret);
goto pause;
}
if (eos)
goto eos;
......
......@@ -1101,7 +1101,7 @@ _gst_controller_class_init (GstControllerClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_ref (G_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (klass);
gobject_class->finalize = _gst_controller_finalize;
......
......@@ -147,7 +147,7 @@ gst_fd_src_class_init (GstFdSrcClass * klass)
gstbasesrc_class = (GstBaseSrcClass *) klass;
gstpush_src_class = (GstPushSrcClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_PUSH_SRC);
parent_class = g_type_class_peek_parent (klass);
gobject_class->set_property = gst_fd_src_set_property;
gobject_class->get_property = gst_fd_src_get_property;
......
......@@ -179,7 +179,7 @@ gst_file_index_class_init (GstFileIndexClass * klass)
gobject_class = (GObjectClass *) klass;
gstindex_class = (GstIndexClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_INDEX);
parent_class = g_type_class_peek_parent (klass);
gobject_class->dispose = gst_file_index_dispose;
gobject_class->set_property = gst_file_index_set_property;
......
......@@ -155,7 +155,7 @@ gst_mem_index_class_init (GstMemIndexClass * klass)
gobject_class = (GObjectClass *) klass;
gstindex_class = (GstIndexClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_INDEX);
parent_class = g_type_class_peek_parent (klass);
gobject_class->dispose = gst_mem_index_dispose;
......
......@@ -148,7 +148,7 @@ gst_example_class_init (GstExampleClass * klass)
gstelement_class = (GstElementClass *) klass;
/* The parent class is needed for class method overrides. */
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
parent_class = g_type_class_peek_parent (klass);
/* Here we add an argument to the object. This argument is an integer,
* and can be both read and written.
......
......@@ -90,7 +90,7 @@ gst_test_class_init (GstTestClass * klass)
gobject_class = (GObjectClass *) klass;
gstobject_class = (GstObjectClass *) klass;
parent_class = g_type_class_ref (GST_TYPE_OBJECT);
parent_class = g_type_class_peek_parent (klass);
if (!g_thread_supported ())
g_thread_init (NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment