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 734190 - check: Adding documentation to GstCheck gst_check_setup_sink function
check: Adding documentation to GstCheck gst_check_setup_sink function
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: documentation
git master
Other Linux
: Normal enhancement
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-03 02:59 UTC by tiagokatcipis
Modified: 2014-09-12 11:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that adds documentation to GstCheck (2.16 KB, patch)
2014-08-03 02:59 UTC, tiagokatcipis
needs-work Details | Review
Improved documentation to the gst_check_setup_sink_pad function (2.12 KB, patch)
2014-09-05 18:39 UTC, tiagokatcipis
committed Details | Review

Description tiagokatcipis 2014-08-03 02:59:11 UTC
Created attachment 282358 [details] [review]
Patch that adds documentation to GstCheck

Going on with the work described on #734142. I think the general description of the GstCheck module also needs some love, really wanting to go to heaven ;-).
Comment 1 tiagokatcipis 2014-09-03 01:10:44 UTC
No love for documentation ? :-(
Comment 2 Sebastian Dröge (slomo) 2014-09-04 07:53:01 UTC
Review of attachment 282358 [details] [review]:

::: libs/gst/check/gstcheck.c
@@ +424,3 @@
  *
+ * Creates a new sink pad (based on the given @tmpl) and links it to the given @element src pad (the pad that matches the given @name).
+ * This sink pad can be used to check the output of @element (see #gst_pad_add_probe on more details about how you inspect data on a #GstPad).

Usually the tests are setting chain/event/query functions on these pads instead
Comment 3 tiagokatcipis 2014-09-04 13:04:31 UTC
Sebastian,

I understand, i could add that they can also be used for these too. But i used to inspect the output of the element. The only other functions that i found on GstCheck that can check the output of the element for me required me to pass the name of the element, the input and the expected output.

I cant cover the case where i want to configure the properties of my element before injecting the input. So i used the sinkpad to check the data that my element was producing.

For the use case that i described, is there a better function on GstCheck that i missed ?
Comment 4 Sebastian Dröge (slomo) 2014-09-05 07:39:59 UTC
You can set event/chain/query functions on the pads created by this GstCheck API. And that's what most of the tests are doing
Comment 5 tiagokatcipis 2014-09-05 11:52:04 UTC
Oh sorry. Now i feel silly :P. I focused on the query/event and didn't noticed the *chain*. Of course, if i set the chain function i can get the produced data. 

I looked at some tests (like the volume element) and didn't found out these kind of thing. But it really seems to be a good idea.

I'm going to fix the documentation now.

Thanks Sebastian
Comment 6 tiagokatcipis 2014-09-05 18:39:54 UTC
Created attachment 285517 [details] [review]
Improved documentation to the gst_check_setup_sink_pad function

Pretty much the same, just documenting that is better to use the chain/query/event functions instead of probing.
Comment 7 Sebastian Dröge (slomo) 2014-09-12 11:14:44 UTC
commit 076b83208af17b10d9e0aa6cecc42ad998427e07
Author: Tiago <tiagokatcipis@gmail.com>
Date:   Fri Sep 5 18:36:02 2014 +0000

    check: Adding documentation to the gst_check_setup_sink_pad_by_name function
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734190