Measuring omxh264enc latency

Sankar,Aswin Pranav apsankar at ufl.edu
Mon Jun 6 16:47:43 UTC 2016


I am looking to profile my rather simple Gstreamer pipeline for a school project (Essentially videotestsrc ! omxh264enc ! rtph264pay, with a gst-rtsp-server wrapped around it). I wanted to resolve some questions regarding it:

1) The GstVideoEnc base class (http://code.metager.de/source/xref/freedesktop/gstreamer/gst/plugins-base/gst-libs/gst/video/gstvideoencoder.c) says that the function which is registered as the callback to the base class's handle_frame() will run first. In the end, to transfer the frame to the downstream element, the derived class should call gst_video_encoder_finish_frame().


2) However, GstVideoEnc does not talk about handle_output_frame(), which seems to be specific to GstOMXVideoEncClass (https://github.com/tjormola/gst-omx/blob/master/omx/gstomxvideoenc.h). A callback to this is registered by omxh264enc, and it is this function that finally calls _finish_frame().


3) So what happens between _handle_frame and handle_output_frame? _handle_frame() does not call any other function. My intuition is that _handle_frame does something to offload the computation to the OMX API (not visible in the code) and stores the result in a buffer in memory and transfers control back to the parent class (GstOMXVideoEncClass) at which time the parent class calls handle_output_frame. Am I right?

4) So is it right to measure the the time taken from the beginning of _handle_frame to when _finish_frame is called as the time the frame spends in the plugin?

Thanks,

-Aswin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-openmax/attachments/20160606/c9cbcc45/attachment.html>


More information about the gstreamer-openmax mailing list