Difference between fakesink and fakevideosink

Nicolas Dufresne nicolas at ndufresne.ca
Thu Aug 30 16:11:25 UTC 2018


Le jeudi 30 août 2018 à 15:45 +0000, Maurer, Marie a écrit :
> Hi,
>  
> there is fakesink and fakevideosink. What is the difference between
> both of them? Why are two needed?
>  
> According to (small) description of fakevideosink:
>  
> “This element is the same as fakesink but will pretend to support
> various allocation meta API like GstVideoMeta in order to prevent
> memory copies. This is useful for throughput testing and testing
> zero-copy path while creating a new pipeline.”

It will prevent "memory copies", seems quite clear. I didn't want to
explain all the internal machinery that leads to memory copy because
it's quite complex.

>  
> So is it a replacement for fakesink? Or shall it be used only for
> testing?

I don't often use fakesink for anything else then testing purpose,
which makes your questions quite strange to me.

>  
> Without looking at special cases, fakesink’s as well as
> fakevideosink’s task is to discard data. Why/how to do throughput
> testing? Is it doing additional things before discarding the data?

The description implies that you understand what GstVideoMeta is. Video
buffer may have special layout. The GstVideoMeta support is what allow
an element to send non-standard layout in the pipeline. Without that
support, the buffer need to be copied before pushing. This could be the
case for simple pipeline like:

   v4l2src ! fakesink (may copy inside v4l2src)
   v4l2src ! fakevideosink (no copies)

There is also the notion of overlay offloading that comes with Meta, so
notably:

  v4l2src ! textoverlay text=allo ! fakevideosink

In such pipeline, textoverlay will simply attach the overly as buffer
meta, while with fakesink, it would render the overlay directly inside
the video memory. fakevideosink is also configured to mimic a real
video sink in term of buffer lateness and QoS. The use case for
fakevideosink was to measure framerate of the video pipeline, without
the overhead of a real display sink, or the overhead cause by the
missing GstVideoMeta support in fakesink.

  v4l2src ! fpsdisplaysink video-sink=fakevideosink -v

>  
> Best regards,
>  
> Marie
>  
>  
>  
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180830/87fe5610/attachment.sig>


More information about the gstreamer-devel mailing list