Avoid data copying for appsink and tee

Nicolas Dufresne nicolas at ndufresne.ca
Wed May 1 00:02:46 UTC 2019


Le mar. 30 avr. 2019 08 h 10, Stefan Persson <johli392 at student.liu.se> a
écrit :

> Hi,
>
> I would like to analyse the video data that is being to sent to
> autovideosink for display in the Android app.
>
> My plan is to use an appsink element and tee the output to that one.
> However
> I'd like to avoid any copying the data as the appsink will only read the
> content and output statistics.
>
> How can I minimize the performance loss? Are there any caps for appsink or
> tee I can set to force pass by reference?
>

Appsink passes references by default. So you should try. You need not to
hold for too long on the buffers to avoid reducing perf.

If you still see copies (high CPU load), that could be because of the lack
of video meta support. You can then implement allocation query to advertise
video meta, or replace the tee/appsink with a pad probe. Just ping again if
you need more details about this alternative.


> I'd like to avoid having to write a complete plugin for this as the code
> will only be used in one small part of the app.
>
> Best Regards
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190430/35492c28/attachment.html>


More information about the gstreamer-devel mailing list