{
GstMiniObject mini_object;
- GList *buffers;
+ GQueue *buffers;
};
-struct _GstBufferListClass
-{
- GstMiniObjectClass mini_object_class;
-};
-
/**
* GstBufferListIterator:
*
}
static void
-gst_buffer_list_class_init (GstBufferListClass * list_class)
+_gst_buffer_list_free (GstBufferList * list)
+{
+ GList *tmp;
+
+ g_return_if_fail (list != NULL);
+
+ GST_LOG ("free %p", list);
+
- tmp = list->buffers;
++ tmp = list->buffers->head;
+ while (tmp) {
+ if (tmp->data != GROUP_START && tmp->data != STOLEN) {
+ gst_buffer_unref (GST_BUFFER_CAST (tmp->data));
+ }
+ tmp = tmp->next;
+ }
- g_list_free (list->buffers);
++ g_queue_free (list->buffers);
+
+ g_slice_free1 (GST_MINI_OBJECT_SIZE (list), list);
+}
+
+static void
+gst_buffer_list_init (GstBufferList * list, gsize size)
{
- list_class->mini_object_class.copy =
- (GstMiniObjectCopyFunction) _gst_buffer_list_copy;
- list_class->mini_object_class.finalize =
- (GstMiniObjectFinalizeFunction) gst_buffer_list_finalize;
+ gst_mini_object_init (GST_MINI_OBJECT_CAST (list), _gst_buffer_list_type,
+ size);
+
+ list->mini_object.copy = (GstMiniObjectCopyFunction) _gst_buffer_list_copy;
+ list->mini_object.free = (GstMiniObjectFreeFunction) _gst_buffer_list_free;
++
++ list->buffers = g_queue_new ();
++
++ GST_LOG ("init %p", list);
}
/**
gst_element_class_get_pad_template
gst_element_class_get_pad_template_list
gst_element_class_install_std_props
- gst_element_class_set_details
- gst_element_class_set_details_simple
- gst_element_class_set_documentation_uri
- gst_element_class_set_icon_name
+ gst_element_class_set_metadata
gst_element_continue_state
gst_element_create_all_pads
- gst_element_factory_can_sink_caps
- gst_element_factory_can_src_caps
gst_element_factory_can_sink_all_caps
gst_element_factory_can_sink_any_caps
+ gst_element_factory_can_sink_caps
gst_element_factory_can_src_all_caps
gst_element_factory_can_src_any_caps
+ gst_element_factory_can_src_caps
gst_element_factory_create
gst_element_factory_find
- gst_element_factory_get_author
- gst_element_factory_get_description
- gst_element_factory_get_documentation_uri
gst_element_factory_get_element_type
- gst_element_factory_get_icon_name
- gst_element_factory_get_klass
- gst_element_factory_get_longname
+ gst_element_factory_get_metadata
gst_element_factory_get_num_pad_templates
gst_element_factory_get_static_pad_templates
gst_element_factory_get_type