+2008-02-19 Jan Schmidt <Jan.Schmidt@sun.com>
+
+ * libs/gst/check/gstcheck.c: (gst_check_drop_buffers),
+ (gst_check_element_push_buffer_list):
+ * libs/gst/check/gstcheck.h:
+ Make the declaration in the header for
+ gst_check_element_push_buffer_list match the implementation.
+
+ Fix up spelling, grammar and wording of the documentation in a few
+ places, and add the Since keyword to new API functions.
+ Use g_list_delete_link instead of g_list_remove in
+ gst_check_drop_buffers, since it's immeasurably more efficient.
+
+ * tests/check/elements/fakesrc.c: (GST_START_TEST):
+ Use new gst_check_drop_buffers function where appropriate.
+
+ * win32/common/libgstbase.def:
+ * win32/common/libgstreamer.def:
+ Add new symbols gst_collect_pads_take_buffer,
+ gst_collect_pads_read_buffer, gst_index_set_resolver_full to the
+ exports
+
+ Changelog surgery to add API keyword to new gst_check API.
+
2008-02-19 Sebastian Dröge <slomo@circular-chaos.org>
* gst/parse/lex._gst_parse_yy.pre.c: (yy_get_next_buffer),
Add more functions for unit testing: gst_check_drop_buffers,
gst_check_caps_equal, gst_check_element_push_buffer_list,
gst_check_element_push_buffer
+ API: gst_check_drop_buffers
+ API: gst_check_caps_equal
+ API: gst_check_element_push_buffer_list
+ API: gst_check_element_push_buffer
2008-02-01 Julien Moutte <julien@fluendo.com>
/**
* gst_check_drop_buffers:
*
- * unref all buffers created by the check element that are in the @buffers GList
+ * Unref and remove all buffers that are in the global @buffers GList,
+ * emptying the list.
*
+ * Since: 0.10.18
*/
void
gst_check_drop_buffers ()
while (g_list_length (buffers)) {
temp_buffer = GST_BUFFER (buffers->data);
- buffers = g_list_remove (buffers, temp_buffer);
gst_buffer_unref (temp_buffer);
+ buffers = g_list_delete_link (buffers, buffers);
}
}
* @caps1: first caps to compare
* @caps2: second caps to compare
*
- * Check if the caps are equal, just a wrapper
- * around gst_caps_is_equal with some more logging
+ * Compare two caps with gst_caps_is_equal and fail unless they are
+ * equal.
*
+ * Since: 0.10.18
*/
void
gst_check_caps_equal (GstCaps * caps1, GstCaps * caps2)
* @last_flow_return: the last buffer push needs to give this GstFlowReturn
*
* Create an @element with the factory with the name and push the buffers in
- * @buffer_in to this element. The element should create the buffers equal to the
- * buffers in @buffer_out. We only check the caps, size and the data of the buffers.
- * This function unrefs the buffers in the GList's.
- * with @last_failing you can create a test that the last buffer should not be accepted.
- * This can be handy if you need to setup the element with some previous buffers and than
- * check for failing.
- *
+ * @buffer_in to this element. The element should create the buffers equal to
+ * the buffers in @buffer_out. We only check the caps, size and the data of the
+ * buffers. This function unrefs the buffers in the two lists.
+ * The last_flow_return parameter indicates the expected flow return value from
+ * pushing the final buffer in the list.
+ * This can be used to set up a test which pushes some buffers and then an
+ * invalid buffer, when the final buffer is expected to fail, for example.
+ *
+ * Since: 0.10.18
*/
void
gst_check_element_push_buffer_list (const gchar * element_name,
buffer_in = g_list_remove (buffer_in, next_buffer);
if (g_list_length (buffer_in) == 0) {
fail_unless (gst_pad_push (src_pad, next_buffer) == last_flow_return,
- "we expext something else from the last buffer");
+ "we expect something else from the last buffer");
} else {
fail_unless (gst_pad_push (src_pad, next_buffer) == GST_FLOW_OK,
"Failed to push buffer in");
* @buffer_in to this element. The element should create one buffer
* and this will be compared with @buffer_out. We only check the caps
* and the data of the buffers. This function unrefs the buffers.
+ *
+ * Since: 0.10.18
*/
void
gst_check_element_push_buffer (const gchar * element_name,
void gst_check_drop_buffers ();
void gst_check_caps_equal (GstCaps * caps1, GstCaps * caps2);
void gst_check_element_push_buffer_list (const gchar * element_name,
- GList * buffer_in, GList * buffer_out, gboolean last_failing);
+ GList * buffer_in, GList * buffer_out, GstFlowReturn last_flow_return);
void gst_check_element_push_buffer (const gchar * element_name,
GstBuffer * buffer_in, GstBuffer * buffer_out);
GstPad *gst_check_setup_sink_pad (GstElement * element,
}
fail_unless (g_list_length (buffers) == 3);
- g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
- g_list_free (buffers);
+ gst_check_drop_buffers ();
fail_unless (gst_element_set_state (src,
GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
fail_unless (GST_BUFFER_SIZE (buf) == 0);
l = l->next;
}
- g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
- g_list_free (buffers);
+ gst_check_drop_buffers ();
fail_unless (gst_element_set_state (src,
GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
fail_unless (GST_BUFFER_SIZE (buf) == 8192);
l = l->next;
}
- g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
- g_list_free (buffers);
+ gst_check_drop_buffers ();
fail_unless (gst_element_set_state (src,
GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
fail_if (GST_BUFFER_SIZE (buf) < 4096);
l = l->next;
}
- g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL);
- g_list_free (buffers);
+ gst_check_drop_buffers ();
fail_unless (gst_element_set_state (src,
GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
gst_collect_pads_peek
gst_collect_pads_pop
gst_collect_pads_read
+ gst_collect_pads_read_buffer
gst_collect_pads_remove_pad
gst_collect_pads_set_flushing
gst_collect_pads_set_function
gst_collect_pads_start
gst_collect_pads_stop
+ gst_collect_pads_take_buffer
gst_data_queue_drop_head
gst_data_queue_flush
gst_data_queue_get_level
gst_index_set_filter_full
gst_index_set_group
gst_index_set_resolver
+ gst_index_set_resolver_full
gst_init
gst_init_check
gst_init_get_option_group