After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 511783 - [API] [check] add gst_check_element_push_buffer_list() etc.
[API] [check] add gst_check_element_push_buffer_list() etc.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: 0.10.18
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-24 13:06 UTC by Thijs Vermeir
Modified: 2008-02-13 20:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add element push buffer functions (8.03 KB, patch)
2008-01-24 13:13 UTC, Thijs Vermeir
none Details | Review
add element push buffer functions (8.04 KB, patch)
2008-01-24 14:09 UTC, Thijs Vermeir
none Details | Review
add element push buffer functions (12.57 KB, patch)
2008-01-27 23:37 UTC, Thijs Vermeir
none Details | Review

Description Thijs Vermeir 2008-01-24 13:06:20 UTC
I think we can use some more functions that automate the testing process.
Proposed is a patch that adds two functions:

* gst_check_element_push_buffer_list (const gchar *element_name, GList *buffer_in, GList *buffer_out, GstFlowReturn last_flow_return)

this function creates the element with the element_name and pushes all buffers in buffer_in to the element and checks if the output of this element is the same as the buffers in buffer_out. last_flow_return is a bonus to check what the push of the last packet need to be.

*gst_check_element_push_buffer (const gchar *element_name, GstBuffer *buffer_in, GstBuffer *buffer_out)
a small wrapper that takes 1 buffer in and out and expect GST_FLOW_OK

This can remove a lot of redundant code out of the unit test's to keep an overview.
Comment 1 Thijs Vermeir 2008-01-24 13:13:46 UTC
Created attachment 103632 [details] [review]
add element push buffer functions
Comment 2 Thijs Vermeir 2008-01-24 14:09:03 UTC
Created attachment 103636 [details] [review]
add element push buffer functions

correctly check the return value for the last buffer.
Comment 3 Thijs Vermeir 2008-01-27 23:37:18 UTC
Created attachment 103844 [details] [review]
add element push buffer functions

add more checking and logging
Comment 4 Thijs Vermeir 2008-02-01 17:17:52 UTC
committed.

Log message:
       * docs/libs/gstreamer-libs-sections.txt:
       * libs/gst/check/gstcheck.c:
       * libs/gst/check/gstcheck.h:
       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