mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
Properly chain up finalize functions to the parent class.
Original commit message from CVS: * gst/gstbuffer.c: (gst_buffer_class_init), (gst_buffer_finalize): * gst/gstevent.c: (gst_event_class_init), (gst_event_finalize): * gst/gstmessage.c: (gst_message_class_init), (gst_message_finalize): * gst/gstquery.c: (gst_query_class_init), (gst_query_finalize): * plugins/elements/gstfilesrc.c: (gst_mmap_buffer_class_init), (gst_mmap_buffer_finalize): Properly chain up finalize functions to the parent class.
This commit is contained in:
parent
fdd893cd17
commit
109511b55b
6 changed files with 41 additions and 0 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2008-02-12 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* gst/gstbuffer.c: (gst_buffer_class_init), (gst_buffer_finalize):
|
||||
* gst/gstevent.c: (gst_event_class_init), (gst_event_finalize):
|
||||
* gst/gstmessage.c: (gst_message_class_init),
|
||||
(gst_message_finalize):
|
||||
* gst/gstquery.c: (gst_query_class_init), (gst_query_finalize):
|
||||
* plugins/elements/gstfilesrc.c: (gst_mmap_buffer_class_init),
|
||||
(gst_mmap_buffer_finalize):
|
||||
Properly chain up finalize functions to the parent class.
|
||||
|
||||
2008-02-11 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
Patch by: Siavash Safi <siavash dot safi at gmail dot com>
|
||||
|
|
|
@ -129,6 +129,8 @@ static GType gst_subbuffer_get_type (void);
|
|||
static GType _gst_subbuffer_type = 0;
|
||||
static GType _gst_buffer_type = 0;
|
||||
|
||||
static GstMiniObjectClass *parent_class = NULL;
|
||||
|
||||
void
|
||||
_gst_buffer_initialize (void)
|
||||
{
|
||||
|
@ -167,6 +169,8 @@ gst_buffer_class_init (gpointer g_class, gpointer class_data)
|
|||
{
|
||||
GstBufferClass *buffer_class = GST_BUFFER_CLASS (g_class);
|
||||
|
||||
parent_class = g_type_class_peek_parent (g_class);
|
||||
|
||||
buffer_class->mini_object_class.copy =
|
||||
(GstMiniObjectCopyFunction) _gst_buffer_copy;
|
||||
buffer_class->mini_object_class.finalize =
|
||||
|
@ -185,6 +189,8 @@ gst_buffer_finalize (GstBuffer * buffer)
|
|||
g_free (buffer->malloc_data);
|
||||
|
||||
gst_caps_replace (&GST_BUFFER_CAPS (buffer), NULL);
|
||||
|
||||
GST_MINI_OBJECT_CLASS (parent_class)->finalize (GST_MINI_OBJECT (buffer));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -89,6 +89,8 @@ static void gst_event_class_init (gpointer g_class, gpointer class_data);
|
|||
static void gst_event_finalize (GstEvent * event);
|
||||
static GstEvent *_gst_event_copy (GstEvent * event);
|
||||
|
||||
static GstMiniObjectClass *parent_class = NULL;
|
||||
|
||||
void
|
||||
_gst_event_initialize (void)
|
||||
{
|
||||
|
@ -219,6 +221,8 @@ gst_event_class_init (gpointer g_class, gpointer class_data)
|
|||
{
|
||||
GstEventClass *event_class = GST_EVENT_CLASS (g_class);
|
||||
|
||||
parent_class = g_type_class_peek_parent (g_class);
|
||||
|
||||
event_class->mini_object_class.copy =
|
||||
(GstMiniObjectCopyFunction) _gst_event_copy;
|
||||
event_class->mini_object_class.finalize =
|
||||
|
@ -252,6 +256,8 @@ gst_event_finalize (GstEvent * event)
|
|||
gst_structure_set_parent_refcount (event->structure, NULL);
|
||||
gst_structure_free (event->structure);
|
||||
}
|
||||
|
||||
GST_MINI_OBJECT_CLASS (parent_class)->finalize (GST_MINI_OBJECT (event));
|
||||
}
|
||||
|
||||
static GstEvent *
|
||||
|
|
|
@ -64,6 +64,8 @@ static void gst_message_class_init (gpointer g_class, gpointer class_data);
|
|||
static void gst_message_finalize (GstMessage * message);
|
||||
static GstMessage *_gst_message_copy (GstMessage * message);
|
||||
|
||||
static GstMiniObjectClass *parent_class = NULL;
|
||||
|
||||
void
|
||||
_gst_message_initialize (void)
|
||||
{
|
||||
|
@ -185,6 +187,8 @@ gst_message_class_init (gpointer g_class, gpointer class_data)
|
|||
{
|
||||
GstMessageClass *message_class = GST_MESSAGE_CLASS (g_class);
|
||||
|
||||
parent_class = g_type_class_peek_parent (g_class);
|
||||
|
||||
message_class->mini_object_class.copy =
|
||||
(GstMiniObjectCopyFunction) _gst_message_copy;
|
||||
message_class->mini_object_class.finalize =
|
||||
|
@ -222,6 +226,8 @@ gst_message_finalize (GstMessage * message)
|
|||
gst_structure_set_parent_refcount (message->structure, NULL);
|
||||
gst_structure_free (message->structure);
|
||||
}
|
||||
|
||||
GST_MINI_OBJECT_CLASS (parent_class)->finalize (GST_MINI_OBJECT (message));
|
||||
}
|
||||
|
||||
static GstMessage *
|
||||
|
|
|
@ -79,6 +79,8 @@ static GHashTable *_nick_to_query = NULL;
|
|||
static GHashTable *_query_type_to_nick = NULL;
|
||||
static guint32 _n_values = 1; /* we start from 1 because 0 reserved for NONE */
|
||||
|
||||
static GstMiniObjectClass *parent_class = NULL;
|
||||
|
||||
static GstQueryTypeDefinition standard_definitions[] = {
|
||||
{GST_QUERY_POSITION, "position", "Current position", 0},
|
||||
{GST_QUERY_DURATION, "duration", "Total duration", 0},
|
||||
|
@ -188,6 +190,8 @@ gst_query_class_init (gpointer g_class, gpointer class_data)
|
|||
{
|
||||
GstQueryClass *query_class = GST_QUERY_CLASS (g_class);
|
||||
|
||||
parent_class = g_type_class_peek_parent (g_class);
|
||||
|
||||
query_class->mini_object_class.copy =
|
||||
(GstMiniObjectCopyFunction) _gst_query_copy;
|
||||
query_class->mini_object_class.finalize =
|
||||
|
@ -204,6 +208,8 @@ gst_query_finalize (GstQuery * query)
|
|||
gst_structure_set_parent_refcount (query->structure, NULL);
|
||||
gst_structure_free (query->structure);
|
||||
}
|
||||
|
||||
GST_MINI_OBJECT_CLASS (parent_class)->finalize (GST_MINI_OBJECT (query));
|
||||
}
|
||||
|
||||
static GstQuery *
|
||||
|
|
|
@ -442,6 +442,7 @@ struct _GstMmapBufferClass
|
|||
static void gst_mmap_buffer_init (GTypeInstance * instance, gpointer g_class);
|
||||
static void gst_mmap_buffer_class_init (gpointer g_class, gpointer class_data);
|
||||
static void gst_mmap_buffer_finalize (GstMmapBuffer * mmap_buffer);
|
||||
static GstBufferClass *mmap_buffer_parent_class = NULL;
|
||||
|
||||
static GType
|
||||
gst_mmap_buffer_get_type (void)
|
||||
|
@ -473,6 +474,8 @@ gst_mmap_buffer_class_init (gpointer g_class, gpointer class_data)
|
|||
{
|
||||
GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class);
|
||||
|
||||
mmap_buffer_parent_class = g_type_class_peek_parent (g_class);
|
||||
|
||||
mini_object_class->finalize =
|
||||
(GstMiniObjectFinalizeFunction) gst_mmap_buffer_finalize;
|
||||
}
|
||||
|
@ -521,6 +524,9 @@ gst_mmap_buffer_finalize (GstMmapBuffer * mmap_buffer)
|
|||
* guint64 as hex */
|
||||
GST_LOG ("unmapped region %08lx+%08lx at %p",
|
||||
(gulong) offset, (gulong) size, data);
|
||||
|
||||
GST_MINI_OBJECT_CLASS (mmap_buffer_parent_class)->
|
||||
finalize (GST_MINI_OBJECT (mmap_buffer));
|
||||
}
|
||||
|
||||
static GstBuffer *
|
||||
|
|
Loading…
Reference in a new issue