<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div dir="ltr" data-setdir="false">Hi,</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I tried to use the tracing infrastructure of GStreamer to determine the latency of pipeline elements. After some tests with unexpected results I stripped down my pipeline and set the following env. variables:</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><div>set GST_DEBUG=GST_TRACER:7 <br>set GST_TRACERS=latency(flags=element) </div><div><br></div><div dir="ltr" data-setdir="false"><span>gst-launch-1.0 videotestsrc num-buffers=1024 ! video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1 !  glupload ! fakesink >> out_fhd.txt 2>&1</span><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></div><div dir="ltr" data-setdir="false"><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></div><div dir="ltr" data-setdir="false"><span>gst-launch-1.0 videotestsrc num-buffers=1024 ! video/x-raw, width=(int)3840, height=(int)2160, framerate=(fraction)60/1 !  glupload ! fakesink >> out_4k.txt 2>&1</span></div><div dir="ltr" data-setdir="false"><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></div><div dir="ltr" data-setdir="false"><br></div></div><div dir="ltr" data-setdir="false"><i>GST_TRACER:</i></div><div dir="ltr" data-setdir="false">The latencies I observed for the glupload element at <span><b>1920x1980</b></span> were around<b> 1.7ms</b> and for <b>3840x2160 </b>around <b>1.9ms</b>. </div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><i>PAD PROBE:</i></div><div dir="ltr" data-setdir="false">I wrote a small c program implementing the same Pipeline installing a padprobe at the sink/src pad of the glupload element to start/stop a timer there. In this case I measured an average of<b> 0.8ms </b>for <b>1920x1080 </b>and <b>2.2ms</b> for <b>3840x2160</b>.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">After reading the documentation, I´d have expected similar results.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><a class="enhancr_card_9493720779" href="https://gstreamer.freedesktop.org/documentation/additional/design/tracing.html" target="_blank" rel="nofollow">Tracing</a></div><div><br></div><div class="ydpd6a0dbe5yahoo-link-enhancr-card ydpd6a0dbe5yahoo-link-enhancr-not-allow-cover ydpd6a0dbe5ymail-preserve-class ydpd6a0dbe5ymail-preserve-style" id="ydpd6a0dbe5enhancr_card_9493720779" style='max-width:400px;font-family:"Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif' contenteditable="false" data-url="https://gstreamer.freedesktop.org/documentation/additional/design/tracing.html" data-size="MEDIUM" data-type="YENHANCER"><a class="ydpd6a0dbe5yahoo-enhancr-cardlink" style="text-decoration:none !important;color:#000 !important" href="https://gstreamer.freedesktop.org/documentation/additional/design/tracing.html" target="_blank" rel="nofollow"><table class="ydpd6a0dbe5card-wrapper ydpd6a0dbe5yahoo-ignore-table" style="max-width:400px" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td width="400"><table width="100%" class="ydpd6a0dbe5card ydpd6a0dbe5yahoo-ignore-table" style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224, 228, 233);border-radius:2px" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td><table class="ydpd6a0dbe5card-info ydpd6a0dbe5yahoo-ignore-table" style="border-radius: 0px 0px 2px 2px; width: 100%; background-image: none; background-repeat: repeat; background-attachment: scroll; border-top-color: rgb(224, 228, 233); border-top-width: 1px; border-top-style: solid; position: relative; z-index: 2; max-width: 400px; background-size: auto; background-color: rgb(255, 255, 255);" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px"></td><td style='vertical-align:middle;padding:12px 24px 16px 12px;width:99%;font-family:"Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;border-radius:0 0 2px 0'><h2 class="ydpd6a0dbe5card-title" style='font-size:14px;line-height:19px;margin:0 0 6px 0;font-family:"Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;word-break:break-word;color:#26282a'>Tracing</h2><p class="ydpd6a0dbe5card-description" style="font-size:12px;line-height:16px;margin:0;color:#979ba7;word-break:break-word"></p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div><br></div><div><br></div><div dir="ltr" data-setdir="false">Can you explain the difference? Is it a config problem? The tracing results do not make any sense to me.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">My System: Win10, GStreamer 1.16</div><div><br></div><div dir="ltr" data-setdir="false">Thanks!</div><div dir="ltr" data-setdir="false"><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></div><div dir="ltr" data-setdir="false"><br></div></div></body></html>