<div dir="ltr"><div>Hello Laurent,</div><div>I think this patch should be merged before adding multistream test.</div><div><br></div><div>Regards,</div><div><i><b>Vedant Paranjape</b></i><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 28, 2021 at 11:48 PM Vedant Paranjape <<a href="mailto:vedantparanjape160201@gmail.com">vedantparanjape160201@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Read stats property of fakesink which has Sink Statistics, It is<br>
expected to be a non-zero number after running gstreamer element<br>
for two seconds.<br>
<br>
Signed-off-by: Vedant Paranjape <<a href="mailto:vedantparanjape160201@gmail.com" target="_blank">vedantparanjape160201@gmail.com</a>><br>
---<br>
> I would like some minimal validation. I would expect that after 2s some frames<br>
> got "rendered" properly. You can read the GstStructure property "stats" from<br>
> fakevideosink / fakesink, and read the "rendered" field. Make sure this not zero<br>
> perhaps ?<br>
<br>
This change was suggested by Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca" target="_blank">nicolas@ndufresne.ca</a>> in the<br>
mailing list <br>
---<br>
 test/gstreamer/gstreamer_single_stream_test.cpp | 7 +++++++<br>
 1 file changed, 7 insertions(+)<br>
<br>
diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp<br>
index 4c8d4804..5d56e762 100644<br>
--- a/test/gstreamer/gstreamer_single_stream_test.cpp<br>
+++ b/test/gstreamer/gstreamer_single_stream_test.cpp<br>
@@ -134,8 +134,15 @@ protected:<br>
                g_autoptr(GstBus) bus = gst_element_get_bus(pipeline_);<br>
                g_autoptr(GstMessage) msg = gst_bus_timed_pop_filtered(bus, timeout, msgType);<br>
<br>
+               gint sinkStats;<br>
+               g_object_get(sink0_, "stats", &sinkStats, NULL);<br>
+<br>
                gst_element_set_state(pipeline_, GST_STATE_NULL);<br>
<br>
+               if (sinkStats <= 0) {<br>
+                       return TestFail;<br>
+               }<br>
+<br>
                /* Parse error message */<br>
                if (msg == NULL)<br>
                        return TestPass;<br>
-- <br>
2.25.1<br>
<br>
</blockquote></div>